Skip to content

Commit 2ffed85

Browse files
Merge branch 'main' into feat/iam-sid-validation-flag-main
2 parents ecc4caa + 6c1eda9 commit 2ffed85

File tree

1,348 files changed

+210375
-194270
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,348 files changed

+210375
-194270
lines changed

.github/workflows/codebuild-pr-build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ jobs:
3939
- name: Setup Node.js
4040
uses: actions/setup-node@v6
4141
with:
42-
node-version: "18"
42+
node-version: "20"
4343
cache: "yarn"
4444

4545
- name: Set up Docker
4646
uses: docker/setup-buildx-action@v3
4747

4848
- name: Load Docker images
4949
id: docker-cache
50-
uses: actions/cache/restore@v4
50+
uses: actions/cache/restore@v5
5151
with:
5252
path: |
5353
~/.docker-images.tar
@@ -58,7 +58,7 @@ jobs:
5858
run: docker image load --input ~/.docker-images.tar
5959

6060
- name: Cache build artifacts
61-
uses: actions/cache@v4
61+
uses: actions/cache@v5
6262
with:
6363
path: |
6464
~/.s3buildcache
@@ -84,12 +84,12 @@ jobs:
8484

8585
- name: Cache Docker images
8686
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
87-
uses: actions/cache/save@v4
87+
uses: actions/cache/save@v5
8888
with:
8989
path: |
9090
~/.docker-images.tar
9191
key: docker-cache-${{ runner.os }}
92-
92+
9393
- name: Save PR info for PR Linter
9494
if: github.event_name == 'pull_request'
9595
env:
@@ -102,7 +102,7 @@ jobs:
102102
103103
- name: Upload PR info artifact
104104
if: github.event_name == 'pull_request'
105-
uses: actions/upload-artifact@v5
105+
uses: actions/upload-artifact@v6
106106
with:
107107
name: pr_info
108108
path: pr/

.github/workflows/codecov-collect.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: cd packages/aws-cdk-lib && yarn test core
2929

3030
- name: Upload Coverage and PR Info
31-
uses: actions/upload-artifact@v5
31+
uses: actions/upload-artifact@v6
3232
with:
3333
name: coverage-artifacts
3434
path: |

.github/workflows/codecov-upload.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Checkout
2424
uses: actions/checkout@v6
2525
- name: Download Artifacts
26-
uses: actions/download-artifact@v6
26+
uses: actions/download-artifact@v7
2727
with:
2828
name: coverage-artifacts
2929
path: ./packages/aws-cdk-lib/core/coverage

.github/workflows/integration-test-deployment.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252

5353
- name: Load Docker images
5454
id: docker-cache
55-
uses: actions/cache/restore@v4
55+
uses: actions/cache/restore@v5
5656
with:
5757
path: |
5858
~/.docker-images.tar
@@ -63,7 +63,7 @@ jobs:
6363
run: docker image load --input ~/.docker-images.tar
6464

6565
- name: Cache build artifacts
66-
uses: actions/cache@v4
66+
uses: actions/cache@v5
6767
with:
6868
path: |
6969
~/.s3buildcache
@@ -101,7 +101,7 @@ jobs:
101101

102102
- name: Cache Docker images
103103
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
104-
uses: actions/cache/save@v4
104+
uses: actions/cache/save@v5
105105
with:
106106
path: |
107107
~/.docker-images.tar

.github/workflows/issue-sync.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
# Cache node_modules
2121
- name: Cache node_modules
22-
uses: actions/cache@v4
22+
uses: actions/cache@v5
2323
id: cache-modules
2424
with:
2525
path: |
@@ -37,7 +37,7 @@ jobs:
3737
3838
# Cache build output
3939
- name: Cache build output
40-
uses: actions/cache@v4
40+
uses: actions/cache@v5
4141
id: cache-build
4242
with:
4343
path: |

.github/workflows/pr-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ jobs:
3434
- name: Setup Node.js
3535
uses: actions/setup-node@v6
3636
with:
37-
node-version: "18"
37+
node-version: "20"
3838
cache: "yarn"
3939

4040
- name: Set up Docker
4141
uses: docker/setup-buildx-action@v3
4242

4343
- name: Load Docker images
4444
id: docker-cache
45-
uses: actions/cache/restore@v4
45+
uses: actions/cache/restore@v5
4646
with:
4747
path: |
4848
~/.docker-images.tar
@@ -53,7 +53,7 @@ jobs:
5353
run: docker image load --input ~/.docker-images.tar
5454

5555
- name: Cache build artifacts
56-
uses: actions/cache@v4
56+
uses: actions/cache@v5
5757
with:
5858
path: |
5959
~/.s3buildcache
@@ -79,7 +79,7 @@ jobs:
7979

8080
- name: Cache Docker images
8181
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
82-
uses: actions/cache/save@v4
82+
uses: actions/cache/save@v5
8383
with:
8484
path: |
8585
~/.docker-images.tar

.github/workflows/pr-linter-review-trigger.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
mkdir -p ./pr
2727
echo $PR_NUMBER > ./pr/pr_number
2828
echo $PR_SHA > ./pr/pr_sha
29-
- uses: actions/upload-artifact@v5
29+
- uses: actions/upload-artifact@v6
3030
with:
3131
name: pr_info
3232
path: pr/

.github/workflows/security-guardian.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Security Guardian
22
on:
3-
pull_request: {}
3+
pull_request:
4+
paths:
5+
- '**.js.snapshot**'
46

57
jobs:
68
log-skip:
@@ -48,7 +50,7 @@ jobs:
4850
echo "${{ github.event.pull_request.head.sha }}" > ./test-results/pr_sha
4951
5052
- name: Upload Security Guardian XML Reports
51-
uses: actions/upload-artifact@v5
53+
uses: actions/upload-artifact@v6
5254
if: always()
5355
with:
5456
name: security-guardian-reports

.github/workflows/security-report.yml

Lines changed: 73 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ jobs:
1111
checks: write
1212
pull-requests: write
1313
actions: read
14+
env:
15+
CHECK_NAME_STATIC: 'Security Guardian Results'
16+
CHECK_NAME_RESOLVED: 'Security Guardian Results with resolved templates'
1417
steps:
1518
- name: Download artifacts
16-
uses: actions/download-artifact@v6
19+
uses: actions/download-artifact@v7
1720
with:
1821
name: security-guardian-reports
1922
path: test-results/
@@ -28,11 +31,12 @@ jobs:
2831
echo "pr_sha=$(cat test-results/pr_sha)" >> "$GITHUB_OUTPUT"
2932
echo "PR: $(cat test-results/pr_number), SHA: $(cat test-results/pr_sha)"
3033
- name: Publish Security Test Results
34+
id: junit_static
3135
uses: mikepenz/action-junit-report@v6
3236
if: always()
3337
with:
3438
report_paths: 'test-results/**/cfn-guard-static.xml'
35-
check_name: 'Security Guardian Results'
39+
check_name: ${{ env.CHECK_NAME_STATIC }}
3640
exclude_sources: 'node_modules,dist'
3741
commit: ${{ steps.pr_info.outputs.pr_sha }}
3842
check_annotations: true
@@ -46,12 +50,46 @@ jobs:
4650
check_title_template: '{{TEST_NAME}}'
4751
include_empty_in_summary: false
4852

53+
- name: Add disclaimer to static results comment
54+
uses: actions/github-script@v7
55+
if: steps.junit_static.outcome == 'success'
56+
env:
57+
PR_NUMBER: ${{ steps.pr_info.outputs.pr_number }}
58+
CHECK_NAME: ${{ env.CHECK_NAME_STATIC }}
59+
with:
60+
github-token: ${{ secrets.GITHUB_TOKEN }}
61+
script: |
62+
const prNumber = process.env.PR_NUMBER;
63+
const checkName = process.env.CHECK_NAME;
64+
const comments = await github.rest.issues.listComments({
65+
owner: context.repo.owner,
66+
repo: context.repo.repo,
67+
issue_number: prNumber,
68+
});
69+
70+
const botComment = comments.data.find(comment =>
71+
comment.user.type === 'Bot' &&
72+
comment.body.includes(checkName) &&
73+
!comment.body.includes('resolved templates')
74+
);
75+
76+
if (botComment) {
77+
const disclaimer = '⚠️ **Experimental Feature**: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined. \n**Please try `merge from main` to avoid findings unrelated to the PR.**\n\n---\n\n';
78+
await github.rest.issues.updateComment({
79+
owner: context.repo.owner,
80+
repo: context.repo.repo,
81+
comment_id: botComment.id,
82+
body: disclaimer + botComment.body
83+
});
84+
}
85+
4986
- name: Publish Security Test Results for resolved templates
87+
id: junit_resolved
5088
uses: mikepenz/action-junit-report@v6
5189
if: always()
5290
with:
5391
report_paths: 'test-results/**/cfn-guard-resolved.xml'
54-
check_name: 'Security Guardian Results with resolved templates'
92+
check_name: ${{ env.CHECK_NAME_RESOLVED }}
5593
exclude_sources: 'node_modules,dist'
5694
commit: ${{ steps.pr_info.outputs.pr_sha }}
5795
check_annotations: true
@@ -64,3 +102,35 @@ jobs:
64102
include_skipped: false
65103
check_title_template: '{{TEST_NAME}}'
66104
include_empty_in_summary: false
105+
106+
- name: Add disclaimer to resolved results comment
107+
uses: actions/github-script@v7
108+
if: steps.junit_resolved.outcome == 'success'
109+
env:
110+
PR_NUMBER: ${{ steps.pr_info.outputs.pr_number }}
111+
CHECK_NAME: ${{ env.CHECK_NAME_RESOLVED }}
112+
with:
113+
github-token: ${{ secrets.GITHUB_TOKEN }}
114+
script: |
115+
const prNumber = process.env.PR_NUMBER;
116+
const checkName = process.env.CHECK_NAME;
117+
const comments = await github.rest.issues.listComments({
118+
owner: context.repo.owner,
119+
repo: context.repo.repo,
120+
issue_number: prNumber,
121+
});
122+
123+
const botComment = comments.data.find(comment =>
124+
comment.user.type === 'Bot' &&
125+
comment.body.includes(checkName)
126+
);
127+
128+
if (botComment) {
129+
const disclaimer = '⚠️ **Experimental Feature**: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined. \n**Please try `merge from main` to avoid findings unrelated to the PR.**\n\n---\n\n';
130+
await github.rest.issues.updateComment({
131+
owner: context.repo.owner,
132+
repo: context.repo.repo,
133+
comment_id: botComment.id,
134+
body: disclaimer + botComment.body
135+
});
136+
}

.github/workflows/spec-update.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
# Upload the current db to be used later
3333
- name: Upload base database
34-
uses: actions/upload-artifact@v5
34+
uses: actions/upload-artifact@v6
3535
with:
3636
name: db.base.json.gz
3737
path: node_modules/@aws-cdk/aws-service-spec/db.json.gz
@@ -49,7 +49,7 @@ jobs:
4949

5050
# Now that we have updated the database, upload the new candidate db
5151
- name: Upload head database
52-
uses: actions/upload-artifact@v5
52+
uses: actions/upload-artifact@v6
5353
with:
5454
name: db.head.json.gz
5555
path: node_modules/@aws-cdk/aws-service-spec/db.json.gz
@@ -59,7 +59,6 @@ jobs:
5959
- name: Build @aws-cdk/spec2cdk
6060
run: lerna run build --stream --no-progress --skip-nx-cache --scope @aws-cdk/spec2cdk
6161
- name: Generate code
62-
run: yarn gen
6362
run: lerna run gen --stream --no-progress --skip-nx-cache --scope aws-cdk-lib --scope @aws-cdk/mixins-preview
6463

6564
# Next, create and upload the changes as a patch file. This will later be downloaded to create a pull request
@@ -69,7 +68,7 @@ jobs:
6968
git add .
7069
git diff --patch --staged > ${{ runner.temp }}/update-spec.patch
7170
- name: Upload Patch
72-
uses: actions/upload-artifact@v5
71+
uses: actions/upload-artifact@v6
7372
with:
7473
name: update-spec.patch
7574
path: ${{ runner.temp }}/update-spec.patch
@@ -85,12 +84,12 @@ jobs:
8584
CI: "true"
8685
steps:
8786
- name: Download base database
88-
uses: actions/download-artifact@v6
87+
uses: actions/download-artifact@v7
8988
with:
9089
name: db.base.json.gz
9190
path: base
9291
- name: Download head database
93-
uses: actions/download-artifact@v6
92+
uses: actions/download-artifact@v7
9493
with:
9594
name: db.head.json.gz
9695
path: head
@@ -110,7 +109,7 @@ jobs:
110109
cat DIFF >> PR.md
111110
echo '```' >> PR.md
112111
- name: Upload PR body file
113-
uses: actions/upload-artifact@v5
112+
uses: actions/upload-artifact@v6
114113
with:
115114
name: PR.md
116115
path: PR.md
@@ -128,7 +127,7 @@ jobs:
128127
uses: actions/checkout@v6
129128

130129
- name: Download patch
131-
uses: actions/download-artifact@v6
130+
uses: actions/download-artifact@v7
132131
with:
133132
name: update-spec.patch
134133
path: ${{ runner.temp }}
@@ -137,13 +136,13 @@ jobs:
137136
run: '[ -s ${{ runner.temp }}/update-spec.patch ] && git apply ${{ runner.temp }}/update-spec.patch || echo "Empty patch. Skipping."'
138137

139138
- name: Download PR body file
140-
uses: actions/download-artifact@v6
139+
uses: actions/download-artifact@v7
141140
with:
142141
name: PR.md
143142
path: ${{ runner.temp }}
144143

145144
- name: Make Pull Request
146-
uses: peter-evans/create-pull-request@v7
145+
uses: peter-evans/create-pull-request@v8
147146
with:
148147
# Git commit details
149148
branch: automation/spec-update

0 commit comments

Comments
 (0)