Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d2037fe

Browse files
authoredMay 1, 2025··
2 parents 44f6d16 + 32e18fe commit d2037fe

File tree

1,137 files changed

+10541
-44576
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,137 files changed

+10541
-44576
lines changed
 

‎.github/workflows/security-guardian.yml

Lines changed: 7 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -9,59 +9,25 @@ jobs:
99
- name: Checkout
1010
uses: actions/checkout@v4
1111
with:
12-
fetch-depth: 0 # Fetches full history
12+
fetch-depth: 0 # Required to enable full git diff
1313

14-
- name: Get list of changed .template.json files
15-
id: filter_files
16-
run: |
17-
echo "Getting changed CloudFormation templates..."
18-
mkdir -p changed_templates
19-
20-
git fetch origin main --depth=1
21-
22-
base_sha="${{ github.event.pull_request.base.sha }}"
23-
head_sha="${{ github.event.pull_request.head.sha }}"
24-
if [[ -z "$base_sha" ]]; then base_sha=$(git merge-base origin/main HEAD); fi
25-
if [[ -z "$head_sha" ]]; then head_sha=HEAD; fi
26-
27-
git diff --name-status "$base_sha" "$head_sha" \
28-
| grep -E '^(A|M)\s+.*\.template\.json$' \
29-
| awk '{print $2}' > changed_files.txt || true
30-
31-
while IFS= read -r file; do
32-
if [ -f "$file" ]; then
33-
safe_name=$(echo "$file" | sed 's|/|_|g')
34-
cp "$file" "changed_templates/$safe_name"
35-
else
36-
echo "::warning::Changed file not found in workspace: $file"
37-
fi
38-
done < changed_files.txt
39-
40-
if [ -s changed_files.txt ]; then
41-
echo "files_changed=true" >> $GITHUB_OUTPUT
42-
else
43-
echo "files_changed=false" >> $GITHUB_OUTPUT
44-
fi
45-
4614
- name: Install cfn-guard
47-
if: steps.filter_files.outputs.files_changed == 'true'
4815
run: |
4916
mkdir -p $HOME/.local/bin
5017
curl -L -o cfn-guard.tar.gz https://github.com/aws-cloudformation/cloudformation-guard/releases/latest/download/cfn-guard-v3-x86_64-ubuntu-latest.tar.gz
5118
tar -xzf cfn-guard.tar.gz
5219
mv cfn-guard-v3-*/cfn-guard $HOME/.local/bin/cfn-guard
5320
chmod +x $HOME/.local/bin/cfn-guard
5421
echo "$HOME/.local/bin" >> $GITHUB_PATH
55-
22+
5623
- name: Install & Build security-guardian
57-
if: steps.filter_files.outputs.files_changed == 'true'
5824
run: yarn install --frozen-lockfile && cd tools/@aws-cdk/security-guardian && yarn build
5925

60-
- name: Run cfn-guard if templates changed
61-
if: steps.filter_files.outputs.files_changed == 'true'
26+
- name: Run Security Guardian
6227
uses: ./tools/@aws-cdk/security-guardian
6328
with:
64-
data_directory: './changed_templates'
65-
rule_set_path: './tools/@aws-cdk/security-guardian/rules/trust_scope_rules.guard'
29+
base_sha: ${{ github.event.pull_request.base.sha }}
30+
head_sha: ${{ github.event.pull_request.head.sha }}
31+
rule_set_path: './tools/@aws-cdk/security-guardian/rules'
6632
show_summary: 'fail'
67-
output_format: 'single-line-summary'
33+
output_format: 'json'

‎CHANGELOG.v2.alpha.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [2.194.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.193.0-alpha.0...v2.194.0-alpha.0) (2025-05-01)
6+
57
## [2.193.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.192.0-alpha.0...v2.193.0-alpha.0) (2025-04-30)
68

79

0 commit comments

Comments
 (0)