Skip to content

Suppress zizmor false positive for generated runtime paths - #60138

Merged
pelikhan merged 7 commits into
mainfrom
copilot/fix-github-env-issue
Sep 11, 2026
Merged

Suppress zizmor false positive for generated runtime paths#60138
pelikhan merged 7 commits into
mainfrom
copilot/fix-github-env-issue

Conversation

Copilot AI commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Zizmor flags the generated Set runtime paths step because it writes RUNNER_TOOL_CACHE to $GITHUB_ENV, despite the value coming from the trusted ${{ runner.tool_cache }} context.

  • Compiler output
    • Add an inline github-env suppression with the trusted-source rationale:
run: | # zizmor: ignore[github-env] - runner.tool_cache is set by GitHub Actions, not user input.
  • Regression coverage
    • Require generated workflows to include the suppression on the runtime-path initialization step.

Run: https://github.com/github/gh-aw/actions/runs/34552262956

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • github.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "github.com"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · pi · gpt54 · 21.8 AIC · ⊞ 9.3K ·
Comment /souschef to run again

Copilot AI and others added 3 commits September 11, 2026 01:39
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix false positive for github-env in runtime paths Suppress zizmor false positive for generated runtime paths Sep 11, 2026
Copilot AI requested a review from pelikhan September 11, 2026 01:43
@pelikhan
pelikhan marked this pull request as ready for review September 11, 2026 01:44
Copilot AI balanced review requested due to automatic review settings September 11, 2026 01:44
@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch test file diff

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

⚠️ PR Code Quality Reviewer failed during code quality review.

Warning

Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs for details.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

⚠️ Security scanning failed for Design Decision Gate 🏗️. Review the logs for details.

No ADR enforcement needed: PR does not have the 'implementation' label and has <=100 new lines of code in business logic directories.

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Ponytail Reviewer completed successfully!

Lean already. Ship.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • ab.chatgpt.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "ab.chatgpt.com"

See Network Configuration for more information.

Generated by Ponytail Reviewer for #60138

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused compiler change matches established suppression syntax and includes appropriate regression coverage.

Pull request overview

Adds a targeted zizmor suppression for a trusted GitHub Actions runtime path while preserving existing secure environment-variable handling.

Changes:

  • Annotates the generated runtime-path script with the justified github-env suppression.
  • Updates regression coverage to require the annotation.
File summaries
File Description
pkg/workflow/compiler_yaml_step_generation.go Emits the inline zizmor suppression.
pkg/workflow/agentic_output_test.go Verifies the suppression appears in generated output.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed with the Impeccable harden/audit lens (bug-fix category: zizmor false-positive suppression).

The change adds an inline # zizmor: ignore[github-env] - runner.tool_cache is set by GitHub Actions, not user input. comment on the generated Set runtime paths step, consistent with the identical pattern already used for GITHUB_SERVER_URL suppressions across many generated .lock.yml workflows in this repo. Test coverage in agentic_output_test.go was updated to assert the suppression string is present.

No correctness, security, or maintainability issues found on the changed lines.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · copilot · sonnet50 · 18.2 AIC · ⌖ 13.6 AIC · ⊞ 8.4K

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skills-Based Review 🧠

Applied /diagnosing-bugs — the annotation itself is correct and consistent with the existing ghes_host_step.go pattern, but the fix appears incomplete: it doesn't yet reach the generated artifacts that zizmor actually scans.

📋 Key Themes & Highlights

Key Themes

  • Fix not propagated to lock files: The compiler change in compiler_yaml_step_generation.go is correct, but none of the 299 .lock.yml files under .github/workflows/ were regenerated (make recompile wasn't run). Zizmor scans the committed lock files, not the compiler source, so as committed this PR does not actually suppress the false positive in CI.
  • Test update is sound: The updated unit test in agentic_output_test.go correctly asserts the new suppression string is present on the run: line itself (matching the precedent set by ghes_host_step_test.go's comment about span association).

Positive Highlights

  • ✅ Follows the established suppression pattern (# zizmor: ignore[github-env] - ... is set by GitHub Actions, not user input.) already used in ghes_host_step.go.
  • ✅ Comment placement on the run: | line itself (not a preceding line) — this matches the documented zizmor span requirement.
  • ✅ Minimal, targeted diff with an accompanying test update.

@copilot please address the review comment above (regenerate and commit lock files via make recompile).

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 45.1 AIC · ⌖ 15 AIC · ⊞ 10.4K
Comment /matt to run again

" env:\n",
" GH_AW_RUNNER_TOOL_CACHE: ${{ runner.tool_cache }}\n",
" run: |\n",
" run: | # zizmor: ignore[github-env] - runner.tool_cache is set by GitHub Actions, not user input.\n",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/diagnosing-bugs] This fixes the symptom in generated code, but make recompile was not run — none of the 299 committed .lock.yml files (e.g. ab-testing-advisor.lock.yml line 482) contain the new suppression comment. CI/zizmor still scans the stale lock files, so the fix has no actual effect until regenerated.

💡 Evidence
$ grep -c "run: | # zizmor: ignore\[github-env\] - runner.tool_cache" .github/workflows/*.lock.yml | grep -v ':0' | wc -l
0

Run make recompile and commit the resulting lock-file diffs so the suppression is actually deployed.

@copilot please address this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in commit 2605005: regenerated workflow lock files and verified the suppression is present in generated .lock.yml output. I also ran the local validation gate afterward; latest follow-up fix is in f22d711.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please address the latest blocking signals on this PR:

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • github.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "github.com"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · pi · gpt54 · 21.8 AIC · ⊞ 9.3K ·
Comment /souschef to run again

Copilot AI and others added 2 commits September 11, 2026 02:02
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Please address the latest blocking signals on this PR:

  • Unresolved review feedback:...

Done. I addressed the blocking thread and refreshed generated lock files (2605005), then fixed the remaining local lint blocker in f22d711, re-ran validation (make agent-report-progress), and pushed updates.

@pelikhan
pelikhan merged commit c2000a9 into main Sep 11, 2026
@pelikhan
pelikhan deleted the copilot/fix-github-env-issue branch September 11, 2026 03:54
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.89.4

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.

zizmor github-env false positive on the generated "Set runtime paths" step

4 participants