-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
5 / 55 of 5 issues completedClosed
5 / 55 of 5 issues completed
Copy link
Description
Overview
This tracking issue covers fixing template injection vulnerabilities identified in the static analysis report by implementing Option 1: Avoid envsubst Entirely (Recommended) using an in-place template rewrite strategy.
Source: Discussion #5735
Background
The static analysis identified 12 template injection vulnerabilities across 8 workflows where envsubst is used on potentially untrusted data from GitHub Actions expressions like ${{ needs.*.outputs.* }}.
Solution Approach
Replace envsubst with a safer in-place template substitution method that:
- Writes the template content to the target file first with placeholder tokens (e.g.,
__VAR_NAME__) - Uses
sedor Python to perform safe string replacement without shell expansion - Writes the result back to the same file (no
.templatefiles) - Prevents code injection by treating all content as literal strings
Affected Workflows
breaking-change-checker.md- 1 instancechangeset.md- 1 instancecloclo.md- 1 instance⚠️ HIGH severitycopilot-pr-merged-report.md- 2 instancesdaily-performance-summary.md- 2 instancesdev.md- 2 instancesduplicate-code-detector.md- 1 instancetest-python-safe-input.md- 2 instances
Planned Tasks
- Fix template injection in
cloclo.md(highest priority) - Fix template injection in single-instance workflows
- Fix template injection in multi-instance workflows
- Validate fixes and test with malicious input
- Update documentation and prevention guidelines
Success Criteria
- All 8 workflows updated to use safe substitution
- No
.templatefiles created - Workflows pass static analysis (zizmor scan)
- Test cases validate protection against injection
- Documentation updated with secure patterns
AI generated by Plan Command for discussion #5735