-
Notifications
You must be signed in to change notification settings - Fork 312
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Objective
Evaluate and implement a framework-level fix for the systemic secrets-outside-env zizmor MEDIUM finding affecting all 177 workflows (3,813 findings). The fix should be made in the workflow compiler to emit secrets via env: blocks rather than directly in run: scripts.
Context
Source: Static Analysis Report - 2026-03-22
Vulnerability: secrets-outside-env — Secrets referenced in run: scripts without a dedicated env: block, exposing them in process listings.
Scale: 3,813 findings across all 177 workflows — this is a systemic pattern in the compiled .lock.yml output generated by the framework.
Current pattern (in generated lock files):
- name: Run step
run: |
echo "${{ secrets.SOME_SECRET }}" | some-commandRequired pattern (zizmor-compliant):
- name: Run step
env:
SOME_SECRET: ${{ secrets.SOME_SECRET }}
run: |
echo "$SOME_SECRET" | some-commandApproach
- Investigate compiler output: Find where secrets are injected into
run:blocks in the compiler (pkg/workflow/compiler_yaml.goor related files) - Identify all secret patterns: Look for
${{ secrets.* }}usage in compiled templates - Implement
env:block generation: Modify the compiler to:- Extract secret references from
run:scripts - Add them to a step-level
env:block - Replace
${{ secrets.X }}with$SECRETS_X(or similar safe env var name) in the script
- Extract secret references from
- Test: Compile a representative set of workflows and verify zizmor no longer reports
secrets-outside-env - Run
make recompileand validate
Files to Investigate
pkg/workflow/compiler_yaml.go— main YAML generation logicpkg/workflow/expression_extraction.go— expression/secret extractionactions/setup/sh/*.sh— check if any setup scripts also have this pattern
Acceptance Criteria
- The compiler generates
env:blocks for secrets instead of inline${{ secrets.* }}inrun:scripts -
make recompileregenerates all 177 workflows with the new pattern - Zizmor
secrets-outside-envfindings drop from ~3,813 to near 0 - All existing tests still pass (
make test-unit) - Generated workflows still function correctly in CI
Generated by Plan Command for issue #discussion #22240 · ◷
- expires on Mar 24, 2026, 8:48 AM UTC
Reactions are currently unavailable
Metadata
Metadata
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.