Add Prowler and ScoutSuite importers to scanimport plugin - #674
Merged
Conversation
Adds native import support for AWS cloud scan output to the scanimport
plugin, alongside the existing tools:
- Prowler: parses both the CSV report and the JSON-OCSF report (the two
formats Prowler v4/v5 emit by default). CSV handles v3/v4 exports (';' or
',' delimited, column-name aliases handled); OCSF is read from the array of
detection findings (check id from metadata.event_code, resources from
resources[].uid, remediation references carried through). Only FAIL findings
are imported; PASS/MANUAL are dropped. Findings are merged by CHECK_ID so one
check across many resources becomes a single finding listing every affected
resource.
- ScoutSuite: parses the default `scoutsuite_results_*.js` report (the
`scoutsuite_results = {...};` wrapper is stripped) or a plain `.json`
export. Findings are merged per (service, finding_id); ScoutSuite's
danger/warning/good_practice levels map onto the info..critical scale.
Both importers follow the existing importer conventions: auto-detection via
is_format(), notes and findings output, and customisation through
`scanimport:prowler:<check_id>` / `scanimport:scoutsuite:<finding_id>`
finding-template tags with a built-in fallback template.
Adds tests and sample fixtures (Prowler CSV v3/v4 and JSON-OCSF, ScoutSuite
.js and .json) for both tools. Fixtures are picked up by the parametrised
tests in test_importers.py (format detection, notes, findings) in addition to
dedicated test_prowler.py / test_scoutsuite.py unit tests.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
|
Looks great. Thank you for your contribution |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds native import support for AWS cloud scan output to the scanimport plugin, alongside the existing tools:
scoutsuite_results_*.jsreport (thescoutsuite_results = {...};wrapper is stripped) or a plain.jsonexport. Findings are merged per (service, finding_id); ScoutSuite's danger/warning/good_practice levels map onto the info..critical scale.Both importers follow the existing importer conventions: auto-detection via is_format(), notes and findings output, and customisation through
scanimport:prowler:<check_id>/scanimport:scoutsuite:<finding_id>finding-template tags with a built-in fallback template.Adds tests and sample fixtures (Prowler CSV v3/v4 and JSON-OCSF, ScoutSuite .js and .json) for both tools. Fixtures are picked up by the parametrised tests in test_importers.py (format detection, notes, findings) in addition to dedicated test_prowler.py / test_scoutsuite.py unit tests.