Skip to content

[compiler-threat-spec] spec: add CTR-017 Secret Leakage via Env Vars and CTR-018 Version Integrity Bypass#32538

Merged
pelikhan merged 1 commit into
mainfrom
spec/add-ctr-017-018-secret-leakage-version-bypass-ee3ef06497a95f5a
May 16, 2026
Merged

[compiler-threat-spec] spec: add CTR-017 Secret Leakage via Env Vars and CTR-018 Version Integrity Bypass#32538
pelikhan merged 1 commit into
mainfrom
spec/add-ctr-017-018-secret-leakage-version-bypass-ee3ef06497a95f5a

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Summary

Two implemented security validation rules were missing from the compiler threat detection specification (specs/compiler-threat-detection-spec.md). This PR adds them per the spec's Bidirectional sync principle: Implemented rules MUST appear in spec.

Threats Reviewed

Reviewed all compiler validation files in pkg/workflow/ against the existing CTR-001–CTR-016 catalog. Found two security validations with no corresponding CTR mapping:

Already Covered → Added to Spec

CTR-017 Secret Leakage via Environment Variables

  • Implementation: strict_mode_env_validation.go (validateEnvSecrets, validateEnvSecretsSection) and strict_mode_steps_validation.go (validateStepsSecrets)
  • Detects ${{ secrets.* }} expressions in top-level env:, engine.env (non-engine vars), and uncontrolled custom step fields that would expose secrets to the agent container
  • Warns in non-strict mode; rejects in strict mode
  • Tests: env_secrets_validation_test.go, jobs_secrets_validation_test.go

CTR-018 Version Integrity Bypass

  • Implementation: update_check_validation.go (validateUpdateCheck)
  • Detects check-for-updates: false which disables the compile-agentic version update check
  • Warns in non-strict mode; rejects in strict mode
  • Tests: update_check_validation_test.go

Rule IDs Added

  • CTR-017 — Secret Leakage via Environment Variables
  • CTR-018 — Version Integrity Bypass

Files Changed

  • specs/compiler-threat-detection-spec.md — version bumped 1.0.6 → 1.0.8; CTR-017/018 added to §4.1 catalog, §6.1 mapping table, §7.1 test ID catalog, and §9 change log

Tests

No implementation changes — spec-only update. Existing tests for the mapped implementations are already passing.

References:

Generated by 🔒 Daily Compiler Threat Spec Optimizer · ● 13.5M ·

  • expires on May 23, 2026, 3:33 AM UTC

…egrity Bypass

Two implemented security validation rules were missing from the compiler
threat detection specification:

- CTR-017 Secret Leakage via Environment Variables: covers
  strict_mode_env_validation.go (validateEnvSecrets) and
  strict_mode_steps_validation.go (validateStepsSecrets), which detect
  secrets expressions in env:, engine.env, and uncontrolled step fields
  that would expose secrets to the agent container.

- CTR-018 Version Integrity Bypass: covers update_check_validation.go
  (validateUpdateCheck), which warns/rejects when check-for-updates: false
  disables the compile-agentic version update check.

Also adds T-CTR-017 and T-CTR-018 test ID entries in Section 7.1,
extends the Section 6.1 implementation mapping table, updates the
mapping audit note, bumps spec version to 1.0.8, and adds change-log
entries for 1.0.7 and 1.0.8.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan pelikhan merged commit 5bf4118 into main May 16, 2026
@pelikhan pelikhan deleted the spec/add-ctr-017-018-secret-leakage-version-bypass-ee3ef06497a95f5a branch May 16, 2026 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant