-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(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
base: main
Are you sure you want to change the base?
Conversation
…y default policy from scans
…nsic scanner code to exempt some services from root principal check
…ner by default till it runs consistenly and changing workflow to run on pull_request_target
…summary and output as provided in the tool invocation arguments + Removed s3 bucket versioning requirement + data trace checks only have private key and aws access key id checks
…ons + added tests to cover that logic
…on : Not and contains with tests + made the resolution function modular
…being resolved by the custom resolver + removed malformed template checks as cdk should always produced a valid template + added policy resolution tests
…prehensive tests + Fix Fn::Sub literal escaping and parameter resolution + Add shorthand form support (etc.) + Improve Fn::Select bounds checking + Add comprehensive test coverage for guard rules and intrinsic functions
…results + changes in security guardian workflow to parse the junit files + removed test.sh + fix faulty guard rules + added action to consume and publish junit result
… of scfn guard runs
… fields in a policy are targeted for normalization
…it action report GH action looks for file attribute
…tead oif implementing a reversible function => Works for unresolved cfn temapates
… filed + added tests to coer this
…pe being processed
… a PR rather than cehckout action based merge commit
…ecific object inside Properties and only triggers rule when the changes exists + test changes
…ecific object inside Properties and only triggers rule when the changes exists + test changes
…rent report generation workflow to add proper annotations
…ow as the triggered workflow ispriviliged
…l, the artifact carries the information wiht it
…l, the artifact carries the information wiht it
…l, the artifact carries the information wiht it => Pr info capture works with security guardian failure as well
…sing xml part as well + some minro changes
… always show failed tests only
…e segregated into differet failure tags
…rts junit xml to a more readable format
aws-cdk-automation
left a comment
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.
The pull request linter fails with the following errors:
❌ Features must contain a change to an integration test file and the resulting snapshot.
If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.


Issue # (if applicable)
N/A - Enhancement and bug fixes for Security Guardian tool.
Reason for this change
Security guardian is first line of defense for scanning policy, roles and permissions vended by CDK for customers. This GH Action is critical to determine if a PR change is providing secure-by-default policies for any changes introduced in CDK.
The Security Guardian tool needed several critical improvements to function properly:
Fn::Sub,Fn::Select,Fn::Contains, etc.Description of changes
Added template preprocessing pipeline with intrinsic resolution and policy normalization, details can be found below
Major Enhancements:
Fn::Subwith literal escaping,Fn::Selectwith bounds checking,Fn::Contains,Fn::Split,Fn::Cidr,Fn::Base64, and shorthand forms (!Ref,!GetAtt, etc.)Fn::ImportValueand cross-template referencesmikepenz/action-junit-reportfor rich PR feedback ( suggested by cfn-guard here)pull_requestorpull_request_reviewSecurity Rule Expansion:
Describe any new or updated permissions being added
No new IAM permissions required. All changes are to the static analysis tool and GitHub Actions workflow.
Description of how you validated changes
Unit Testing: via
Fn::ImportValueand cross-template referencesChecklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license