Skip to content

Commit af14514

Browse files
aksOpsclaude
andcommitted
ci: SHA-pin all actions + drop ci-java path filter to unblock required check
Two fixes flagged by code review of PR #131: 1. **Pin every `uses:` to a 40-char commit SHA** (Scorecard Pinned-Dependencies rule). New workflows landed with `@v4`/`@v5`/etc tags. Resolved each to the latest release commit SHA via `gh api repos/<owner>/<repo>/releases/latest`. Comments preserve the tag for readability: actions/checkout@de0fac2e... # v6.0.2 actions/setup-go@4a360112... # v6.4.0 actions/upload-artifact@043fb46d... # v7.0.1 actions/download-artifact@3e5f45b2... # v8.0.1 actions/attest-build-provenance@a2bbfa25... # v4.1.0 anchore/sbom-action@e22c3899... # v0.24.0 sigstore/cosign-installer@6f9f1778... # v4.1.2 goreleaser/goreleaser-action@1a80836c... # v7.2.1 2. **Remove `paths:` filter from ci-java.yml.** The `build` job name is a required check on main's branch protection. With the path filter, PRs that don't touch `src/**` or `pom.xml` (like the phase-5 release PR) cause the workflow to be skipped, which never reports a status — leaving "build" stuck at "Waiting for status to be reported" indefinitely and blocking merge. Java compile is ~1 minute with the Maven cache. The cost is worth the always-on signal until Phase 6 cutover deletes the Java tree. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 494343f commit af14514

3 files changed

Lines changed: 22 additions & 23 deletions

File tree

.github/workflows/ci-java.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,15 @@ name: Java CI
1414
on:
1515
push:
1616
branches: [main]
17-
paths:
18-
- 'src/**'
19-
- 'pom.xml'
20-
- '.github/workflows/ci-java.yml'
2117
pull_request:
2218
branches: [main]
23-
paths:
24-
- 'src/**'
25-
- 'pom.xml'
26-
- '.github/workflows/ci-java.yml'
19+
# NOTE: no `paths:` filter. The `build` job name is a required check
20+
# on main's branch protection, and a `paths:` filter would cause the
21+
# check to be skipped on PRs that don't touch Java — leaving the
22+
# required check stuck at "Waiting for status to be reported", which
23+
# blocks merge of every non-Java PR (e.g. PR #131 phase 5 release infra).
24+
# Java compile is ~1 minute; the cost is worth the always-on signal
25+
# until Phase 6 cutover deletes the Java tree entirely.
2726

2827
permissions: read-all
2928

.github/workflows/perf-gate.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ jobs:
4141
MIN_NODES: '40'
4242
MAX_PHANTOM_DROP_RATIO: '50'
4343
steps:
44-
- uses: actions/checkout@v4
45-
- uses: actions/setup-go@v5
44+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
45+
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
4646
with:
4747
go-version: '1.25.10'
4848
cache: true

.github/workflows/release-go.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ jobs:
4545
goarch: arm64
4646
runner: macos-14
4747
steps:
48-
- uses: actions/checkout@v4
48+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4949
with:
5050
fetch-depth: 0
51-
- uses: actions/setup-go@v5
51+
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
5252
with:
5353
go-version: '1.25.10'
5454
cache: true
@@ -57,10 +57,10 @@ jobs:
5757
if: runner.os == 'Linux'
5858
run: sudo apt-get update -y && sudo apt-get install -y build-essential
5959
- name: Install Syft (SBOM)
60-
uses: anchore/sbom-action/download-syft@v0
60+
uses: anchore/sbom-action/download-syft@e22c389904149dbc22b58101806040fa8d37a610 # v0.24.0
6161
- name: Install Cosign (signing)
62-
uses: sigstore/cosign-installer@v3
63-
- uses: goreleaser/goreleaser-action@v6
62+
uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
63+
- uses: goreleaser/goreleaser-action@1a80836c5c9d9e5755a25cb59ec6f45a3b5f41a8 # v7.2.1
6464
with:
6565
distribution: goreleaser
6666
version: '~> v2'
@@ -71,7 +71,7 @@ jobs:
7171
GOOS: ${{ matrix.os }}
7272
GOARCH: ${{ matrix.goarch }}
7373
- name: Upload binary artifact
74-
uses: actions/upload-artifact@v4
74+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
7575
with:
7676
name: codeiq-${{ matrix.os }}-${{ matrix.goarch }}
7777
path: dist/codeiq_*/codeiq*
@@ -85,26 +85,26 @@ jobs:
8585
needs: build
8686
runs-on: ubuntu-latest
8787
steps:
88-
- uses: actions/checkout@v4
88+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
8989
with:
9090
fetch-depth: 0
91-
- uses: actions/setup-go@v5
91+
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
9292
with:
9393
go-version: '1.25.10'
9494
cache: true
9595
cache-dependency-path: go/go.sum
9696
- name: Install build deps
9797
run: sudo apt-get update -y && sudo apt-get install -y build-essential
9898
- name: Install Syft (SBOM)
99-
uses: anchore/sbom-action/download-syft@v0
99+
uses: anchore/sbom-action/download-syft@e22c389904149dbc22b58101806040fa8d37a610 # v0.24.0
100100
- name: Install Cosign (signing)
101-
uses: sigstore/cosign-installer@v3
101+
uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
102102
- name: Download pre-built binaries
103-
uses: actions/download-artifact@v4
103+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
104104
with:
105105
pattern: codeiq-*
106106
path: prebuilt
107-
- uses: goreleaser/goreleaser-action@v6
107+
- uses: goreleaser/goreleaser-action@1a80836c5c9d9e5755a25cb59ec6f45a3b5f41a8 # v7.2.1
108108
with:
109109
distribution: goreleaser
110110
version: '~> v2'
@@ -119,6 +119,6 @@ jobs:
119119
HOMEBREW_TAP_REPO: homebrew-codeiq
120120
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
121121
- name: Attest release artifacts (build provenance)
122-
uses: actions/attest-build-provenance@v2
122+
uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
123123
with:
124124
subject-path: 'dist/codeiq_*.tar.gz'

0 commit comments

Comments
 (0)