-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix(asff): handle empty Recommendation Url #2496
fix(asff): handle empty Recommendation Url #2496
Conversation
@@ -78,6 +78,9 @@ def fill_json_asff(finding_output, audit_info, finding, output_options): | |||
AssociatedStandards=associated_standards, | |||
RelatedRequirements=compliance_summary, | |||
) | |||
# Fill Recommendation Url if it is blank | |||
if not finding.check_metadata.Remediation.Recommendation.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.
Could you create a test for this case please?
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.
We cannot create it since moto does not cover this call and we cannot mock the call twice.
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 has nothing to do with Moto, is just a test for the fill_asff_json
. I'm finishing it and I'll push it later today.
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.
Thanks 😄
058bf25
to
c328c48
Compare
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.
🚀
Description
Handle empty Recommendation Url since Security Hub does not accept them empty.
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.