Skip to content

Commit 2450f55

Browse files
authored
feat: Allow enforcement via GCS config (#26)
1 parent 1f03241 commit 2450f55

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/github_actions_scan.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,17 @@ jobs:
115115
id: 'identify-enforcement'
116116
shell: 'bash'
117117
run: |
118-
echo "enforce=${ZIZMOR_ENFORCE}" >> "$GITHUB_OUTPUT"
118+
FINAL_ENFORCE="${ZIZMOR_ENFORCE}"
119+
CONFIG_ENFORCE="$(yq eval '.google.enforce' zizmor-config.yaml)"
120+
if [[ "${CONFIG_ENFORCE}" = "true" || "${CONFIG_ENFORCE}" = "false" ]]; then
121+
echo "Using enforcment value from config: ${CONFIG_ENFORCE}"
122+
FINAL_ENFORCE="${CONFIG_ENFORCE}"
123+
fi
124+
echo "enforce=${FINAL_ENFORCE}" >> "$GITHUB_OUTPUT"
125+
- name: 'Remove non-standard google key'
126+
shell: 'bash'
127+
run: |
128+
yq 'del(.google)' -i zizmor-config.yaml
119129
- name: 'Rewrite mandatory to high in config'
120130
shell: 'bash'
121131
run: |

.github/workflows/test_github_actions_scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ jobs:
1616
wif_provider: 'projects/763312321262/locations/global/workloadIdentityPools/gitsec-gha-artifacts/providers/gitsec-gha-artifacts-provider'
1717
zizmor_result_bucket: 'zizmor-43e4'
1818
zizmor_config_bucket: 'zizmor-configs-06f3'
19-
zizmor_enforce: 'true'
19+
zizmor_enforce: 'false'

0 commit comments

Comments
 (0)