Skip to content

Commit c34dbb4

Browse files
authored
feat: Add zizmor pre-commit hook (#95)
* feat: Add zizmor pre-commit hook * chore: Update workflows based on zizmor audits
1 parent 7c24b7f commit c34dbb4

File tree

6 files changed

+18
-1
lines changed

6 files changed

+18
-1
lines changed

.github/workflows/pr_interu.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
- tools/interu/**
1212
- Cargo.toml
1313

14+
permissions: {}
15+
1416
jobs:
1517
build:
1618
uses: ./.github/workflows/build_interu.yml

.github/workflows/pr_pre-commit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ name: pre-commit
44
on:
55
pull_request:
66

7+
permissions: {}
8+
79
jobs:
810
pre-commit:
911
runs-on: ubuntu-latest

.github/workflows/release_interu.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
tags:
77
- "interu-[0-9]+.[0-9]+.[0-9]+**"
88

9+
permissions: {}
10+
911
jobs:
1012
build:
1113
uses: ./.github/workflows/build_interu.yml
@@ -23,6 +25,8 @@ jobs:
2325
release:
2426
runs-on: ubuntu-latest
2527
needs: [build]
28+
permissions:
29+
contents: write
2630
steps:
2731
- name: Download Artifacts
2832
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0

.github/workflows/smoke-build.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ on:
1515
- shard/action.yaml
1616
- smoke/*
1717

18+
permissions: {}
19+
1820
jobs:
1921
generate-matrix:
2022
name: Generate Version List

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ repos:
3333
hooks:
3434
- id: actionlint
3535

36+
- repo: https://github.com/zizmorcore/zizmor-pre-commit
37+
rev: 7fc963270df722f37707d47ff41265fe8f460822 # v1.20.0
38+
hooks:
39+
- id: zizmor
40+
args: ["--no-progress", "--min-confidence", "medium"]
41+
3642
- repo: local
3743
hooks:
3844
- id: update-readme-list

shard/action.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ runs:
3838
- name: Print Shards
3939
env:
4040
GITHUB_DEBUG: ${{ runner.debug }}
41+
VERSIONS: ${{ steps.generate_shards.outputs.VERSIONS }}
4142
shell: bash
4243
run: |
4344
set -euo pipefail
4445
[ -n "$GITHUB_DEBUG" ] && set -x
4546
46-
echo versions=${{ steps.generate_shards.outputs.VERSIONS }}
47+
echo "versions=$VERSIONS"

0 commit comments

Comments
 (0)