Repository navigation
Allow workflow steps in strict dry-run compilation - #75978
Conversation
Co-authored-by: gh-aw-bot <[email protected]>
|
❌ PR Specification Reviewer failed to deliver outputs. Please review the logs for details.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
Reviewed the changed dry-run validation, emitted-step behavior, documentation, and regression coverage. I found no actionable correctness issues on the changed lines.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
There was a problem hiding this comment.
Reviewed head 5320a41 against compiler threat detection specification v1.0.98 and related changelog. The implementation and regression evidence intentionally change strict CLI dry-run to retain ordinary workflow steps/post-steps without executing them, while preserving rejection of pre-activation steps and other host-side effects. Synchronized specs/compiler-threat-detection-spec.md (Sections 2, 3.1, 5.2.1, 8) and specs/compiler-threat-detection-changelog.md to v1.0.99; the specification-only commit is queued to the same-repository PR branch. No blocking conformance findings. Static review only; tests were not run per review contract.
Generated by PR Specification Reviewer for #75978 · copilot · gpt50 · ~6 AIC · ⌖ ~2 AIC · ⊞ 1.7K
Comment /review-specs to run again
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs, /tdd and /grill-with-docs. Requesting changes: removing steps and post-steps from the dry-run gate reverses ADR-70851 and leaves the dispatched dry-run lock with unfiltered authored steps.
📋 Key Themes & Highlights
Key Themes
- Safety regression:
compiler_development_safety.gono longer rejectssteps/post-steps.emitCustomSteps(compiler_yaml_runtime_setup.go) writesdata.CustomStepsunconditionally, so the retained steps land in the agent job of the lock that.github/aw/debug-compilation.mdsays is dispatched for live tests. I confirmed the emission path by reading the code; I did not run a workflow, so runtime execution is inferred. - Unresolved policy conflict: ADR-70851 (
docs/adr/70851-...md) still requires rejectingstepsandpost-steps. Supersede it, or keep the rejection. - Stale docs outside this diff:
docs/src/content/docs/reference/compilation-process.md:488-490and.github/aw/debug-compilation.md:80-81still liststepsandpost-stepsas rejected..changeset/major-fail-closed-dry-run-host-effects.md:7still says dry-run "now rejects authored host steps". - Weak test:
TestDryRunCompilesWorkflowStepsAndPostStepsonly checks that the strings appear in the lock.
Validation
go test ./pkg/workflow -run TestDryRun: passgo test ./pkg/cli -run TestCompileToolAgentJobHealthStrictDryRun: pass
Positive Highlights
- ✅ Pre-activation steps,
on.steps, custom MCP servers andmcp-scriptsremain rejected, and the unsafe-pre-step regression is covered. - ✅ The flag, MCP, and CLI descriptions were updated together.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~5 AIC · ⌖ ~2 AIC · ⊞ 6.3K
Comment /matt to run again
| declarations in a separate diagnostic workflow, reviewing skipped dependencies, | ||
| and resolving actionable findings before live testing. Ordinary compilation is | ||
| unchanged; dry-run is still not a hosted execution sandbox. | ||
| `compile --dry-run` retains workflow `steps` and `post-steps` in emitted locks |
There was a problem hiding this comment.
[/grill-with-docs] .changeset/major-fail-closed-dry-run-host-effects.md:7 still says dry-run "now rejects authored host steps", which contradicts this entry. Update the changeset too, or the two release notes will disagree. The ADR, compilation-process.md, and debug-compilation.md also still list steps and post-steps as rejected; those files are outside this diff, so they are noted in the review summary.
@copilot please address this.
There was a problem hiding this comment.
Addressed in 5418fdb: the changeset, changelog, ADR-70851 amendment, compilation reference, and debugging guide now consistently describe accepted but omitted steps/post-steps, explicitly rejected hooks, and reduced live-test coverage.
| **`--no-logo` flag:** Omit the ASCII logo from generated workflow headers without removing metadata or regeneration instructions. To persist this setting for all compiles, including upgrades, set [`"lock_file_logo": false` in `.github/workflows/aw.json`](/gh-aw/reference/compilation-process/#repository-configuration-awjson). Either opt-out disables the logo; `--banner` only controls terminal output. | ||
|
|
||
| **`--dry-run` flag:** Compile with strict source validation, staged safe outputs, shellcheck, and model checks. Existing and added medium-or-higher or unclassified scanner findings fail; baseline counts remain available for comparison. Low-severity findings and zizmor's `secrets-outside-env` rule do not fail the gate. Docker-based image validation and scanners are opt-in; native shellcheck provides required run-step linting without Docker. Missing required checks or model inventory block compilation. Compiler-managed GitHub mutations and authored custom jobs are disabled. Custom jobs and custom safe-output jobs become credential-free placeholders, including reusable calls with inherited secrets. Authored host steps, custom MCP servers, `mcp-scripts`, custom safe-output scripts, enabled Bash graders, and authored OIDC permissions are rejected, including imported declarations. Remove unsupported declarations in a separate diagnostic workflow. Emitted locks remove telemetry environment variables and automatic OTLP authentication. Agent shell commands, custom engine execution, custom credentials, and hosted identities still require review; dry-run is not a hosted sandbox. Explicitly disabling a required check is rejected; `--no-emit`, `--watch`, `--approve`, and `--allow-action-refs` are incompatible. This flag does not upload or execute workflows and is distinct from `--action-mode dev`. The compile MCP input is `dry_run`; `validate_images: true` opts into required image validation. See [Development Testing Mode](/gh-aw/reference/compilation-process/#development-testing-mode). | ||
| **`--dry-run` flag:** Compile with strict source validation, staged safe outputs, shellcheck, and model checks. Existing and added medium-or-higher or unclassified scanner findings fail; baseline counts remain available for comparison. Low-severity findings and zizmor's `secrets-outside-env` rule do not fail the gate. Docker-based image validation and scanners are opt-in; native shellcheck provides required run-step linting without Docker. Missing required checks or model inventory block compilation. Compiler-managed GitHub mutations and authored custom jobs are disabled. Custom jobs and custom safe-output jobs become credential-free placeholders, including reusable calls with inherited secrets. Workflow `steps` and `post-steps` are retained in the emitted lock but are not executed by compilation; review their effects before any separate execution. Pre-activation steps, `on.steps`, custom MCP servers, `mcp-scripts`, custom safe-output scripts, enabled Bash graders, and authored OIDC permissions are rejected, including imported declarations. Remove unsupported declarations in a separate diagnostic workflow. Emitted locks remove telemetry environment variables and automatic OTLP authentication. Agent shell commands, custom engine execution, custom credentials, and hosted identities still require review; dry-run is not a hosted sandbox. Explicitly disabling a required check is rejected; `--no-emit`, `--watch`, `--approve`, and `--allow-action-refs` are incompatible. This flag does not upload or execute workflows and is distinct from `--action-mode dev`. The compile MCP input is `dry_run`; `validate_images: true` opts into required image validation. See [Development Testing Mode](/gh-aw/reference/compilation-process/#development-testing-mode). |
There was a problem hiding this comment.
[/grill-with-docs] "Not executed by compilation" is accurate but incomplete. The dry-run lock is the artifact the debug guide dispatches for live tests, so the retained steps do run on that path. State this here, or the flag description implies the lock is inert.
@copilot please address this.
There was a problem hiding this comment.
Addressed in 5418fdb: the CLI reference now states that separately dispatched dry-run locks still execute the agent and compiler-owned steps. Authored steps/post-steps are omitted, including code and credentials, and cannot execute from that lock.
| lock, err := os.ReadFile(filepath.Join(dir, "workflow.lock.yml")) | ||
| require.NoError(t, err) | ||
| assert.Contains(t, string(lock), "echo setup") | ||
| assert.Contains(t, string(lock), "echo cleanup") |
There was a problem hiding this comment.
[/tdd] This test only checks that the strings appear in the lock. It locks in the retention and passes even if those steps become executable in dry-run. Add an assertion for the intended dry-run treatment (for example, absent or inert in the emitted lock), and keep the rejection coverage for untrusted variants.
@copilot please address this.
There was a problem hiding this comment.
Addressed in 5418fdb: local and imported fixtures now assert authored commands, secret bindings, and token actions are absent from dry-run locks, with no token-induced agent OIDC write permission. Normal compilation retains them and its OIDC wiring. Existing untrusted-hook rejection tests remain.
| name, content string | ||
| }{ | ||
| {"steps", data.CustomSteps}, | ||
| {"pre-steps", data.PreSteps}, |
There was a problem hiding this comment.
[/diagnosing-bugs] Removing steps and post-steps from this gate lets authored steps reach the dispatched dry-run lock with no dry-run filter. emitCustomSteps in compiler_yaml_runtime_setup.go writes data.CustomSteps unconditionally, so these steps become plain steps in the agent job. .github/aw/debug-compilation.md says that dry-run lock is the artifact uploaded and dispatched for live tests, so the steps do run on that path. Compile-time non-execution does not cover it.
💡 Options
Either keep rejecting steps and post-steps in dry-run, or neutralise them at emission the way custom jobs become inert placeholders. If retaining them is the intended policy, ADR-70851 must be superseded first, since it currently requires rejecting them.
@copilot please address this.
There was a problem hiding this comment.
Addressed in 5418fdb: dry-run preparation removes resolved CustomSteps and PostSteps from a copy before job construction and token wiring. They cannot reach the dispatched lock. Copy-isolation and local/imported compilation tests pass; ADR-70851 records the revised boundary.
There was a problem hiding this comment.
🟡 Changes recommended
Dry-run compilation retains executable host steps with secret access outside the agent firewall while misleadingly reporting that those scripts were rejected.
5 open issues
Report retained workflow steps accurately in both dry-run outputs · New Prevent trusted host effects from bypassing the dry-run safety gate · New Correct the changeset claim that dry-run rejects authored host steps · New Update documentation that still says steps and post-steps are rejected · New Name the rejected hooks explicitly to distinguish them from on.steps · New
What changed in this PR
Updates gh-aw’s strict dry-run compiler to accept ordinary workflow setup and cleanup steps, enabling compile-only validation of trusted workflows.
Changes:
- Retains
stepsandpost-stepsin emitted locks without executing them during compilation. - Adds acceptance coverage and updates the rejection fixture to use
pre-steps. - Updates CLI help, MCP descriptions, documentation, and release notes.
| File | Description |
|---|---|
pkg/workflow/compiler_development_safety.go |
Removes dry-run rejection of steps and post-steps. |
pkg/workflow/compiler_development_safety_test.go |
Verifies accepted steps remain in emitted locks. |
pkg/cli/mcp_tools_readonly.go |
Updates the MCP dry-run input description. |
pkg/cli/mcp_compile_diagnostics_test.go |
Uses injected pre-steps to verify continued rejection. |
docs/src/content/docs/setup/cli.md |
Documents retained steps and separate execution review. |
cmd/gh-aw/main.go |
Updates dry-run flag help. |
CHANGELOG.md |
Describes the revised dry-run behavior. |
Review effort: Max (auto)
| }{ | ||
| {"steps", data.CustomSteps}, | ||
| {"pre-steps", data.PreSteps}, | ||
| {"pre-agent-steps", data.PreAgentSteps}, |
| }{ | ||
| {"steps", data.CustomSteps}, | ||
| {"pre-steps", data.PreSteps}, | ||
| {"pre-agent-steps", data.PreAgentSteps}, |
| declarations in a separate diagnostic workflow, reviewing skipped dependencies, | ||
| and resolving actionable findings before live testing. Ordinary compilation is | ||
| unchanged; dry-run is still not a hosted execution sandbox. | ||
| `compile --dry-run` retains workflow `steps` and `post-steps` in emitted locks |
| **`--no-logo` flag:** Omit the ASCII logo from generated workflow headers without removing metadata or regeneration instructions. To persist this setting for all compiles, including upgrades, set [`"lock_file_logo": false` in `.github/workflows/aw.json`](/gh-aw/reference/compilation-process/#repository-configuration-awjson). Either opt-out disables the logo; `--banner` only controls terminal output. | ||
|
|
||
| **`--dry-run` flag:** Compile with strict source validation, staged safe outputs, shellcheck, and model checks. Existing and added medium-or-higher or unclassified scanner findings fail; baseline counts remain available for comparison. Low-severity findings and zizmor's `secrets-outside-env` rule do not fail the gate. Docker-based image validation and scanners are opt-in; native shellcheck provides required run-step linting without Docker. Missing required checks or model inventory block compilation. Compiler-managed GitHub mutations and authored custom jobs are disabled. Custom jobs and custom safe-output jobs become credential-free placeholders, including reusable calls with inherited secrets. Authored host steps, custom MCP servers, `mcp-scripts`, custom safe-output scripts, enabled Bash graders, and authored OIDC permissions are rejected, including imported declarations. Remove unsupported declarations in a separate diagnostic workflow. Emitted locks remove telemetry environment variables and automatic OTLP authentication. Agent shell commands, custom engine execution, custom credentials, and hosted identities still require review; dry-run is not a hosted sandbox. Explicitly disabling a required check is rejected; `--no-emit`, `--watch`, `--approve`, and `--allow-action-refs` are incompatible. This flag does not upload or execute workflows and is distinct from `--action-mode dev`. The compile MCP input is `dry_run`; `validate_images: true` opts into required image validation. See [Development Testing Mode](/gh-aw/reference/compilation-process/#development-testing-mode). | ||
| **`--dry-run` flag:** Compile with strict source validation, staged safe outputs, shellcheck, and model checks. Existing and added medium-or-higher or unclassified scanner findings fail; baseline counts remain available for comparison. Low-severity findings and zizmor's `secrets-outside-env` rule do not fail the gate. Docker-based image validation and scanners are opt-in; native shellcheck provides required run-step linting without Docker. Missing required checks or model inventory block compilation. Compiler-managed GitHub mutations and authored custom jobs are disabled. Custom jobs and custom safe-output jobs become credential-free placeholders, including reusable calls with inherited secrets. Workflow `steps` and `post-steps` are retained in the emitted lock but are not executed by compilation; review their effects before any separate execution. Pre-activation steps, `on.steps`, custom MCP servers, `mcp-scripts`, custom safe-output scripts, enabled Bash graders, and authored OIDC permissions are rejected, including imported declarations. Remove unsupported declarations in a separate diagnostic workflow. Emitted locks remove telemetry environment variables and automatic OTLP authentication. Agent shell commands, custom engine execution, custom credentials, and hosted identities still require review; dry-run is not a hosted sandbox. Explicitly disabling a required check is rejected; `--no-emit`, `--watch`, `--approve`, and `--allow-action-refs` are incompatible. This flag does not upload or execute workflows and is distinct from `--action-mode dev`. The compile MCP input is `dry_run`; `validate_images: true` opts into required image validation. See [Development Testing Mode](/gh-aw/reference/compilation-process/#development-testing-mode). |
| **`--no-logo` flag:** Omit the ASCII logo from generated workflow headers without removing metadata or regeneration instructions. To persist this setting for all compiles, including upgrades, set [`"lock_file_logo": false` in `.github/workflows/aw.json`](/gh-aw/reference/compilation-process/#repository-configuration-awjson). Either opt-out disables the logo; `--banner` only controls terminal output. | ||
|
|
||
| **`--dry-run` flag:** Compile with strict source validation, staged safe outputs, shellcheck, and model checks. Existing and added medium-or-higher or unclassified scanner findings fail; baseline counts remain available for comparison. Low-severity findings and zizmor's `secrets-outside-env` rule do not fail the gate. Docker-based image validation and scanners are opt-in; native shellcheck provides required run-step linting without Docker. Missing required checks or model inventory block compilation. Compiler-managed GitHub mutations and authored custom jobs are disabled. Custom jobs and custom safe-output jobs become credential-free placeholders, including reusable calls with inherited secrets. Authored host steps, custom MCP servers, `mcp-scripts`, custom safe-output scripts, enabled Bash graders, and authored OIDC permissions are rejected, including imported declarations. Remove unsupported declarations in a separate diagnostic workflow. Emitted locks remove telemetry environment variables and automatic OTLP authentication. Agent shell commands, custom engine execution, custom credentials, and hosted identities still require review; dry-run is not a hosted sandbox. Explicitly disabling a required check is rejected; `--no-emit`, `--watch`, `--approve`, and `--allow-action-refs` are incompatible. This flag does not upload or execute workflows and is distinct from `--action-mode dev`. The compile MCP input is `dry_run`; `validate_images: true` opts into required image validation. See [Development Testing Mode](/gh-aw/reference/compilation-process/#development-testing-mode). | ||
| **`--dry-run` flag:** Compile with strict source validation, staged safe outputs, shellcheck, and model checks. Existing and added medium-or-higher or unclassified scanner findings fail; baseline counts remain available for comparison. Low-severity findings and zizmor's `secrets-outside-env` rule do not fail the gate. Docker-based image validation and scanners are opt-in; native shellcheck provides required run-step linting without Docker. Missing required checks or model inventory block compilation. Compiler-managed GitHub mutations and authored custom jobs are disabled. Custom jobs and custom safe-output jobs become credential-free placeholders, including reusable calls with inherited secrets. Workflow `steps` and `post-steps` are retained in the emitted lock but are not executed by compilation; review their effects before any separate execution. Pre-activation steps, `on.steps`, custom MCP servers, `mcp-scripts`, custom safe-output scripts, enabled Bash graders, and authored OIDC permissions are rejected, including imported declarations. Remove unsupported declarations in a separate diagnostic workflow. Emitted locks remove telemetry environment variables and automatic OTLP authentication. Agent shell commands, custom engine execution, custom credentials, and hosted identities still require review; dry-run is not a hosted sandbox. Explicitly disabling a required check is rejected; `--no-emit`, `--watch`, `--approve`, and `--allow-action-refs` are incompatible. This flag does not upload or execute workflows and is distinct from `--action-mode dev`. The compile MCP input is `dry_run`; `validate_images: true` opts into required image validation. See [Development Testing Mode](/gh-aw/reference/compilation-process/#development-testing-mode). |
|
Copilot assignment requested for the following outstanding work:
Once you start work, post this work summary as a PR comment without the leading Copilot mention, including the Sous-chef head, work, and state lines below, to record that the assignment is running. Apply the necessary fixes on this PR's existing branch, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved; stop when only human review or CI remains. Do not merge or trigger CI. Sous-chef requested-head: 5320a41
|
Assignment running:
Sous-chef requested-head: 5320a41 |
…ow-trusted-workflows Co-authored-by: gh-aw-bot <[email protected]>
Co-authored-by: gh-aw-bot <[email protected]>
|
🎉 This pull request is included in a new release. Release: |


Strict dry-run compilation rejected trusted workflows that use ordinary
stepsandpost-steps, blocking compile-only validation. The change allows those sections while keeping execution-sensitive constructs rejected.stepsandpost-stepsin emitted locks; compilation does not execute them. Pre-activation steps,on.steps, custom MCP servers and scripts, and authored OIDC permissions remain blocked.