Skip to content

Commit 52f8acd

Browse files
hyperpolymathclaude
andcommitted
Merge branch 'chore/cicd-optimizations' — resolve boj-build conflict
Take SHA-pinned checkout and granular permissions from the CI branch. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2 parents 672186f + a9c2834 commit 52f8acd

19 files changed

Lines changed: 142 additions & 499 deletions

.github/workflows/boj-build.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
12
name: BoJ Server Build Trigger
23
on:
34
push:
45
branches: [main, master]
56
workflow_dispatch:
7+
permissions:
8+
contents: read
69
jobs:
710
trigger-boj:
811
runs-on: ubuntu-latest
912
steps:
1013
- name: Checkout
11-
uses: actions/checkout@v4
14+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
1215
- name: Trigger BoJ Server (Casket/ssg-mcp)
1316
run: |
1417
# Send a secure trigger to boj-server to build this repository
15-
curl -X POST "http://boj-server.local:7700/cartridges/ssg-mcp/invoke" -H "Content-Type: application/json" -d "{\"repo\": \"${{ github.repository }}\", \"branch\": \"${{ github.ref_name }}\", \"engine\": \"casket\\"}"}
18+
curl -X POST "http://boj-server.local:7700/cartridges/ssg-mcp/invoke" \
19+
-H "Content-Type: application/json" \
20+
-d "{\"repo\": \"${{ github.repository }}\", \"branch\": \"${{ github.ref_name }}\", \"engine\": \"casket\"}"
1621
continue-on-error: true
17-
permissions: read-all

.github/workflows/guix-nix-policy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
name: Guix/Nix Package Policy
33
on: [push, pull_request]
44

5-
permissions: read-all
5+
permissions:
6+
contents: read
67

78
jobs:
89
check:

.github/workflows/npm-bun-blocker.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
name: NPM/Bun Blocker
33
on: [push, pull_request]
44

5-
permissions: read-all
5+
permissions:
6+
contents: read
67

78
jobs:
89
check:

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ on:
1111
tags:
1212
- 'v*'
1313

14-
permissions: read-all
14+
permissions:
15+
contents: read
1516

1617
jobs:
1718
build:

.github/workflows/scorecard-enforcer.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ on:
99
- cron: '0 6 * * 1' # Weekly on Monday
1010
workflow_dispatch:
1111

12-
permissions: read-all
12+
permissions:
13+
contents: read
1314

1415
jobs:
1516
scorecard:

.github/workflows/scorecard.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ on:
88
push:
99
branches: [ main ]
1010

11-
permissions: read-all
11+
permissions:
12+
contents: read
1213

1314
jobs:
1415
analysis:

.github/workflows/secret-scanner.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ on:
77
push:
88
branches: [main]
99

10-
permissions: read-all
10+
permissions:
11+
contents: read
1112

1213
jobs:
1314
trufflehog:

.github/workflows/ts-blocker.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
name: TypeScript/JavaScript Blocker
33
on: [push, pull_request]
44

5-
permissions: read-all
5+
permissions:
6+
contents: read
67

78
jobs:
89
check:

.github/workflows/wellknown-enforcement.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ on:
1515
workflow_dispatch:
1616

1717

18-
permissions: read-all
18+
permissions:
19+
contents: read
1920

2021
jobs:
2122
validate:

.github/workflows/workflow-linter.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ on:
1111
- '.github/workflows/**'
1212
workflow_dispatch:
1313

14-
permissions: read-all
14+
permissions:
15+
contents: read
1516

1617
jobs:
1718
lint-workflows:
@@ -52,15 +53,16 @@ jobs:
5253
fi
5354
done
5455
if [ $failed -eq 1 ]; then
55-
echo "Add 'permissions: read-all' at workflow level"
56+
echo "Add 'permissions:
57+
contents: read' at workflow level"
5658
exit 1
5759
fi
5860
echo "All workflows have permissions declared"
5961

6062
- name: Check SHA-Pinned Actions
6163
run: |
6264
echo "=== Checking Action Pinning ==="
63-
unpinned=$(grep -rn "uses:" .github/workflows/ | \
65+
unpinned=$(grep -rnE "^[[:space:]]+uses:" .github/workflows/ | \
6466
grep -v "@[a-f0-9]\{40\}" | \
6567
grep -v "uses: \./\|uses: docker://\|uses: actions/github-script" || true)
6668

0 commit comments

Comments
 (0)