Skip to content

fix(github): supply-chain claims made true — live Dependabot, zizmor and workflow invocation contracts #861

Closed

Description

@dan-petty

Context & Rationale

Filed from the unchecked P0 entry at docs/ROADMAP.md:1058 (at 308a71f), which had no issue, so #739's migration would have dropped it (decision D9 of the 2026-10-01 agentic quality assessment).

Checked on 2026-10-01: the template-injection sites zizmor reports in update-prs.yml:91-108 interpolate workflow_dispatch inputs and github.ref_name. Only people with write access can supply those, and the /update comment body reaches only the job's if:. So they are not exploitable by an outside commenter today. Anyone can still trigger the workflow by commenting, which #754 restricts. The entry keeps its P0 rating because a privileged token (#842) would raise the stakes of every remaining injection site.

docs/SDLC.md:25,269 claims weekly Dependabot audits of active release branches, pip-audit and SLSA Level 3. Dependabot targets release/v0.2.14 (.github/dependabot.yml:10,25), which is gone from origin, and has never opened a PR; retargeting is manual (docs/ROUTINE_TASKS.md:274). devops ci maintain runs undeclared pip-audit (commands/ci.py:1014) and reports "found vulnerabilities" when it cannot start, while devops ci and CI already run uv audit (ci.py:351, ci.yml:45). Every remote uses: is SHA-pinned, but nothing enforces it: actionlint checks syntax and CodeQL actions (codeql.yml:46) misses dispatch-input and step-output injection. zizmor finds High template injection at release.yml:62 and update-prs.yml:91-108, a step holding PROJECT_TOKEN; this class already broke a release (94ee98d). No test resolves workflow or hook devops invocations; the help sweep is hand-written (tests/test_all_commands_help_dryrun.py:21).

Scope & Deliverables

  • Deliverable: (1) Retarget Dependabot, switch pip to the uv ecosystem, add a cooldown, and add an offline test that each target-branch equals release/v{project.version}. Change ci.py:1014 to uv audit; make tests/test_ci_maintain.py assert the argv and fail when the auditor cannot start. Remove the pip-audit and SLSA claims; enable alerts or correct SDLC.md:269. (2) Turn on sha_pinning_required. Pin zizmor in the dev group; run it --offline in devops ci and ci.yml, report-only until the five sites move their GitHub Actions expressions into env:, then block on template-injection, unpinned-uses and excessive-permissions, recording other rules' decisions with reasons in .github/zizmor.yml. Send its SARIF through "Publish Scanner Findings to Code Scanning". Pin off-lockfile installs: pre-commit at .devcontainer/Dockerfile:35, installer URLs at commands/devcontainer.py:697,709, tag revs at .pre-commit-config.yaml:6,37 (pre-commit autoupdate --freeze). Stop labelling external http:// URLs "✓ Safe" (security/reference_extractor.py:1048). (3) Add a contract test extracting every devops … invocation from workflows, composite actions and pre-commit entries, including ARGS+= tokens (update-prs.yml:92), resolving each statically via introspect_all_groups (docs/generator.py:347) and list_commands in one shared resolver, not a new walker.
  • Acceptance criteria: each deliverable lands with a test that fails before it; tests never touch the network; uv run devops ci passes. Measured in the roadmap entry: - rg -n '^\s*-?\s*uses:' .github/workflows .github/actions | grep -v 'uses: *\./' | wc -l: 19 remote refs, all SHA-pinned.; uvx --offline [email protected] --offline --format json .github/: 5 High-confidence High template-injection findings, no unpinned-uses.; .venv/bin/python probe/wf_probe.py: 13 devops invocations in workflows and pre-commit, all resolving.; .venv/bin/python probe/wf_probe_isinstance_check.py: an isinstance(click.Group) walk leaves 9 unresolved.
  • Key questions:
  • Constraint: ci is a FileOrSubcommandGroup (commands/ci.py:30) that treats an unknown token as a file, so devops --dry-run ci tset --help exits 0; resolution must be static. Typer 0.27.2 ships its own click, so an isinstance(click.Group) walk misses subcommands. A path may end at an invoke_without_command group (.pre-commit-config.yaml:72); assert a non-zero invocation count. Blocking every zizmor rule would fail: cache-poisoning contradicts tests/test_ci.py:520. Don't gate on vibes' is_external_endpoint: it flags only in-cluster service names, help-text hosts and the http://github.com/ prefix (config/constants.py:212), none egress. Tree-sitter floor drift (pyproject.toml:42-54) stays with uv tree --outdated; vibes' never-fired audit is not ported: skips are by design (update-prs.yml:37-42).

Strategic Alignment

  • Milestone: Backlog (no release)
  • Depends on: none. Source: docs/ROADMAP.md:1058 (308a71f).

Update 2026-10-08: refinement

Renovate replaced Dependabot, so the retarget and target-branch test go. docs/SDLC.md:25 claims audits, pip-audit and SLSA Level 3 the repo lacks. ci maintain runs the undeclared pip-audit and calls a start failure 'found vulnerabilities' (commands/ci.py:1738-1739).

  • SDLC.md claims nothing unreal; ci maintain runs uv audit and reports 'could not run'.
  • Pinned zizmor --offline blocks injection, unpinned uses and excessive permissions; SARIF waits for feat(review): publish scanner findings to code scanning #419.
  • No ${{ }} inside run: (release.yml:64, ci.yml:131); the contract test uses resolve_devops_argv.

Proposed design

Problem statement

The repository's SDLC documentation claims supply-chain security practices (weekly Dependabot audits, pip-audit, SLSA Level 3) that are not actually in place, and the ci maintain command runs an undeclared pip-audit binary while misreporting a start failure as 'found vulnerabilities'. GitHub Actions workflows contain template-injection sites where untrusted expressions are interpolated inside run: blocks, a class that already broke a release, yet no existing tool (actionlint, CodeQL) catches them. There is also no automated test verifying that devops invocations in workflows, composite actions, and pre-commit hooks resolve to real commands. This issue makes the supply-chain claims true by correcting the documentation, fixing the audit command to use uv audit, integrating a pinned zizmor gate that blocks on injection and pinning violations, eliminating the remaining ${{ }} interpolations in run: blocks, and adding a static contract test for workflow invocations.

Acceptance criteria

  • Criterion 1: SDLC.md no longer claims weekly Dependabot audits, pip-audit, or SLSA Level 3 that the repository does not implement.
    Verification: rg -n 'Dependabot|pip-audit|SLSA Level 3' docs/SDLC.md returns no matches, or only matches that accurately describe the current state (e.g. Renovate for dependency updates, uv audit for vulnerability scanning).
  • Criterion 2: ci maintain runs uv audit instead of pip-audit and reports 'could not run' (not 'found vulnerabilities') when the auditor cannot start.
    Verification: uv run pytest tests/test_ci_maintain.py passes; the test asserts the subprocess argv contains 'uv audit' and that a mocked start failure produces output containing 'could not run' and not 'found vulnerabilities'.
  • Criterion 3: A pinned zizmor version runs --offline in devops ci and in ci.yml, blocking on template-injection, unpinned-uses, and excessive-permissions; other rules' decisions are recorded with reasons in .github/zizmor.yml.
    Verification: uvx --offline zizmor@ --offline --format json .github/ exits non-zero on the five template-injection sites; .github/zizmor.yml exists and contains rule-level decisions with reasons; uv run devops ci passes with zizmor as a gate.
  • Criterion 4: No ${{ }} expressions appear inside run: blocks in release.yml and ci.yml; the affected expressions are moved to env: or otherwise eliminated.
    Verification: rg -n '${{' .github/workflows/release.yml .github/workflows/ci.yml | grep -i 'run:' returns no matches; a test or zizmor run confirms zero template-injection findings in those files.
  • Criterion 5: A contract test extracts every devops invocation from workflows, composite actions, and pre-commit entries (including ARGS+= tokens) and resolves each statically via introspect_all_groups and list_commands in one shared resolver.
    Verification: uv run pytest tests/test_workflow_contract.py (or equivalent) passes; the test asserts a non-zero invocation count (≥13) and that every extracted argv resolves to a real command, with no network access.
  • Criterion 6: All tests in this change run offline and uv run devops ci passes end-to-end.
    Verification: uv run devops ci completes with exit code 0 in an environment with no network access (e.g. --offline flag or network namespace isolation).

Key questions

  • Order against chore(github): required CI checks bind merges into release and main, and ADR 0004 records the verification policy #842: does this item's step 2 (move expressions into env:) land before any privileged token is stored for update-prs?: Yes. This item's step 2 (moving GitHub Actions expressions out of run: blocks into env:) must land before chore(github): required CI checks bind merges into release and main, and ADR 0004 records the verification policy #842 stores a privileged token for update-prs, because a privileged token would raise the stakes of every remaining injection site. (proposed)
  • Why must resolution of devops invocations be static rather than dynamic?: ci is a FileOrSubcommandGroup (commands/ci.py:30) that treats an unknown token as a file, so devops --dry-run ci tset --help exits 0; a dynamic invocation would not fail on a typo. Additionally, Typer 0.27.2 ships its own click, so an isinstance(click.Group) walk misses subcommands. Resolution must therefore be static via introspect_all_groups and list_commands. [sources: src/devops_cli/commands/ci.py:30, src/devops_cli/commands/ci.py:54]
  • Why can't every zizmor rule be blocked?: Blocking every zizmor rule would fail because the cache-poisoning rule contradicts the existing test at tests/test_ci.py:520. Only template-injection, unpinned-uses, and excessive-permissions are blocked; other rules' decisions are recorded with reasons in .github/zizmor.yml. [sources: tests/test_ci.py:520]
  • Why is the SARIF publishing step deferred?: SARIF publishing through 'Publish Scanner Findings to Code Scanning' waits for feat(review): publish scanner findings to code scanning #419, which provides the prerequisite infrastructure. This issue only runs zizmor and blocks on its findings. (proposed)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/security
    scope/github
    priority/p0-critical
    on Oct 1, 2026
  2. added
    priority/p1-high
    and removed
    priority/p0-critical
    on Oct 1, 2026
  3. dan-petty commented on Oct 1, 2026

    @dan-petty
    OwnerAuthor

    Re-rated from P0 to P1, by the owner's decision (2026-10-01). Only people with write access can reach the template-injection sites today. It must still land before any privileged token is stored for update-prs (#842).

  4. added this to the v0.2.28 milestone on Oct 1, 2026
  5. dan-petty commented on Oct 1, 2026

    @dan-petty
    OwnerAuthor

    Placement (2026-10-01): v0.2.28. Value High, Effort High. Not Ready yet.

    Checked against release/v0.2.24 at d38251e. What stops it being Ready:

  6. dan-petty commented on Oct 2, 2026

    @dan-petty
    OwnerAuthor

    More evidence for this issue from the devsecops review session 20261001-224227 (2026-10-02). Each finding below was triaged against release/v0.2.25 (c279c18), judged real and covered by this issue, and then upheld by a second agent that tried to refute it.

    • Inconsistent Supply-Chain Security Claims (docs/SDLC.md:25, re-rated LOW): The roadmap item at docs/ROADMAP.md:1206-1208 is not self-contradictory. It reports that docs/SDLC.md:25,269 claims weekly Dependabot audits, while .github/dependabot.yml:10,25 targets release/v0.2.14. That is still true: dependabot.yml has target-branch: "release/v0.2.14" for both ecosystems, SDLC.md:25 says 'weekly Dependabot vulnerability audits ... pip-audit' and SDLC.md:269 says it targets active release branches. The real defect is the false SDLC claim and the stale Dependabot target, and open issue fix(github): supply-chain claims made true — live Dependabot, zizmor and workflow invocation contracts #861 (v0.2.28, 'supply-chain claims made true — live Dependabot...') covers …
  7. removed this from the v0.2.28 milestone on Oct 6, 2026
  8. dan-petty-bot commented on Oct 6, 2026

    @dan-petty-bot
    Collaborator

    Moved to the backlog: it was New, not Ready, when v0.2.28 started. (devops roadmap reprioritize)

  9. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    Linked: #745. Renovate opens Docker and Actions PRs against the default branch with Python off (.github/renovate.json:9-12), so this item's Dependabot retarget has no subject; #745 decides which upgrades Renovate keeps opening. Found by the 2026-10-08 backlog review.

  10. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    Current sites for this item's "No ${{ }} inside run:" criterion, checked at v0.2.29 (af0a642) after the 2026-10-08 review flagged them:

    • release.yml:67: VERSION="${{ github.event.inputs.version }}". Actions pastes the input into the script before bash runs, so $(...) in a dispatched version runs (reproduced). Only the two write-access accounts can dispatch or push tags, and both can already run code in that job, so no trust boundary is crossed today.
    • Steps that read its outputs the same way: release.yml:91, :93, :129 (steps.ver.outputs.version) and :102-103 (steps.ver.outputs.tag, title). A newline in the input could also add keys to GITHUB_OUTPUT.
    • release.yml:144 and ci.yml:131: '${{ github.repository }}', fixed and safe, but covered by the same rule.

    Fix: pass each through env: (INPUT_VERSION: ${{ inputs.version }}, then "$INPUT_VERSION"), reject a version that doesn't match ^[0-9]+\.[0-9]+\.[0-9]+$, and use "${GITHUB_REPOSITORY,,}". The v0.2.29 service-image job already uses env: throughout.

  11. dan-petty commented on Oct 9, 2026

    @dan-petty
    OwnerAuthor

    Finding (2026-10-09)

    Renovate has opened nothing since the switch in #1219/#1220 (2026-10-06): no pull request by a Renovate account and no Dependency Dashboard issue. The last bot PRs are Dependabot's #1212-#1216 on 2026-10-05. So today nothing proposes dependency, action or image updates for this repository. The likely cause is that the Renovate GitHub App isn't installed for it (.github/renovate.json alone does nothing). Proposed first step for this item: confirm the app's installation and repository access, and add a check that fails when no Renovate run has touched the repository within its schedule.

  12. dan-petty-bot commented on Oct 10, 2026

    @dan-petty-bot
    Collaborator

    Status set to Ready at 69c99cf (see proposed design in issue body).

  13. added this to the v0.2.36 milestone on Oct 11, 2026
  14. added
    status/in-progress
    on Oct 16, 2026
  15. added a commit that references this issue on Oct 16, 2026
    3876d1b
  16. dan-petty commented on Oct 17, 2026

    @dan-petty
    OwnerAuthor

    What changed

    #1599, merged into release/v0.2.36 as 3876d1b.

    Closes #861

    Delivers the issue's three checkboxes as its 2026-10-08 refinement scoped them: the Dependabot retarget is gone because Renovate replaced Dependabot, and SARIF upload of zizmor findings waits for #419.

    23 file(s) changed.

    How it was verified

    Check runs at 3276297:

    • Audit Defect PR Hardening: skipping
    • Prune PR DevContainer Images: pass
    • devops-cli: pass
    • bandit: pass
    • Fail-to-Pass Self-Check: pass
    • Fail-to-Pass Check: pass
    • CodeQL: pass
    • Static Analysis: pass
    • Rule Pack Tests: pass
    • Tests & Coverage: pass
    • Changed-Test Independence: pass
    • Analyze (python): pass
    • Analyze (actions): pass
    • DevContainer Image: skipping
    • Service Image: skipping
    • Dependency Freshness: skipping

    Acceptance Criteria of docs/agent/tasks/task-861-supply-chain-claims.md:

    No Acceptance Criteria section.

  17. added a commit that references this issue on Oct 17, 2026
    3dd7fa6
  18. removed
    status/in-progress
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highscope/githubtype/security

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions