nccgroup / Scout2

Security auditing tool for AWS environments
http://nccgroup.github.io/Scout2/
GNU General Public License v2.0
1.73k stars 300 forks source link

Wiki Example - Arbitrary output using Scout2Listall #265

Closed marcinguy closed 6 years ago

marcinguy commented 6 years ago

I receive this error:

$ Scout2Listall --config /home/user/Scout2/AWSScout2/rules/data/findings/iam-user-without-mfa.json --format-file /home/user/Scout2/AWSScout2/rules/data/findings/iam-users-without-mfa.md Traceback (most recent call last): File "/usr/local/bin/Scout2Listall", line 11, in load_entry_point('AWSScout2==3.2.0', 'console_scripts', 'Scout2Listall')() File "/usr/local/lib/python2.7/dist-packages/AWSScout2/listall.py", line 76, in main pe = ProcessingEngine(ruleset) File "/usr/local/lib/python2.7/dist-packages/AWSScout2/rules/processingengine.py", line 22, in init self.rules[rule.path].append(rule) AttributeError: 'Rule' object has no attribute 'path'

Any idea what am I doing wrong?

I have my report in /home/user/scout2-report/ and it works.

x4v13r64 commented 6 years ago

You'll want to remove the full path, e.g. $ Scout2Listall --config iam-user-without-mfa.json --format-file iam-users-without-mfa.md

Please refer to https://github.com/nccgroup/Scout2/wiki/HowTo:-Exporting-and-Programmatically-Access-of-Scout2-Data#5-arbitrary-output.

marcinguy commented 6 years ago

Works! Thanks. I used the GitHub version and put the format file in /home/user/Scout2/AWSScout2/rules/data/findings/

than run it from /home/user directory as you suggested

$ Scout2/Scout2Listall --config iam-user-without-mfa.json --format-file iam-users-without-mfa.md

However, when I install Scout2 from pip package, where should I put fromat file (--format-file iam-users-without-mfa.md)

x4v13r64 commented 6 years ago

In that case you will want to put the files where the package has been installed.

If you're using "advanced" features, your best bet is probably to use the repository + virtualenv.