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

More info #53

Open
marcelloh opened this issue Oct 17, 2023 · 5 comments
Open

More info #53

marcelloh opened this issue Oct 17, 2023 · 5 comments

Comments

@marcelloh
Copy link

When I run it, I see some info at the end , like:

CAPABILITY_ARBITRARY_EXECUTION: 3 references
CAPABILITY_FILES: 3 references
CAPABILITY_MODIFY_SYSTEM_STATE: 3 references
CAPABILITY_NETWORK: 3 references
CAPABILITY_OPERATING_SYSTEM: 2 references
CAPABILITY_READ_SYSTEM_STATE: 3 references
CAPABILITY_REFLECT: 3 references
CAPABILITY_SYSTEM_CALLS: 3 references
CAPABILITY_UNANALYZED: 3 references
CAPABILITY_UNSAFE_POINTER: 3 references

It would be nice if there was a flag (like -v or something) that would tell me more in detail about what the files and the positions of there references are.
Example
Like/my/dir/to/file.go:14:28
(this makes it easy to go to the position with just 1 click)

@jcd2
Copy link
Collaborator

jcd2 commented Oct 20, 2023

Thanks for trying Capslock! Output formats are definitely something we're still experimenting with to learn what's most useful. We have the command-line flag -output to change how the information is presented. -output=v is similar to what you suggest, although we should probably add the full path for source files instead of just the final filename.

@gedw99
Copy link

gedw99 commented Nov 18, 2023

Outputs format are all good.
but I was hoping to see discover of where is food some aspects

For example:
CAPABILITY_NETWORK: 3 references could pump back a link to the path to the file with line numbers for example.

@lyda
Copy link

lyda commented Jan 9, 2024

Yes, I just ran this on a module and see CAPABILITY_ARBITRARY_EXECUTION: 2 references. I'm not clear which modules can do this. I'm also not clear if I'm using the parts that can do this. If it helps, I was running it against this.

https://gitlab.com/lyda/external-dns-openwrt

@jcd2
Copy link
Collaborator

jcd2 commented Jan 19, 2024

Using -output=json gives you example call paths showing why functions have particular capabilities.

There's also -output=graph which outputs the full set of paths from functions to capabilities in a format suitable for use with graphviz, but this can often be very large.

@lyda
Copy link

lyda commented Jan 23, 2024

Perfect. The json output meets my needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants