Skip to content

Commit 80d9a30

Browse files
authored
ci: drop redundant CodeQL scan, fix Scorecard ARM64 incompatibility (#1399)
* ci: drop redundant CodeQL scan, fix Scorecard ARM64 incompatibility codeql-action doesn't support Linux ARM64 (upstream: github/codeql-action#4072, #2700), and every codeql "actions" rule already maps to a zizmor audit running on ARM64 in ci.yml, so drop codeql.yml and raise zizmor's min-severity from high to medium to keep equivalent coverage. scorecard-action's amd64-only image has failed every scheduled run on ubuntu-24.04-arm since at least 2026-07-20 (ossf/scorecard-action#1697). Replace it with the checksum-verified linux_arm64 scorecard CLI binary, matching the existing cargo-semver-checks pattern, and upload SARIF via codeql-action/upload-sarif. Closes #1398 Signed-off-by: Hugues Clouâtre <hugues@linux.com> * ci: fix zizmor medium-severity findings surfaced by min-severity change Raising zizmor's min-severity to medium (this PR) surfaces two pre-existing findings unrelated to codeql/scorecard: - dtolnay/rust-toolchain is pinned to the "stable" branch tip but commented "# 1.97.1", which zizmor reads as a mismatched version comment since a branch literally named "1.97.1" points elsewhere. The actual desired version is already set via the "toolchain" input; correct the comment to "# stable" to match what's really pinned (matches the existing correct usage in update-deps.yml). - release.yml and release-repair.yml pass `secrets: inherit` into build-and-attest.yml, which only ever reads the auto-provided GITHUB_TOKEN. Drop the unneeded blanket secret grant. Signed-off-by: Hugues Clouâtre <hugues@linux.com> --------- Signed-off-by: Hugues Clouâtre <hugues@linux.com>
1 parent 271542a commit 80d9a30

6 files changed

Lines changed: 24 additions & 55 deletions

File tree

.github/workflows/build-and-attest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
5050

5151
- name: Install Rust toolchain
52-
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # 1.97.1
52+
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
5353
with:
5454
toolchain: "1.97.1"
5555
targets: ${{ inputs.target }}

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jobs:
122122
- name: Checkout repository
123123
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
124124
- name: Install Rust toolchain
125-
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # 1.97.1
125+
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
126126
with:
127127
toolchain: "1.97.1"
128128
components: rustfmt, clippy
@@ -159,7 +159,7 @@ jobs:
159159
- name: Checkout repository
160160
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
161161
- name: Install Rust toolchain
162-
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # 1.97.1
162+
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
163163
with:
164164
toolchain: "1.97.1"
165165
components: llvm-tools-preview
@@ -232,7 +232,7 @@ jobs:
232232
- name: Checkout repository
233233
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
234234
- name: Install Rust toolchain
235-
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # 1.97.1
235+
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
236236
with:
237237
toolchain: "1.97.1"
238238
- name: Setup Rust cache
@@ -257,7 +257,7 @@ jobs:
257257
with:
258258
advanced-security: false
259259
annotations: true
260-
min-severity: high
260+
min-severity: medium
261261

262262
semver-checks:
263263
name: semver checks

.github/workflows/codeql.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/release-repair.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ jobs:
6161
cross: false
6262
version: ${{ inputs.version }}
6363
dry_run: ${{ inputs.dry_run }}
64-
secrets: inherit
6564

6665
build-aarch64-unknown-linux-musl:
6766
name: Build aarch64-unknown-linux-musl
@@ -77,7 +76,6 @@ jobs:
7776
cross: true
7877
version: ${{ inputs.version }}
7978
dry_run: ${{ inputs.dry_run }}
80-
secrets: inherit
8179

8280
build-x86_64-unknown-linux-musl:
8381
name: Build x86_64-unknown-linux-musl
@@ -93,7 +91,6 @@ jobs:
9391
cross: true
9492
version: ${{ inputs.version }}
9593
dry_run: ${{ inputs.dry_run }}
96-
secrets: inherit
9794

9895
update-homebrew:
9996
name: Update Homebrew Formula

.github/workflows/release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ jobs:
151151
cross: ${{ matrix.cross }}
152152
version: ${{ needs.create-release.outputs.version }}
153153
dry_run: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run == true }}
154-
secrets: inherit
155154

156155
update-homebrew:
157156
name: Update Homebrew Formula
@@ -443,7 +442,7 @@ jobs:
443442
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
444443

445444
- name: Install Rust stable
446-
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # 1.97.1
445+
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
447446
with:
448447
toolchain: "1.97.1"
449448

.github/workflows/scorecard.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,29 @@ jobs:
1515
permissions:
1616
contents: read
1717
security-events: write
18-
id-token: write
1918
steps:
2019
- name: Checkout repository
2120
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
2221
with:
2322
persist-credentials: false
2423

24+
- name: Install Scorecard CLI
25+
env:
26+
VERSION: "5.5.0"
27+
SHA256: "3ce59d20c1d53e540c4a14e0da1e0d96b3b294e8ddc96a3c5a7b8a637b32991e"
28+
run: |
29+
curl -fsSL "https://github.com/ossf/scorecard/releases/download/v${VERSION}/scorecard_${VERSION}_linux_arm64.tar.gz" \
30+
-o scorecard.tar.gz
31+
echo "${SHA256} scorecard.tar.gz" | sha256sum -c -
32+
tar -xzf scorecard.tar.gz
33+
2534
- name: Run OpenSSF Scorecard
26-
uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
35+
env:
36+
ENABLE_SARIF: "1"
37+
GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
run: ./scorecard --repo=github.com/clouatre-labs/aptu-coder --format=sarif --show-details > results.sarif
39+
40+
- name: Upload SARIF results
41+
uses: github/codeql-action/upload-sarif@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7
2742
with:
28-
results_file: results.sarif
29-
results_format: sarif
30-
publish_results: true
43+
sarif_file: results.sarif

0 commit comments

Comments
 (0)