Skip to content

Commit aae867d

Browse files
authored
feat(actions): add zizmor and actionlint (#636)
* fix(actions): zizmor fixes Signed-off-by: Adam Setch <adam.setch@outlook.com> * fix(actions): zizmor fixes Signed-off-by: Adam Setch <adam.setch@outlook.com> --------- Signed-off-by: Adam Setch <adam.setch@outlook.com>
1 parent 12d555c commit aae867d

File tree

3 files changed

+56
-8
lines changed

3 files changed

+56
-8
lines changed

.github/workflows/lint.yml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,45 @@ on:
66
- main
77
pull_request:
88

9-
permissions:
10-
contents: read
9+
permissions: {}
1110

1211
jobs:
13-
lint:
14-
name: biomejs
12+
lint-code:
13+
name: Lint Code [biomejs]
1514
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
1617

1718
steps:
1819
- name: Checkout
1920
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21+
with:
22+
persist-credentials: false
2023

2124
- name: Setup pnpm
2225
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
23-
26+
2427
- name: Setup Node
2528
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
2629
with:
27-
node-version-file: '.nvmrc'
28-
cache: 'pnpm'
30+
node-version-file: ".nvmrc"
31+
cache: "pnpm"
2932

3033
- run: pnpm install
3134
- run: pnpm lint:check
35+
36+
lint-actions:
37+
name: Lint GitHub Actions [actionlint]
38+
runs-on: ubuntu-latest
39+
permissions:
40+
contents: read
41+
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
45+
with:
46+
persist-credentials: false
47+
sparse-checkout: .github/
48+
49+
- name: GitHub Actions linter
50+
uses: docker://rhysd/actionlint:1.7.12@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667

.github/workflows/zizmor.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: GitHub Actions Security Analysis
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- "**"
10+
11+
permissions: {}
12+
13+
jobs:
14+
zizmor:
15+
name: Run zizmor 🌈
16+
runs-on: ubuntu-latest
17+
permissions:
18+
security-events: write # Required for upload-sarif (used by zizmor-action) to upload SARIF files.
19+
contents: read # Only needed for private repos. Needed to clone the repo.
20+
actions: read # Only needed for private repos. Needed for upload-sarif to read workflow run info.
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
24+
with:
25+
persist-credentials: false
26+
27+
- name: Run zizmor 🌈
28+
uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"recommendations": [
33
"astro-build.astro-vscode",
44
"biomejs.biome",
5-
"bradlc.vscode-tailwindcss"
5+
"bradlc.vscode-tailwindcss",
6+
"zizmor.zizmor-vscode"
67
]
78
}

0 commit comments

Comments
 (0)