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

Output Option #2

Open
LewisLebentz opened this issue Oct 6, 2022 · 2 comments
Open

Output Option #2

LewisLebentz opened this issue Oct 6, 2022 · 2 comments

Comments

@LewisLebentz
Copy link

Is your feature request related to a problem? Please describe.
It's difficult to read through the output of a scan.

Describe the solution you'd like
Noticed that slack-watchman has an --output flag whereas this one doesn't.

--output {csv,file,stdout,stream}

Describe alternatives you've considered
/

Additional context
Ran this with a Docker container, so maybe it is outputting somewhere but the container is getting deleted after being run so I'm not seeing it?

@LewisLebentz
Copy link
Author

Could we may just get the output to a log file for now, looks like you should be able to add another handler here: https://github.com/PaperMtn/slack-watchman-enterprise-grid/blob/8b70acfab894751235e8a2b06f6ddf17afb8510d/src/slack_watchman_eg/logger.py

Like this: https://stackoverflow.com/a/44760039/3365278

@PaperMtn
Copy link
Owner

I've not really considered adding CSV logging to the Enterprise Grid version, and its something that will probably be removed from the standard version of Slack Watchman as well if I get round to updating it.

It's difficult to support new features for lots of different logging formats. With more complex data structures, like with Slack Watchman for Enterprise Grid, the best way to serialise that output is via JSON, particularly if you want to ingest that into a log analysis platform, or do some processing on it.

Logging to file should be possible by redirecting stdout to a file, even with Docker. You should be able to do something like:

docker run --rm -e SLACK_WATCHMAN_EG_TOKEN=xoxp... papermountain/slack-watchman-eg --hours 1 --cores 8 > ~/slack_watchman.log

Is that the sort of thing you're looking for?

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

2 participants