[compiler-threat-spec] spec: extend CTR rule catalog to CTR-006 through CTR-011#30922
Merged
pelikhan merged 1 commit intoMay 8, 2026
Merged
Conversation
Add six new rules to the compiler threat detection specification to reflect existing implementation coverage that was not yet represented in the spec: - CTR-006 Template Injection: expression-in-shell detection - CTR-007 Markdown Content Security: unicode/HTML/social-engineering scanning - CTR-008 Pull Request Target Safety: pwn-request prevention - CTR-009 Shell Expansion in Safe-Outputs: dangerous bash expansion at compile time - CTR-010 Expression Safety Allowlist: authorized expression enforcement - CTR-011 Network Firewall Configuration: firewall dependency validation Updated version to 1.0.1 and added change log entry. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR extends the compiler threat detection specification from 5 rules (CTR-001–005) to 11 rules (CTR-001–011), synchronizing the spec with six threat categories that already have compiler implementations but were not yet documented.
Threats Reviewed
Rule Details
template_injection_validation.godetects${{ ... }}expressions used directly inrun:shell steps (not viaenv:), preventing user-controlled data from flowing into shell execution context.markdown_security_scanner.goscans externally-sourced markdown for unicode abuse, hidden content, obfuscated links, HTML abuse, embedded scripts, and social engineering.pull_request_target_validation.goenforces checkout restrictions forpull_request_targettriggers and warns/errors on pwn-request risk in strict mode.safe_outputs_steps_shell_expansion_validation.gocatches dangerous bash expansions (${var@op},${!var},$(...), backticks) in safe-outputs run scripts at compile time.expression_safety_validation.goenforces an allowlist of approved expressions and rejects multi-line or unauthorized expressions.network_firewall_validation.govalidates firewall configuration dependencies and rejects invalid domain patterns.Files Changed
specs/compiler-threat-detection-spec.md— version bumped to 1.0.1, Section 4.1 and 6.1 extendedReferences: §25534953257