Skip to content

Commit 4dffe90

Browse files
tashianclaude
andauthored
Add actionci.yml (#91)
* Add actionci.yml Add caller workflow for actionci (actionlint + zizmor + frizbee). Add permissions blocks and zizmor suppression config. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Suppress dependabot-cooldown in zizmor config Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix zizmor errors: pin actions, fix bot-conditions, deduplicate permissions - Pin unpinned actions to SHA digests via frizbee - Fix spoofable bot actor checks (github.actor → github.event.pull_request.user.login) - Remove duplicate permissions blocks - Suppress low-confidence cache-poisoning findings - Pin postgres container image Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add permissions to triage.yml to fix zizmor excessive-permissions warning Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0dec1fc commit 4dffe90

6 files changed

Lines changed: 67 additions & 5 deletions

File tree

.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+
- "master"
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/ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,15 @@ on:
99
pull_request:
1010
workflow_call:
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
ci:
17+
permissions:
18+
actions: read
19+
contents: read
20+
security-events: write
1421
uses: smallstep/workflows/.github/workflows/goCI.yml@main
1522
with:
1623
only-latest-golang: false
@@ -22,7 +29,7 @@ jobs:
2229
runs-on: ubuntu-latest
2330
services:
2431
postgres:
25-
image: postgres
32+
image: postgres:17
2633
env:
2734
POSTGRES_USER: user
2835
POSTGRES_PASSWORD: password

.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/dependabot-auto-merge.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ permissions:
88
jobs:
99
dependabot:
1010
runs-on: ubuntu-latest
11-
if: ${{ github.actor == 'dependabot[bot]' }}
11+
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
1212
steps:
1313
- name: Dependabot metadata
1414
id: metadata
15-
uses: dependabot/fetch-metadata@v2.5.0
15+
uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a # v2.5.0
1616
with:
1717
github-token: "${{ secrets.GITHUB_TOKEN }}"
1818
- name: Enable auto-merge for Dependabot PRs

.github/workflows/triage.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,34 @@ on:
88
types:
99
- opened
1010

11+
permissions:
12+
contents: read
13+
issues: write
14+
pull-requests: write
15+
1116
jobs:
1217

1318
label:
1419
name: Label PR
20+
permissions:
21+
contents: read
22+
pull-requests: write
1523
runs-on: ubuntu-latest
1624
if: github.event_name == 'pull_request_target'
1725
steps:
18-
- uses: actions/labeler@v6.0.1
26+
- uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
1927
with:
2028
repo-token: "${{ secrets.GITHUB_TOKEN }}"
2129

2230
add-to-project:
2331
name: Add to Triage Project
32+
permissions:
33+
contents: read
34+
issues: write
35+
pull-requests: write
2436
runs-on: ubuntu-latest
2537
steps:
26-
- uses: actions/add-to-project@v1.0.2
38+
- uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2
2739
with:
2840
project-url: https://github.com/orgs/smallstep/projects/94
2941
github-token: ${{ secrets.TRIAGE_PAT }}

.github/zizmor.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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
13+
cache-poisoning:
14+
disable: true
15+
dependabot-cooldown:
16+
disable: true

0 commit comments

Comments
 (0)