Skip to content

Commit 5b2cb0b

Browse files
Copilotjkowalleck
andauthored
fix: address all zizmor security findings in GitHub Actions workflows
Agent-Logs-Url: https://github.com/CycloneDX/cyclonedx-python-lib/sessions/d81c6415-5af8-4064-9ff0-dbcbaa56a382 Co-authored-by: jkowalleck <2765863+jkowalleck@users.noreply.github.com>
1 parent f279d21 commit 5b2cb0b

3 files changed

Lines changed: 27 additions & 3 deletions

File tree

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ updates:
77
schedule:
88
interval: 'weekly'
99
day: 'saturday'
10+
cooldown:
11+
default-days: 7
1012
allow:
1113
- dependency-type: 'all'
1214
versioning-strategy: 'auto'
@@ -21,6 +23,8 @@ updates:
2123
schedule:
2224
interval: 'weekly'
2325
day: 'saturday'
26+
cooldown:
27+
default-days: 7
2428
labels: [ 'dependencies' ]
2529
commit-message:
2630
## prefix maximum string length of 15

.github/workflows/python.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
- name: Checkout
3535
# see https://github.com/actions/checkout
3636
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
37+
with:
38+
persist-credentials: false
3739
- name: Setup Python Environment
3840
# see https://github.com/actions/setup-python
3941
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
@@ -58,6 +60,8 @@ jobs:
5860
- name: Checkout
5961
# see https://github.com/actions/checkout
6062
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
63+
with:
64+
persist-credentials: false
6165
- name: Setup Python Environment
6266
# see https://github.com/actions/setup-python
6367
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
@@ -82,6 +86,8 @@ jobs:
8286
- name: Checkout
8387
# see https://github.com/actions/checkout
8488
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
89+
with:
90+
persist-credentials: false
8591
- name: Setup Python Environment
8692
# see https://github.com/actions/setup-python
8793
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
@@ -106,6 +112,8 @@ jobs:
106112
- name: Checkout
107113
# see https://github.com/actions/checkout
108114
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
115+
with:
116+
persist-credentials: false
109117
- name: Setup Python Environment
110118
# see https://github.com/actions/setup-python
111119
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
@@ -142,6 +150,8 @@ jobs:
142150
- name: Checkout
143151
# see https://github.com/actions/checkout
144152
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
153+
with:
154+
persist-credentials: false
145155
- name: Setup Python Environment
146156
# see https://github.com/actions/setup-python
147157
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
@@ -192,6 +202,8 @@ jobs:
192202
- name: Checkout
193203
# see https://github.com/actions/checkout
194204
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
205+
with:
206+
persist-credentials: false
195207
- name: Create reports directory
196208
run: mkdir ${{ env.REPORTS_DIR }}
197209
- name: Setup Python Environment
@@ -270,6 +282,8 @@ jobs:
270282
- name: Checkout
271283
# see https://github.com/actions/checkout
272284
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
285+
with:
286+
persist-credentials: false
273287
- name: Setup Python Environment
274288
# see https://github.com/actions/setup-python
275289
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6

.github/workflows/release.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ jobs:
4949
- name: Checkout code
5050
# see https://github.com/actions/checkout
5151
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
52+
with:
53+
persist-credentials: false
5254
- name: Setup Python Environment
5355
# see https://github.com/actions/setup-python
5456
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
@@ -71,6 +73,8 @@ jobs:
7173
- name: Checkout code
7274
# see https://github.com/actions/checkout
7375
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
76+
with:
77+
persist-credentials: false
7478
- name: Setup Python Environment
7579
# see https://github.com/actions/setup-python
7680
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
@@ -113,17 +117,19 @@ jobs:
113117
private-key: ${{ secrets.CDX_RELEASE_BOT_PRIVATE_KEY }}
114118
- name: Get GitHub App User ID
115119
id: release-bot-user-id
116-
run: |
117-
set -xeu
118-
echo "user-id=$(gh api "/users/${{ steps.release-bot-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
119120
env:
121+
APP_SLUG: ${{ steps.release-bot-token.outputs.app-slug }}
120122
GH_TOKEN: ${{ steps.release-bot-token.outputs.token }}
123+
run: |
124+
set -xeu
125+
echo "user-id=$(gh api "/users/${APP_SLUG}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
121126
122127
- name: Checkout code
123128
# see https://github.com/actions/checkout
124129
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
125130
with:
126131
fetch-depth: 0
132+
persist-credentials: false
127133
token: ${{ steps.release-bot-token.outputs.token }}
128134

129135
- name: Setup python

0 commit comments

Comments
 (0)