Skip to content

Suppress RGS-012 false positive on the gVisor install step - #51322

Merged
pelikhan merged 2 commits into
mainfrom
copilot/rgs-012-fix-secret-exfiltration
Aug 8, 2026
Merged

Suppress RGS-012 false positive on the gVisor install step#51322
pelikhan merged 2 commits into
mainfrom
copilot/rgs-012-fix-secret-exfiltration

Conversation

Copilot AI commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

runner-guard's RGS-012 rule (secret exfiltration via outbound HTTP) flagged the compiler-generated "Install gVisor (runsc)" step across 59 workflow files. The step downloads a pinned gVisor release from storage.googleapis.com and verifies it via SHA-512 before install — no secrets ever leave the runner — so this is a false positive that will keep re-triggering on every new/changed workflow that enables the sandbox.

Suppress at the source

  • Added # runner-guard:ignore RGS-012 comments above the curl download lines in generateGVisorInstallStep (pkg/workflow/copilot_engine_installation.go), documenting the pinned-version + SHA-512-verified rationale.
  • Regenerated all workflows so the suppression propagates to every affected .lock.yml.

Defense-in-depth in gh-aw's own runner-guard integration

  • Added filterGvisorInstallFindings (pkg/cli/runner_guard_gvisor_exfiltration.go), following the same pattern as the existing RGS-004 activation-gate filter.
  • Given a finding's file/line, it walks backward to the nearest step boundary and only drops the finding if that step is genuinely the gVisor install step — so real RGS-012 findings elsewhere in the same file are still reported.
  • Wired into parseAndDisplayRunnerGuardOutput, applied whenever gh-aw compile --runner-guard runs (including the daily static-analysis-report workflow).
// pkg/cli/runner_guard.go
output.Findings = filterRunnerGuardFindings(output.Findings, gitRoot)
output.Findings = filterGvisorInstallFindings(output.Findings, gitRoot)

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix secret exfiltration via outbound HTTP request Suppress RGS-012 false positive on the gVisor install step Aug 8, 2026
Copilot AI requested a review from pelikhan August 8, 2026 06:17
@pelikhan
pelikhan marked this pull request as ready for review August 8, 2026 06:18
Copilot AI balanced review requested due to automatic review settings August 8, 2026 06:18
@pelikhan
pelikhan merged commit b0b3ab7 into main Aug 8, 2026
@pelikhan
pelikhan deleted the copilot/rgs-012-fix-secret-exfiltration branch August 8, 2026 06:19

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.

Pull request overview

Addresses #51309 by suppressing false-positive RGS-012 findings for generated gVisor installation steps.

Changes:

  • Adds generated inline suppression comments.
  • Adds a gVisor-specific Runner Guard filter and tests.
  • Regenerates affected workflow lock files.
Show a summary per file
File Description
pkg/workflow/copilot_engine_installation.go Emits suppression comments.
pkg/cli/runner_guard.go Applies the new filter.
pkg/cli/runner_guard_gvisor_exfiltration.go Implements gVisor finding filtering.
pkg/cli/runner_guard_gvisor_exfiltration_test.go Tests filtering behavior.
.github/workflows/code-simplifier.lock.yml Regenerated suppression directives.
.github/workflows/code-scanning-fixer.lock.yml Regenerated suppression directives.
.github/workflows/cloclo.lock.yml Regenerated suppression directives.
.github/workflows/cli-version-checker.lock.yml Regenerated suppression directives.
.github/workflows/cli-consistency-checker.lock.yml Regenerated suppression directives.
.github/workflows/claude-code-user-docs-review.lock.yml Regenerated suppression directives.
.github/workflows/ci-coach.lock.yml Regenerated suppression directives.
.github/workflows/chaos-pr-bundle-fuzzer.lock.yml Regenerated suppression directives.
.github/workflows/changeset.lock.yml Regenerated suppression directives.
.github/workflows/breaking-change-checker.lock.yml Regenerated suppression directives.
.github/workflows/bot-detection.lock.yml Regenerated suppression directives.
.github/workflows/blog-auditor.lock.yml Regenerated suppression directives.
.github/workflows/aw-failure-investigator.lock.yml Regenerated suppression directives.
.github/workflows/avenger.lock.yml Regenerated suppression directives.
.github/workflows/auto-triage-issues.lock.yml Regenerated suppression directives.
.github/workflows/audit-workflows.lock.yml Regenerated suppression directives.
.github/workflows/artifacts-summary.lock.yml Regenerated suppression directives.
.github/workflows/archivx-agentic-workflows-analyzer.lock.yml Regenerated suppression directives.
.github/workflows/architecture-guardian.lock.yml Regenerated suppression directives.
.github/workflows/archie.lock.yml Regenerated suppression directives.
.github/workflows/approach-validator.lock.yml Regenerated suppression directives.
.github/workflows/api-consumption-report.lock.yml Regenerated suppression directives.
.github/workflows/ai-moderator.lock.yml Regenerated suppression directives.
.github/workflows/agentic-token-trend-audit.lock.yml Regenerated suppression directives.
.github/workflows/agent-persona-explorer.lock.yml Regenerated suppression directives.
.github/workflows/agent-performance-analyzer.lock.yml Regenerated suppression directives.
.github/workflows/ace-editor.lock.yml Regenerated suppression directives.
.github/workflows/ab-testing-advisor.lock.yml Regenerated suppression directives.

Review details

Tip

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

  • Files reviewed: 32/32 changed files
  • Comments generated: 3
  • Review effort level: Balanced

Comment on lines +81 to +88
if lineNum <= 1 {
for _, line := range lines {
if isStepNameLine(line, gvisorStepNameMarker) {
return true
}
}
return false
}
if !isStepBoundaryLine(line) {
continue
}
return isStepNameLine(line, gvisorStepNameMarker)
` ARCH=$(uname -m)`,
` URL="https://storage.googleapis.com/gvisor/releases/release/` + version + `/${ARCH}"`,
` echo "Downloading runsc ` + version + ` for ${ARCH}..."`,
` # runner-guard:ignore RGS-012 -- pinned version + SHA-512-verified download of a fixed artifact into a file; no data leaves the runner.`,
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.86.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[static-analysis] RGS-012: Secret Exfiltration via Outbound HTTP Request in ab-testing-advisor.lock.yml (+58 others)

3 participants