Skip to content

Commit 9d5ba03

Browse files
maltesanderclaude
andauthored
ci: fix the security audit, and bump every pinned action (#2)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 57aa3bf commit 9d5ba03

4 files changed

Lines changed: 45 additions & 27 deletions

File tree

.github/workflows/build.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ jobs:
4343
steps:
4444
# The cargo-test pre-commit hook links libodbc via odbc-sys.
4545
- name: Install host dependencies
46-
uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1.6.0
46+
uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
4747
with:
4848
packages: unixodbc-dev
4949
# A cache key, not a runner label, but it tracks the runner image so
5050
# that bumping the image invalidates the cached .deb files.
5151
version: ubuntu-24.04
5252

53-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
53+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5454
with:
5555
persist-credentials: false
5656

@@ -61,14 +61,14 @@ jobs:
6161
components: rustfmt, clippy
6262

6363
- name: Setup Rust Cache
64-
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
64+
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
6565

6666
- name: Install cargo-deny and cargo-sort
67-
uses: taiki-e/install-action@97a5807a604e12de3a13b52d868ebecaeeea757c # v2.75.4
67+
uses: taiki-e/install-action@cb33e69fad06166ca28a42b2575e4dadabf62ee8 # v2.85.8
6868
with:
6969
tool: cargo-deny,cargo-sort
7070

71-
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
71+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
7272
with:
7373
python-version: "3.12"
7474

@@ -85,12 +85,12 @@ jobs:
8585
needs: [pre-commit]
8686
steps:
8787
- name: Install host dependencies
88-
uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1.6.0
88+
uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
8989
with:
9090
packages: unixodbc-dev unixodbc sqlite3
9191
version: ubuntu-24.04
9292

93-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
93+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
9494
with:
9595
persist-credentials: false
9696

@@ -100,10 +100,10 @@ jobs:
100100
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
101101

102102
- name: Setup Rust Cache
103-
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
103+
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
104104

105105
- name: Install uv
106-
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
106+
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
107107

108108
- name: Run SQLite integration tests
109109
run: |
@@ -116,7 +116,7 @@ jobs:
116116
runs-on: windows-2022
117117
timeout-minutes: 30
118118
steps:
119-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
119+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
120120
with:
121121
persist-credentials: false
122122

@@ -129,7 +129,7 @@ jobs:
129129
# A separate cache key: the Linux job's artefacts are a different target
130130
# triple and sharing the key would thrash both.
131131
- name: Setup Rust Cache
132-
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
132+
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
133133
with:
134134
key: windows-gnu-test
135135

@@ -167,7 +167,7 @@ jobs:
167167
- name: Install MinGW cross-compiler
168168
run: sudo apt-get update && sudo apt-get install -y gcc-mingw-w64-x86-64 unixodbc-dev
169169

170-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
170+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
171171
with:
172172
persist-credentials: false
173173

@@ -178,7 +178,7 @@ jobs:
178178
targets: x86_64-pc-windows-gnu
179179

180180
- name: Setup Rust Cache
181-
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
181+
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
182182
with:
183183
key: windows-gnu
184184

.github/workflows/release.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
outputs:
3434
version: ${{ steps.extract.outputs.version }}
3535
steps:
36-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
36+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3737
with:
3838
persist-credentials: false
3939

@@ -58,12 +58,12 @@ jobs:
5858
needs: [verify-version]
5959
steps:
6060
- name: Install host dependencies
61-
uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1.6.0
61+
uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
6262
with:
6363
packages: unixodbc-dev unixodbc sqlite3
6464
version: ubuntu-24.04
6565

66-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
66+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
6767
with:
6868
persist-credentials: false
6969

@@ -73,10 +73,10 @@ jobs:
7373
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
7474

7575
- name: Setup Rust Cache
76-
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
76+
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
7777

7878
- name: Install uv
79-
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
79+
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
8080

8181
- name: Run SQLite integration tests
8282
run: |
@@ -100,7 +100,7 @@ jobs:
100100
sudo apt-get update
101101
sudo apt-get install -y unixodbc-dev gcc-mingw-w64-x86-64 zip
102102
103-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
103+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
104104
with:
105105
persist-credentials: false
106106

@@ -111,15 +111,15 @@ jobs:
111111
targets: x86_64-pc-windows-gnu
112112

113113
- name: Setup Rust Cache
114-
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
114+
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
115115
with:
116116
key: release
117117

118118
# packaging/sbom.sh reads the .dep-v0 section cargo-auditable embeds, and
119119
# refuses an artifact without one. Both tools are therefore preconditions
120120
# of packaging, not optional extras.
121121
- name: Install cargo-auditable
122-
uses: taiki-e/install-action@97a5807a604e12de3a13b52d868ebecaeeea757c # v2.75.4
122+
uses: taiki-e/install-action@cb33e69fad06166ca28a42b2575e4dadabf62ee8 # v2.85.8
123123
with:
124124
tool: cargo-auditable@${{ env.CARGO_AUDITABLE_VERSION }}
125125

@@ -212,7 +212,7 @@ jobs:
212212
sbom-path: packaging/dist/stackable-odbc-sqlite-${{ needs.verify-version.outputs.version }}-windows-x64.cdx.json
213213

214214
- name: Upload archives as workflow artifacts
215-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
215+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
216216
with:
217217
name: release-archives
218218
path: packaging/dist/*
@@ -227,7 +227,7 @@ jobs:
227227
contents: write
228228
steps:
229229
- name: Download archives
230-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
230+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
231231
with:
232232
name: release-archives
233233
path: dist
@@ -244,7 +244,7 @@ jobs:
244244
fi
245245
246246
- name: Create GitHub Release
247-
uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2
247+
uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
248248
with:
249249
tag_name: ${{ github.ref_name }}
250250
name: stackable-odbc-sqlite ${{ needs.verify-version.outputs.version }}

.github/workflows/scorecard.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
contents: read
3333
actions: read
3434
steps:
35-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
35+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3636
with:
3737
persist-credentials: false
3838

@@ -44,6 +44,6 @@ jobs:
4444
publish_results: true
4545

4646
- name: Upload results to code scanning
47-
uses: github/codeql-action/upload-sarif@a2983b8bed1923f44751c5c43237f479442827b3 # v3.37.4
47+
uses: github/codeql-action/upload-sarif@404bd795832c959ffb8efae2b1b4cc1aafc82058 # v3.37.6
4848
with:
4949
sarif_file: results.sarif

.github/workflows/security_audit.yaml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,35 @@ on:
77
- cron: '15 4 * * *'
88
workflow_dispatch:
99

10+
# rustsec/audit-check reports findings by opening a GitHub issue, and records a
11+
# check run. With contents:read alone it cannot do either, so a new advisory
12+
# would fail silently and the job's green status would mean nothing.
1013
permissions:
1114
contents: read
15+
issues: write
16+
checks: write
1217

1318
jobs:
1419
audit:
1520
runs-on: ubuntu-24.04
1621
steps:
17-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
22+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1823
with:
1924
persist-credentials: false
2025

26+
# rustsec/audit-check looks for `cargo-audit` on PATH and falls back to a
27+
# bare `cargo install cargo-audit` when it is missing. That fallback
28+
# passes no `--locked`, so it resolves cargo-audit's dependencies fresh
29+
# and pulls in whatever versions are current, several of which now
30+
# require a newer rustc than the 1.95.0 that rust-toolchain.toml pins for
31+
# this repository. Installing a prebuilt binary first satisfies the PATH
32+
# lookup, so the action never compiles cargo-audit and the pin no longer
33+
# constrains a tool that only ever reads Cargo.lock.
34+
- name: Install cargo-audit
35+
uses: taiki-e/install-action@cb33e69fad06166ca28a42b2575e4dadabf62ee8 # v2.85.8
36+
with:
37+
tool: cargo-audit
38+
2139
# This `token` is the action's own input, not checkout's: audit-check
2240
# needs it to post the advisory annotations onto the run.
2341
- uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212993eecbe998 # v2.0.0

0 commit comments

Comments
 (0)