Skip to content

Commit 16bf29f

Browse files
tashianclaude
andauthored
Add actionci.yml (#306)
* Add zizmor and frizbee CI checks Add caller workflows for zizmor (security scanning) and frizbee (action pinning verification). Fix zizmor findings where applicable and add suppression config for intentional patterns. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add explicit permissions blocks, remove excessive-permissions ignores Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Replace zizmor line-number ignores with policies Use unpinned-uses config.policies with org-level wildcard and secrets-inherit disable instead of brittle per-line ignores that break whenever workflow files change. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Disable ref-confusion audit The ref-confusion audit crashes when workflows reference private repos (e.g. internal-workflows, robot) because the GITHUB_TOKEN lacks cross-repo access. Disable until zizmor supports scoping this audit or we provide a broader token. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add security-events: write to zizmor caller workflow The caller workflow's permissions are the ceiling for reusable workflows. The zizmor-action needs security-events: write to upload SARIF results to GitHub Advanced Security. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * ci: Replace separate actionlint/zizmor/frizbee with actionci.yml Consolidate the three separate workflow files into a single actionci.yml that calls the shared workflow from smallstep/workflows. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * ci: Pin unpinned actions in release.yml Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * ci: Remove accidentally included publish-packages.yml Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Move codeql permissions to job level to satisfy zizmor Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 55df28d commit 16bf29f

File tree

6 files changed

+57
-21
lines changed

6 files changed

+57
-21
lines changed

.github/workflows/actionci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Action CI
2+
3+
on:
4+
push:
5+
tags-ignore:
6+
- 'v*'
7+
branches:
8+
- "main"
9+
pull_request:
10+
workflow_call:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
actionci:
18+
permissions:
19+
contents: read
20+
security-events: write
21+
uses: smallstep/workflows/.github/workflows/actionci.yml@main
22+
secrets: inherit

.github/workflows/actionlint.yml

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

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,15 @@ concurrency:
1313
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1414
cancel-in-progress: true
1515

16+
permissions:
17+
contents: read
18+
1619
jobs:
1720
ci:
21+
permissions:
22+
actions: read
23+
contents: read
24+
security-events: write
1825
uses: smallstep/workflows/.github/workflows/goCI.yml@main
1926
with:
2027
only-latest-golang: false

.github/workflows/code-scan-cron.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ on:
22
schedule:
33
- cron: '0 0 * * SUN'
44

5+
permissions:
6+
actions: read
7+
contents: read
8+
security-events: write
9+
510
jobs:
611
code-scan:
712
uses: smallstep/workflows/.github/workflows/code-scan.yml@main

.github/workflows/release.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
tags:
77
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
ci:
1114
uses: smallstep/step-kms-plugin/.github/workflows/ci.yml@main
@@ -14,6 +17,8 @@ jobs:
1417
create_release:
1518
name: Create Release
1619
needs: ci
20+
permissions:
21+
contents: write
1722
runs-on: ubuntu-latest
1823
env:
1924
DOCKER_IMAGE: smallstep/step-kms-plugin
@@ -30,9 +35,11 @@ jobs:
3035
steps:
3136
- name: Is Pre-release
3237
id: is_prerelease
38+
env:
39+
REF: ${{ github.ref }}
3340
run: |
3441
set +e
35-
echo ${{ github.ref }} | grep "\-rc.*"
42+
echo "${REF}" | grep "\-rc.*"
3643
OUT=$?
3744
if [ $OUT -eq 0 ]; then IS_PRERELEASE=true; else IS_PRERELEASE=false; fi
3845
echo "IS_PRERELEASE=${IS_PRERELEASE}" >> "${GITHUB_OUTPUT}"
@@ -110,15 +117,15 @@ jobs:
110117
- name: Authenticate to Google Cloud
111118
if: ${{ needs.create_release.outputs.is_prerelease == 'false' }}
112119
id: gcloud-auth
113-
uses: google-github-actions/auth@v3
120+
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3
114121
with:
115122
token_format: access_token
116123
workload_identity_provider: ${{ secrets.GOOGLE_CLOUD_WORKLOAD_IDENTITY_PROVIDER }}
117124
service_account: ${{ secrets.GOOGLE_CLOUD_GITHUB_SERVICE_ACCOUNT }}
118125

119126
- name: Set up Google Cloud SDK
120127
if: ${{ needs.create_release.outputs.is_prerelease == 'false' }}
121-
uses: google-github-actions/setup-gcloud@v3
128+
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3
122129
with:
123130
project_id: ${{ secrets.GOOGLE_CLOUD_PACKAGES_PROJECT_ID }}
124131

@@ -131,7 +138,7 @@ jobs:
131138
echo 'IS_PRERELEASE=${{ needs.create_release.outputs.is_prerelease }}' >> "${GITHUB_ENV}"
132139
133140
- name: Run GoReleaser Pro
134-
uses: goreleaser/goreleaser-action@v7.0.0
141+
uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7.0.0
135142
with:
136143
distribution: goreleaser-pro
137144
version: v2.8.1

.github/zizmor.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
rules:
2+
unpinned-uses:
3+
config:
4+
policies:
5+
"smallstep/*": ref-pin
6+
secrets-inherit:
7+
disable: true
8+
ref-confusion:
9+
disable: true
10+
dangerous-triggers:
11+
ignore:
12+
- triage.yml

0 commit comments

Comments
 (0)