🔍 Static Analysis Report - 2025-12-07 #5735
Replies: 1 comment 1 reply
-
|
/plan apply "Option 1: Avoid envsubst Entirely (Recommended)" using template strategy. Write to the same file and rewrite. Do not create .template files. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
🔍 Static Analysis Report - 2025-12-07
Executive Summary
Comprehensive static analysis completed on 106 agentic workflows using three industry-standard security tools: zizmor (GitHub Actions security scanner), poutine (supply chain security analyzer), and actionlint (workflow linter).
Key Findings:
Analysis Summary
Tools Used
Findings by Tool and Severity
Zizmor Security Findings
template-injectionartipackedrelease.lock.ymlcache-poisoningrelease.lock.ymlWorkflows with template-injection:
breaking-change-checker.lock.ymlchangeset.lock.ymlcloclo.lock.yml(High severity)copilot-pr-merged-report.lock.ymldaily-performance-summary.lock.ymldev.lock.ymlduplicate-code-detector.lock.ymltest-python-safe-input.lock.ymlPoutine Supply Chain Findings
pr_runs_on_self_hostedunpinnable_actiongithub_action_from_unverified_creator_usedWorkflows with pr_runs_on_self_hosted (14 workflows, 70 job instances):
archie.lock.yml,changeset.lock.yml,cloclo.lock.yml,firewall-escape.lock.ymlgrumpy-reviewer.lock.yml,pr-nitpick-reviewer.lock.yml,q.lock.yml,scout.lock.ymlsmoke-claude.lock.yml,smoke-codex.lock.yml,smoke-copilot.lock.ymlsmoke-copilot-no-firewall.lock.yml,smoke-copilot-playwright.lock.yml,smoke-srt.lock.ymlUnverified Actions:
astral-sh/setup-uv(Python UV installer)cli/gh-extension-precompile(GitHub CLI extension)super-linter/super-linter(Code linter)Actionlint Linting Results
✅ No issues found - All workflows pass actionlint validation!
Top Priority Issue: Template Injection
Issue Details
Issue ID:
template-injectionSeverity: High (varies - some instances are informational)
Confidence: High (varies)
Affected: 8 workflows, 12 instances
Reference: (redacted)#template-injection
What is Template Injection?
Template injection occurs when user-controllable expressions are expanded in contexts where they can execute arbitrary code. In GitHub Actions, this typically happens when:
${{ needs.*.outputs.* }}is usedenvsubstVulnerable Pattern Example
From
cloclo.lock.yml:The Problem:
If
needs.activation.outputs.textcontains malicious content like$(malicious_command)or${VAR}, theenvsubstcommand will expand it, potentially executing arbitrary code.Full Fix Suggestion for Template Injection
Fix Prompt for Template Injection Vulnerability
Issue: Template injection via
envsubston untrusted dataSeverity: High (in some workflows)
Affected Workflows: 8 workflows with 12 instances
Vulnerability Description
Several workflows use
envsubstto process template content that includes environment variables populated from GitHub Actions expressions like${{ needs.*.outputs.* }}. These outputs can contain attacker-controlled data (especially in workflows triggered by pull requests or issues), which is then expanded byenvsubst, creating a code injection vulnerability.Security Impact
An attacker could:
/clocloor/changesetRequired Fixes
There are two approaches to fix this vulnerability:
Option 1: Avoid envsubst Entirely (Recommended)
Replace
envsubstwith a safer templating method that doesn't perform shell expansion. Use direct string substitution or a templating tool with proper escaping.Before (Vulnerable):
After (Fixed):
Or use a Python script:
Option 2: Sanitize Before envsubst
If
envsubstmust be used, sanitize the input to remove shell metacharacters:Affected Files and Locations
Apply fixes to these workflow source files (
.mdfiles, not.lock.yml):.github/workflows/breaking-change-checker.md- 1 instance.github/workflows/changeset.md- 1 instance.github/workflows/cloclo.md- 1 instance (HIGH severity).github/workflows/copilot-pr-merged-report.md- 2 instances.github/workflows/daily-performance-summary.md- 2 instances.github/workflows/dev.md- 2 instances.github/workflows/duplicate-code-detector.md- 1 instance.github/workflows/test-python-safe-input.md- 2 instancesTesting After Fix
After applying fixes:
gh aw compile$,`,\,$()Prevention
To prevent template injection in future workflows:
envsubston untrusted dataPoutine Findings Analysis
Self-Hosted Runner Usage (Acceptable Risk)
The 70 instances of
pr_runs_on_self_hostedfindings are by design and represent an acceptable risk for this repository:ubuntu-slimas a custom runner label for agentic workflowsUnpinnable Actions (Informational)
Three actions are flagged as "unpinnable" because they depend on mutable components:
.github/actions/daily-perf-improver/build-steps/action.yml.github/actions/daily-test-improver/coverage-steps/action.ymlpkg/workflow/js/node_modules/@actions/github-script/.github/actions/install-dependencies/action.ymlRecommendation: Document the dependency chain and monitor for updates.
Unverified Creator Actions (Informational)
Three actions from unverified creators are in use:
astral-sh/setup-uv- New Python package installer (gaining popularity)cli/gh-extension-precompile- Official GitHub CLI extension toolingsuper-linter/super-linter- Popular linting frameworkRecommendation:
Release Workflow Findings
The
release.lock.ymlworkflow has two unique findings:artipacked- Artifact packing vulnerability (details unclear from scan)cache-poisoning- Cache poisoning risk (details unclear from scan)Recommendation: Investigate these specific findings in detail. The zizmor tool flagged these but confidence/severity data is not available in the scan output.
Recommendations
Immediate Actions (High Priority)
Fix template injection vulnerabilities in 8 workflows
cloclo.lock.yml(marked High severity)Investigate release workflow findings
artipackedandcache-poisoningissuesShort-Term Actions (Medium Priority)
Document self-hosted runner security
ubuntu-slimrunnersMonitor unverified actions
Long-Term Actions (Strategic)
Integrate static analysis into CI/CD
Establish workflow security guidelines
Regular security scans
Historical Context
This is the first comprehensive static analysis scan of the repository's agentic workflows. Baseline established:
Future scans will compare against this baseline to track:
Scan Metadata
/tmp/gh-aw/cache-memory/security-scans/Next Steps
.md)Conclusion
Overall, the repository shows good security hygiene:
The findings are manageable and can be addressed systematically. The main focus should be on eliminating template injection vulnerabilities, which represent the highest risk.
Scan performed by: Static Analysis Report Agent (Claude Sonnet 4.5)
Cache Location:
/tmp/gh-aw/cache-memory/security-scans/2025-12-07-*.jsonTools Used: zizmor, poutine, actionlint via Docker
Beta Was this translation helpful? Give feedback.
All reactions