-
Notifications
You must be signed in to change notification settings - Fork 4.3k
ci: security guardian changes #36110
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
Merged
Merged
Changes from 49 commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
fe1e34e
feat: Changed intrinsic scanner in security guardian to exempt kms ke…
kumvprat bd14fd3
feat: Modified rules for catching more broad policies + changed intri…
kumvprat 9f0e606
feat: Adding security guardian new rules and disabling intrinsic scan…
kumvprat 648b4e1
Merge branch 'main' into security_guardian_changes
kumvprat ae8fc97
feat: Removed ecr image checks + reverted back for cfn guard to show …
kumvprat d4893bd
feat: Added cfn template resolution logic to resolve intrinsic functi…
kumvprat 6f872d5
feat: Added cfn template resolution logic to resolve intrinsic functi…
kumvprat 2250e2f
feat: Added code comments to explain the various intrinsic functions …
kumvprat d2db463
feat(security-guardian): enhance CFN intrinsic resolution and add com…
kumvprat 9bfee59
feat: using junit format of cfn-guard to generate junit related test …
kumvprat 02ae206
feat: Fixed with proper use of result piping from cfn guard output
kumvprat 3adada6
chore: deleting yarn.lock file
kumvprat 250e5b9
Merge branch 'main' into security_guardian_changes
kumvprat f92685f
feat: Added a complient cfn template + tests to check successful runs…
kumvprat 23977ae
feat: Using unnormalized check of policy normalizer to ensure all the…
kumvprat 51733b3
fix: config changes for junit publishing action(group by suites)
kumvprat f3d4ad1
fix: Fixing testsuite name in the junit report generated by security …
kumvprat f379db6
feat: abstract out postProcessXml function
kumvprat 2a13551
feat: restore security-critical resource attributes for accurate poli…
kumvprat e86ada3
fix: copy name attribute to file attribute in testsuite since the jun…
kumvprat 948717a
fix: Logic to handled file name mapping and returning the mapping ins…
kumvprat eaeb476
fix: Logic to handled file name mappings and resolving testsuite name…
kumvprat b249b28
feat: Added logic to convert failure message based on cfn template ty…
kumvprat 4baf2a1
feat: Using proper summary table in GH workflow
kumvprat 3145e90
feat: Eanble annotation update rather than new ones
kumvprat b594d29
feat: Added logic to creat 2 set ofsumaaries and use exact chagens in…
kumvprat fcb058b
fix: Added checks in no-root-principals guard rule that checks for sp…
kumvprat 5ede549
fix: Added checks in no-root-principals guard rule that checks for sp…
kumvprat 0309483
feat: Add example for suppressing a guard rule
kumvprat 8af6924
fix: Removing datatrace.guard as it's source of lot of false positives
kumvprat 462a413
feat: Uploading junit xmls as artifacts so that they can be used by m…
kumvprat 1ea242a
feat: Added functionality to upload artifact and then use it in diffe…
kumvprat c224d48
fix: Removed checkout of specfic commit inside security-report workfl…
kumvprat 2066bde
Merge branch 'main' into security_guardian_changes
kumvprat 34d2fe9
feat: Fixed the pair of workflows to work with forked repo PRs as wel…
kumvprat 7683e85
feat: Fixed the pair of workflows to work with forked repo PRs as wel…
kumvprat 29fa0d7
feat: Fixed the pair of workflows to work with forked repo PRs as wel…
kumvprat 5b4330c
fix :Unpacking artifacts in a single folder
kumvprat 2504bbd
fix: Adding an exists check in iam.guard rule
kumvprat eb45325
fix: Remove un-neceassry tests fron guard-rules.test.ts
kumvprat 7ca1ba2
feat: Added new tests in guard-rules.test.ts to cover the post proces…
kumvprat 38093e3
fix: Small changes to iam.guard and also configuring test reporter to…
kumvprat c541aef
chore: Using v6 of the junit action reporter GH action
kumvprat 3f23a2f
feat: Moved guard rules to different folder so that junit xml can hav…
kumvprat ada630c
feat: Added a toggable option to enable ehanced processing that conve…
kumvprat 5f65cbb
feat: Added a toggable option to enable ehanced processing : Made it …
kumvprat b08f061
feat: Added a toggable option to enable ehanced processing : Made it …
kumvprat 63a14c1
chore: Renamed guard files
kumvprat 339dca7
chore: Renamed guard files => Test fixes
kumvprat 049a606
chore: update README.md to reflect what the final raw output would lo…
kumvprat d82b62b
Merge branch 'main' into security_guardian_changes
kumvprat c4f44e4
Merge branch 'main' into security_guardian_changes
kumvprat a2ec1b8
feat: remove contents write permission for security-report workflow
kumvprat 2965c05
Merge branch 'main' into security_guardian_changes
mergify[bot] a6a0d3f
Merge branch 'main' into security_guardian_changes
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| name: Security Report | ||
| on: | ||
| workflow_run: | ||
| workflows: ["Security Guardian"] | ||
| types: [completed] | ||
|
|
||
| jobs: | ||
| report: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| checks: write | ||
| pull-requests: write | ||
| contents: write | ||
| id-token: write | ||
| actions: read | ||
| steps: | ||
| - name: Download artifacts | ||
| uses: actions/download-artifact@v5 | ||
| with: | ||
| name: security-guardian-reports | ||
| path: test-results/ | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| run-id: ${{ github.event.workflow_run.id }} | ||
| repository: ${{ github.repository }} | ||
|
|
||
| - name: Get PR info | ||
| id: pr_info | ||
| run: | | ||
| echo "pr_number=$(cat test-results/pr_number)" >> "$GITHUB_OUTPUT" | ||
| echo "pr_sha=$(cat test-results/pr_sha)" >> "$GITHUB_OUTPUT" | ||
| echo "PR: $(cat test-results/pr_number), SHA: $(cat test-results/pr_sha)" | ||
| - name: Publish Security Test Results | ||
| uses: mikepenz/action-junit-report@v6 | ||
| if: always() | ||
| with: | ||
| report_paths: 'test-results/**/cfn-guard-static.xml' | ||
| check_name: 'Security Guardian Results' | ||
| exclude_sources: 'node_modules,dist' | ||
| commit: ${{ steps.pr_info.outputs.pr_sha }} | ||
| check_annotations: true | ||
| comment: true | ||
| pr_id: ${{ steps.pr_info.outputs.pr_number }} | ||
| detailed_summary: true | ||
| include_passed: false | ||
| fail_on_failure: false | ||
| group_suite: true | ||
| include_skipped: false | ||
| check_title_template: '{{TEST_NAME}}' | ||
|
|
||
| - name: Publish Security Test Results for resolved templates | ||
| uses: mikepenz/action-junit-report@v6 | ||
| if: always() | ||
| with: | ||
| report_paths: 'test-results/**/cfn-guard-resolved.xml' | ||
| check_name: 'Security Guardian Results with resolved templates' | ||
| exclude_sources: 'node_modules,dist' | ||
| commit: ${{ steps.pr_info.outputs.pr_sha }} | ||
| check_annotations: true | ||
| comment: true | ||
| pr_id: ${{ steps.pr_info.outputs.pr_number }} | ||
| detailed_summary: true | ||
| include_passed: false | ||
| fail_on_failure: false | ||
| group_suite: true | ||
| include_skipped: false | ||
| check_title_template: '{{TEST_NAME}}' | ||
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Why does it need
contents: writepermissions?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 think this is something we can remove, will tell this first and see if it's not being used
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.
Removed the permissions as it's not needed.
Thanks, was a good catch