-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore(outputs): adapt to new metadata specification #8651
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
base: master
Are you sure you want to change the base?
chore(outputs): adapt to new metadata specification #8651
Conversation
✅ All necessary |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8651 +/- ##
==========================================
- Coverage 75.75% 75.60% -0.15%
==========================================
Files 72 72
Lines 4851 4928 +77
==========================================
+ Hits 3675 3726 +51
- Misses 1176 1202 +26
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's great 👏
Out of curiosity, why there are no changes in asff.py
and html.py
? Probably I'm missing something.
finding_dict["ADDITIONAL_URLS"] = unroll_list( | ||
finding.metadata.AdditionalURLs | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be the very last column, not to break automations reading CSV columns.
@@ -163,6 +159,7 @@ def transform(self, findings: List[Finding]) -> None: | |||
"categories": finding.metadata.Categories, | |||
"depends_on": finding.metadata.DependsOn, | |||
"related_to": finding.metadata.RelatedTo, | |||
"additional_urls": finding.metadata.AdditionalURLs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review if the OCSF documentation needs to be updated too.
@@ -14,6 +14,7 @@ All notable changes to the **Prowler SDK** are documented in this file. | |||
- `--excluded-checks-file` flag [(#8301)](https://github.com/prowler-cloud/prowler/pull/8301) | |||
|
|||
### Changed | |||
- Outputs content for new Metadata fields [(#8651)](https://github.com/prowler-cloud/prowler/pull/8651) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add a new line in Added
saying: "Support for AdditionalURLs
in outputs"
@@ -36,6 +36,7 @@ def generate_finding_output( | |||
depends_on: list[str] = ["test-dependency"], | |||
related_to: list[str] = ["test-related-to"], | |||
notes: str = "test-notes", | |||
additional_urls: list[str] = ["test-url"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a valid URL, is better then to test and validate.
Context
Some changes were needed to match new metadata specification while preserving compatibility with old metadata and output formats.
Description
CSV
OCSF
HTML
ASFF
Steps to review
Execute 2 scans with all output formats (one with old metadata and other with new metadata) and ensure all are generated as expected.
Checklist
API
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.