Skip to content

Commit 2b91771

Browse files
dopeyclaude
andcommitted
ci: auto-enable zizmor GHAS upload for public repos
Move advanced-security auto-detection into zizmor.yml so any caller benefits. Changes the input type from boolean to string (default "") to distinguish "not set" from "false". When unset, enables GHAS upload for public repos via github.repository_visibility; explicit "true"/"false" overrides still work via boolean coercion. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 549b83b commit 2b91771

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.github/workflows/actionci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ on:
1414
type: boolean
1515
default: true
1616
zizmor-advanced-security:
17-
description: Upload zizmor results to GitHub Advanced Security
17+
description: Upload zizmor results to GitHub Advanced Security. Leave unset to auto-enable for public repos, or set to "true"/"false" to override.
1818
required: false
19-
type: boolean
20-
default: false
19+
type: string
20+
default: ""
2121

2222
permissions:
2323
contents: read

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
uses: ./.github/workflows/actionlint.yml
2525

2626
zizmor:
27-
name: Scan GitHub workflows
27+
name: Security Scan GitHub workflows
2828
uses: ./.github/workflows/zizmor.yml
2929

3030
frizbee:

.github/workflows/zizmor.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ on:
33
workflow_call:
44
inputs:
55
advanced-security:
6-
description: Upload results to GitHub Advanced Security
7-
type: boolean
8-
default: false
6+
description: Upload results to GitHub Advanced Security. Leave unset to auto-enable for public repos, or set to "true"/"false" to override.
7+
type: string
8+
default: ""
99

1010
jobs:
1111
zizmor:
@@ -20,4 +20,4 @@ jobs:
2020
with:
2121
min-severity: medium
2222
min-confidence: medium
23-
advanced-security: ${{ inputs.advanced-security }}
23+
advanced-security: ${{ (inputs.advanced-security == '' && github.repository_visibility == 'public') || inputs.advanced-security == 'true' }}

0 commit comments

Comments
 (0)