Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update output rendering #34

Merged
merged 61 commits into from
Jun 29, 2020
Merged

update output rendering #34

merged 61 commits into from
Jun 29, 2020

Conversation

williballenthin
Copy link
Collaborator

@williballenthin williballenthin commented Jun 29, 2020

to be merged alongside mandiant/capa-rules#14

removes references to rule-category and makes capa aware of the namespace meta key. adds modules for rendering the results in a variety of formats, including: default, verbose, vverbose, and json.

also some misc changes:

default format

image

i don't love that the various tables have different widths. also, the ATT&CK tables tend to be a bit sparse. i may try to tweak this a bit to make things a bit tighter.

verbose format

image

vverbose format

image

i figured out how to wire up the results across subscope and match statements, making this view substantially more thorough than what we had before!

haven't yet implemented feature context, since i think we're soon going to add the context in a consistent way. i expect these changes to be ~5 line fix once context lands.

json format

image

all the other output formats simply translate this json format into something more pretty. so, this makes it feasible for external tools to invoke capa, parse the output, and make decisions.

@williballenthin williballenthin added the enhancement New feature or request label Jun 29, 2020
Copy link
Collaborator

@mr-tz mr-tz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏 very awesome! this is a great improvement! a couple of comments and ideas around outputting we can discuss further.

capa/main.py Outdated Show resolved Hide resolved
capa/main.py Show resolved Hide resolved
capa/render/__init__.py Outdated Show resolved Hide resolved
capa/render/__init__.py Show resolved Hide resolved
capa/render/utils.py Show resolved Hide resolved
capa/render/vverbose.py Outdated Show resolved Hide resolved
scripts/lint.py Show resolved Hide resolved
capa/render/default.py Outdated Show resolved Hide resolved
capa/render/verbose.py Show resolved Hide resolved
capa/render/verbose.py Show resolved Hide resolved
Copy link
Member

@Ana06 Ana06 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💘

scripts/hooks/post-commit Show resolved Hide resolved
scripts/lint.py Show resolved Hide resolved
scripts/lint.py Outdated Show resolved Hide resolved
capa/render/vverbose.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@mike-hunhoff mike-hunhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A+ @williballenthin 👏. This is awesome! I love the new output formats.

README.md Show resolved Hide resolved
@williballenthin williballenthin merged commit 5cbfbc4 into master Jun 29, 2020
@williballenthin williballenthin deleted the rule-organization branch June 29, 2020 19:07
@williballenthin williballenthin restored the rule-organization branch June 29, 2020 19:14
@williballenthin williballenthin mentioned this pull request Jul 1, 2020
14 tasks
@williballenthin williballenthin deleted the rule-organization branch July 16, 2020 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants