Skip to content

Commit a222d10

Browse files
committed
ci: fix zizmor security analysis findings across workflows
Suppresses safe dangerous-triggers findings, resolves template injection via environment variables in reusable-release.yml, and adds explicit permissions to rules_sass-compiler-updates.yml.
1 parent 68ee503 commit a222d10

4 files changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/codeql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: 'CodeQL'
22

33
on:
44
push:
5+
# zizmor: ignore[dangerous-triggers] - {Trigger is safe as workflow does not checkout untrusted code}
56
pull_request_target:
67
schedule:
78
# Run every Sunday at 12:00

.github/workflows/dev-infra.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: DevInfra
22

33
on:
4+
# zizmor: ignore[dangerous-triggers] - {Trigger is safe as workflow does not checkout untrusted code}
45
pull_request_target:
56
types: [opened, synchronize, reopened]
67
issues:

.github/workflows/reusable-release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ jobs:
3333
# Step 1: Extract the ref of the running reusable workflow to use for checking out dev-infra actions.
3434
- name: Extract dev-infra ref
3535
id: get-ref
36+
env:
37+
WORKFLOW_REF: ${{ github.workflow_ref }}
3638
run: |
3739
# github.workflow_ref is of the form: "owner/repo/path/to/workflow.yml@ref"
3840
# Extract the ref (part after @)
39-
REF=$(echo "${{ github.workflow_ref }}" | cut -d'@' -f2)
41+
REF=$(echo "$WORKFLOW_REF" | cut -d'@' -f2)
4042
echo "ref=$REF" >> $GITHUB_OUTPUT
4143
4244
# Checkout the calling repository first to ensure there is a .git directory at the root,

.github/workflows/rules_sass-compiler-updates.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ on:
66
- cron: '0 */6 * * *'
77
workflow_dispatch: # Allows you to trigger it manually.
88

9+
permissions: {}
10+
911
jobs:
1012
build:
13+
permissions:
14+
contents: read
1115
strategy:
1216
fail-fast: false
1317
matrix:
@@ -38,6 +42,9 @@ jobs:
3842

3943
create_pr:
4044
needs: build
45+
permissions:
46+
contents: write
47+
pull-requests: write
4148
runs-on: ubuntu-latest
4249
defaults:
4350
run:

0 commit comments

Comments
 (0)