Skip to content

Commit 233cdf2

Browse files
committed
ci: zizmor
Signed-off-by: Weston Steimel <author@code.w.steimel.me.uk>
1 parent 990da9e commit 233cdf2

File tree

5 files changed

+58
-18
lines changed

5 files changed

+58
-18
lines changed

.github/dependabot.yml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
version: 2
2-
32
updates:
3+
44
- package-ecosystem: "github-actions"
5-
directories:
6-
- "/"
5+
open-pull-requests-limit: 10
6+
directory: "/.github/actions/bootstrap"
7+
schedule:
8+
interval: "daily"
79
cooldown:
810
default-days: 7
9-
schedule:
10-
interval: "weekly"
11-
day: "friday"
11+
12+
- package-ecosystem: "github-actions"
1213
open-pull-requests-limit: 10
13-
labels:
14-
- "dependencies"
15-
groups:
16-
actions-minor-patch:
17-
applies-to: version-updates # security updates get individual PRs
18-
patterns:
19-
- "*"
20-
update-types: # major omitted, gets individual PRs
21-
- "minor"
22-
- "patch"
14+
directory: "/.github/workflows"
15+
schedule:
16+
interval: "daily"
17+
cooldown:
18+
default-days: 7

.github/workflows/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ jobs:
3434
- name: Render the vulnerability index specs sqlite
3535
run: anchore-security-cli -v vuln-index spec render --data-path data -o ${{ runner.temp }}/vuln-index-specs
3636
- name: Login to GHCR via oras
37-
run: echo ${{ secrets.GITHUB_TOKEN }} | oras login ghcr.io --username ${{ github.actor }} --password-stdin
37+
run: echo ${{ secrets.GITHUB_TOKEN }} | oras login ghcr.io --username "${GITHUB_ACTOR}" --password-stdin
3838
- name: Publish the vulnerability index specs sqlite
3939
run: anchore-security-cli -vvv vuln-index spec publish --index-dir ${{ runner.temp }}/vuln-index-specs --deploy-to=development
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: "Validate GitHub Actions"
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '.github/workflows/**'
7+
- '.github/actions/**'
8+
push:
9+
branches:
10+
- main
11+
paths:
12+
- '.github/workflows/**'
13+
- '.github/actions/**'
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
zizmor:
20+
name: "Lint"
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
security-events: write # for uploading SARIF results
25+
steps:
26+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
27+
with:
28+
persist-credentials: false
29+
30+
- name: "Run zizmor"
31+
uses: zizmorcore/zizmor-action@0dce2577a4760a2749d8cfb7a84b7d5585ebcb7d # v0.5.0
32+
with:
33+
config: .github/zizmor.yml
34+
# Disable SARIF upload so the step is a simple pass/fail gate
35+
advanced-security: false
36+
inputs: .github

.github/workflows/validations.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ jobs:
2323
- name: Install OS dependencies
2424
run: apk add --no-cache taplo
2525
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
26+
with:
27+
persist-credentials: false
2628
- name: Run schema validation
2729
run: taplo validate --schema file:${PWD}/schema/toml/0.1.0.schema.json
2830
- name: Run format validation
29-
run: taplo format --check
31+
run: taplo format --check

.github/zizmor.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
rules:
2+
unpinned-uses:
3+
config:
4+
policies:
5+
# anchore/workflows is an internal repository; using @main is acceptable
6+
anchore/*: any

0 commit comments

Comments
 (0)