Skip to content

Commit fedfe57

Browse files
Copilotjkowalleck
andauthored
chore(actions): pin workflow actions to immutable commit SHAs (#386)
### Description Pin all GitHub Actions `uses:` references from floating tags to immutable commit SHAs. This prevents unexpected upstream changes while preserving the original tag in an inline comment so Dependabot can continue proposing version updates. **Actions pinned:** - `actions/checkout` → `de0fac2e4500dabe0009e67214ff5f5447ce83dd` (`# v6`) - `actions/setup-node` → `53b83947a5a98c8d113130e565377fae1a50d02f` (`# v6`) - `pnpm/action-setup` → `fc06bc1257f339d1d5d8b3a19a8cae5388b55320` (`# v4.4.0`) - `softprops/action-gh-release` → `3bb12739c298aeb8a4eeaf626c5b8d85266b0e65` (`# v2`) Resolves or fixes issue: #385 ### AI Tool Disclosure - [x] My contribution includes AI-generated content, as disclosed below: - AI Tools: `GitHub Copilot (coding agent)` - LLMs and versions: `Claude Sonnet 4.5` - Prompts: `Pin GitHub Actions to commit SHAs while keeping tag references for Dependabot detectability` ### Affirmation - [x] My code follows the [CONTRIBUTING.md](https://github.com/CycloneDX/cyclonedx-node-module/blob/master/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> Co-authored-by: Jan Kowalleck <jan.kowalleck@gmail.com>
1 parent c44f97f commit fedfe57

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

.github/workflows/nodejs.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ jobs:
5454
steps:
5555
- name: Checkout
5656
# see https://github.com/actions/checkout
57-
uses: actions/checkout@v6
57+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
5858
- name: Setup Node.js ${{ matrix.node-version }}
5959
# see https://github.com/actions/setup-node
60-
uses: actions/setup-node@v6
60+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
6161
with:
6262
node-version: ${{ matrix.node-version }}
6363
package-manager-cache: false # must not usecaches. we want the latest, always
@@ -95,10 +95,10 @@ jobs:
9595
steps:
9696
- name: Checkout
9797
## see https://github.com/actions/checkout
98-
uses: actions/checkout@v6
98+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
9999
- name: Setup Node.js ${{ matrix.node-version }}
100100
# see https://github.com/actions/setup-node
101-
uses: actions/setup-node@v6
101+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
102102
with:
103103
node-version: ${{ matrix.node-version }}
104104
package-manager-cache: false # must not usecaches. we want the latest, always
@@ -137,16 +137,16 @@ jobs:
137137
steps:
138138
- name: Checkout
139139
# see https://github.com/actions/checkout
140-
uses: actions/checkout@v6
140+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
141141
- name: Setup Node.js ${{ matrix.node-version }}
142142
# see https://github.com/actions/setup-node
143-
uses: actions/setup-node@v6
143+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
144144
with:
145145
node-version: ${{ matrix.node-version }}
146146
package-manager-cache: false # must not usecaches. we want the latest, always
147147
- name: setup pnpm
148148
## see https://github.com/pnpm/action-setup
149-
uses: pnpm/action-setup@v4.4.0
149+
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
150150
with:
151151
version: ${{ matrix.pnpm-version }}
152152
- name: install project

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
steps:
4949
- name: Checkout code
5050
# see https://github.com/actions/checkout
51-
uses: actions/checkout@v6
51+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
5252
- name: Configure Git
5353
# needed for push back of changes
5454
run: |
@@ -57,7 +57,7 @@ jobs:
5757
git config --local user.name "${GITHUB_ACTOR}"
5858
- name: Setup Node.js ${{ env.NODE_ACTIVE_LTS }}
5959
# see https://github.com/actions/setup-node
60-
uses: actions/setup-node@v6
60+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
6161
with:
6262
node-version: ${{ env.NODE_ACTIVE_LTS }}
6363
package-manager-cache: false
@@ -93,12 +93,12 @@ jobs:
9393
steps:
9494
- name: Checkout code
9595
# see https://github.com/actions/checkout
96-
uses: actions/checkout@v6
96+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
9797
with:
9898
ref: ${{ needs.bump.outputs.version }}
9999
- name: Setup Node.js ${{ env.NODE_ACTIVE_LTS }}
100100
# see https://github.com/actions/setup-node
101-
uses: actions/setup-node@v6
101+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
102102
with:
103103
node-version: ${{ env.NODE_ACTIVE_LTS }}
104104
package-manager-cache: false
@@ -123,7 +123,7 @@ jobs:
123123
- name: Create Release
124124
id: release
125125
# see https://github.com/softprops/action-gh-release
126-
uses: softprops/action-gh-release@v2
126+
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2
127127
env:
128128
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
129129
with:

0 commit comments

Comments
 (0)