Skip to content

Commit 74ed32b

Browse files
Copilotjkowalleck
andauthored
chore(ci): Pin GitHub Actions to immutable SHAs while preserving Dependabot tag tracking (#1531)
### Description Pin all GitHub Actions `uses:` references in CI workflow files to exact immutable commit SHAs, while preserving the human-readable version tag in an inline comment so Dependabot can continue detecting and proposing upstream version updates. Before: ```yaml uses: actions/checkout@v6 ``` After: ```yaml uses: actions/checkout@de0fac2 # v6 ``` Files changed: `.github/workflows/nodejs.yml`, `.github/workflows/release.yml` Resolves or fixes issue: #1530 ### AI Tool Disclosure - [ ] My contribution does not include any AI-generated content - [x] My contribution includes AI-generated content, as disclosed below: - AI Tools: `GitHub Copilot` - LLMs and versions: `Claude Sonnet 4.5` - Prompts: `Pin GitHub Actions to commit SHAs while keeping tag comments for Dependabot compatibility` ### Affirmation - [x] My code follows the [CONTRIBUTING.md](https://github.com/CycloneDX/cyclonedx-webpack-plugin/blob/main/CONTRIBUTING.md) guidelines --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jkowalleck <2765863+jkowalleck@users.noreply.github.com>
1 parent 6d30e9b commit 74ed32b

2 files changed

Lines changed: 26 additions & 26 deletions

File tree

.github/workflows/nodejs.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ jobs:
3333
steps:
3434
- name: Checkout
3535
# see https://github.com/actions/checkout
36-
uses: actions/checkout@v6
36+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
3737
- name: Setup Node.js ${{ env.NODE_ACTIVE_LTS }}
3838
# see https://github.com/actions/setup-node
39-
uses: actions/setup-node@v6
39+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
4040
with:
4141
node-version: ${{ env.NODE_ACTIVE_LTS }}
4242
package-manager-cache: false
@@ -46,7 +46,7 @@ jobs:
4646
run: npm run build-dev
4747
- name: artifact build result
4848
# see https://github.com/actions/upload-artifact
49-
uses: actions/upload-artifact@v6
49+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
5050
with:
5151
name: dist
5252
path: dist
@@ -59,10 +59,10 @@ jobs:
5959
steps:
6060
- name: Checkout
6161
# see https://github.com/actions/checkout
62-
uses: actions/checkout@v6
62+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
6363
- name: Setup Node.js ${{ env.NODE_ACTIVE_LTS }}
6464
# see https://github.com/actions/setup-node
65-
uses: actions/setup-node@v6
65+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
6666
with:
6767
node-version: ${{ env.NODE_ACTIVE_LTS }}
6868
package-manager-cache: false
@@ -84,12 +84,12 @@ jobs:
8484
- name: Annotate Code
8585
if: ${{ failure() || success() }}
8686
# see https://github.com/DerLev/eslint-annotations
87-
uses: DerLev/eslint-annotations@v2
87+
uses: DerLev/eslint-annotations@a79ea65c1b45a649c48bcc6efc0103b6fd2e4c5f # v2
8888
with:
8989
eslint-report: ${{ env.REPORTS_DIR }}/eslint.json
9090
- name: artifact eslint result
9191
# see https://github.com/actions/upload-artifact
92-
uses: actions/upload-artifact@v6
92+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
9393
if: ${{ failure() }}
9494
with:
9595
name: ${{ env.STANDARD_REPORTS_ARTIFACT }}
@@ -103,10 +103,10 @@ jobs:
103103
steps:
104104
- name: Checkout
105105
# see https://github.com/actions/checkout
106-
uses: actions/checkout@v6
106+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
107107
- name: Setup Node.js ${{ env.NODE_ACTIVE_LTS }}
108108
# see https://github.com/actions/setup-node
109-
uses: actions/setup-node@v6
109+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
110110
with:
111111
node-version: ${{ env.NODE_ACTIVE_LTS }}
112112
package-manager-cache: false
@@ -148,10 +148,10 @@ jobs:
148148
steps:
149149
- name: Checkout
150150
# see https://github.com/actions/checkout
151-
uses: actions/checkout@v6
151+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
152152
- name: Setup Node.js ${{ matrix.node-version }}
153153
# see https://github.com/actions/setup-node
154-
uses: actions/setup-node@v6
154+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
155155
with:
156156
node-version: ${{ matrix.node-version }}
157157
package-manager-cache: false
@@ -173,7 +173,7 @@ jobs:
173173
npm i --ignore-scripts --loglevel=silly --no-save $dev_requirements
174174
- name: fetch build artifact
175175
# see https://github.com/actions/download-artifact
176-
uses: actions/download-artifact@v7
176+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
177177
with:
178178
name: dist
179179
path: dist
@@ -182,7 +182,7 @@ jobs:
182182
- name: artifact npm errors
183183
if: ${{ failure() }}
184184
# see https://github.com/actions/upload-artifact
185-
uses: actions/upload-artifact@v6
185+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
186186
with:
187187
name: 'npm-errors_${{ matrix.os }}_node${{ matrix.node-version }}'
188188
path: '/home/runner/.npm/_logs/*.log'
@@ -202,7 +202,7 @@ jobs:
202202
- name: artifact test reports
203203
if: ${{ ! cancelled() }}
204204
# see https://github.com/actions/upload-artifact
205-
uses: actions/upload-artifact@v6
205+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
206206
with:
207207
name: '${{ env.TESTS_REPORTS_ARTIFACT }}_${{ matrix.os }}_node${{ matrix.node-version }}'
208208
path: ${{ env.REPORTS_DIR }}
@@ -222,16 +222,16 @@ jobs:
222222
steps:
223223
- name: Checkout
224224
# see https://github.com/actions/checkout
225-
uses: actions/checkout@v6
225+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
226226
- name: Setup Node.js ${{ env.NODE_ACTIVE_LTS }}
227227
# see https://github.com/actions/setup-node
228-
uses: actions/setup-node@v6
228+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
229229
with:
230230
node-version: ${{ env.NODE_ACTIVE_LTS }}
231231
package-manager-cache: false
232232
- name: fetch build artifact
233233
# see https://github.com/actions/download-artifact
234-
uses: actions/download-artifact@v7
234+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
235235
with:
236236
name: dist
237237
path: dist
@@ -251,7 +251,7 @@ jobs:
251251
steps:
252252
- name: fetch test artifacts
253253
# see https://github.com/actions/download-artifact
254-
uses: actions/download-artifact@v7
254+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
255255
with:
256256
pattern: '${{ env.TESTS_REPORTS_ARTIFACT }}_*'
257257
merge-multiple: true
@@ -262,7 +262,7 @@ jobs:
262262
## see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-secrets
263263
if: ${{ env.CODACY_PROJECT_TOKEN != '' }}
264264
# see https://github.com/codacy/codacy-coverage-reporter-action
265-
uses: codacy/codacy-coverage-reporter-action@v1
265+
uses: codacy/codacy-coverage-reporter-action@89d6c85cfafaec52c72b6c5e8b2878d33104c699 # v1
266266
with:
267267
project-token: ${{ env.CODACY_PROJECT_TOKEN }}
268268
coverage-reports: ${{ env.REPORTS_DIR }}/coverage/*/*

.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
steps:
5252
- name: Checkout code
5353
# see https://github.com/actions/checkout
54-
uses: actions/checkout@v6
54+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
5555
- name: Configure Git
5656
# needed for push back of changes
5757
run: |
@@ -60,7 +60,7 @@ jobs:
6060
git config --local user.name "${GITHUB_ACTOR}"
6161
- name: Setup Node.js ${{ env.NODE_ACTIVE_LTS }}
6262
# see https://github.com/actions/setup-node
63-
uses: actions/setup-node@v6
63+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
6464
with:
6565
node-version: ${{ env.NODE_ACTIVE_LTS }}
6666
package-manager-cache: false
@@ -96,12 +96,12 @@ jobs:
9696
steps:
9797
- name: Checkout code
9898
# see https://github.com/actions/checkout
99-
uses: actions/checkout@v6
99+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
100100
with:
101101
ref: ${{ needs.bump.outputs.version }}
102102
- name: Setup Node.js ${{ env.NODE_ACTIVE_LTS }}
103103
# see https://github.com/actions/setup-node
104-
uses: actions/setup-node@v6
104+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
105105
with:
106106
node-version: ${{ env.NODE_ACTIVE_LTS }}
107107
package-manager-cache: false
@@ -134,7 +134,7 @@ jobs:
134134
npm pack --pack-destination "$PACKED_DIR"
135135
- name: artifact release result
136136
# see https://github.com/actions/upload-artifact
137-
uses: actions/upload-artifact@v6
137+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
138138
with:
139139
name: ${{ env.PACKED_ARTIFACT }}
140140
path: ${{ env.PACKED_DIR }}/
@@ -154,14 +154,14 @@ jobs:
154154
steps:
155155
- name: fetch release result
156156
# see https://github.com/actions/download-artifact
157-
uses: actions/download-artifact@v7
157+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
158158
with:
159159
name: ${{ env.PACKED_ARTIFACT }}
160160
path: ${{ env.ASSETS_DIR }}
161161
- name: Create Release
162162
id: release
163163
# see https://github.com/softprops/action-gh-release
164-
uses: softprops/action-gh-release@v2
164+
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2
165165
env:
166166
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
167167
with:

0 commit comments

Comments
 (0)