Repository navigation
Conversation
Seal the review skill, CI facts, and gathered context before checking out untrusted PR content, then direct the agent only to those immutable copies. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a2e7a622-045a-4843-8b48-61532a5466d7
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 37219Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 37219" |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
This PR tightens the trust boundary for /review tests by sealing the skill instructions, CI facts, and gathered context into a root-owned directory under /opt/gh-aw-trusted before the untrusted PR branch is checked out, and updates docs/lockfile accordingly.
Changes:
- Seal the review skill (
SKILL.md), canonical CI facts, merge script, and gathered context into/opt/gh-aw-trusted/...prior to PR checkout. - Update the activation prompt to instruct the agent to read only the sealed, trusted copies (and treat PR worktree as evidence-only).
- Regenerate the gh-aw lock file and document the trust boundary in repo docs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/copilot-review-tests.md | Seals trusted inputs in /opt/gh-aw-trusted and updates the agent prompt to avoid PR-controlled instructions. |
| .github/workflows/copilot-review-tests.lock.yml | Regenerated lockfile reflecting the updated workflow steps and pinned action SHAs. |
| .github/docs/pr-review-workflow.md | Documents the /review tests trust boundary and sealing behavior. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d00747b7-96f3-4e7a-8dfb-e3a48db04b2d
|
@copilot addressed the latest feedback in |
PureWeen
left a comment
There was a problem hiding this comment.
Review outcome
❌ Logic — The sealed /opt/gh-aw-trusted inputs are not mounted into the AWF agent container, so every /review tests invocation follows the setup-failure path instead of analyzing results. 3/3 reviewers agreed after validating the generated mount commands.
What looks right: the trusted sealing step itself runs from the base checkout before the PR branch is checked out, and the previous missing-context control-flow concern is addressed.
Test coverage: No runtime scenario verifies that the sandboxed agent can read the relocated inputs; compile-time lock validation cannot establish that container mount.
Prior feedback: The earlier missing-context comment is resolved in the current head; this is a distinct container-visibility regression.
Methodology: 3 independent reviewers with adversarial consensus + repo domain specialist.
Seal review-test inputs inside the runner-temp gh-aw subtree that the AWF agent container mounts read-only, and keep the post-step and prompt on the same trusted path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d00747b7-96f3-4e7a-8dfb-e3a48db04b2d
|
@PureWeen addressed the AWF container-visibility regression in |
PureWeen
left a comment
There was a problem hiding this comment.
Adversarial review\n\n⚠️ Testing — See the inline finding.\n\nWhat looks right: the sealed inputs are created before the PR checkout and mounted read-only at the fixed agent path.\n\nMethod: 3 independent reviewers with adversarial consensus + repository domain specialist.\n\nTest coverage: The added Pester suite covers the core ordering and mount invariants, but its optional-context guard needs the inline strengthening.\n\nPrior review status: Existing feedback was checked and resolved items were not repeated.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d00747b7-96f3-4e7a-8dfb-e3a48db04b2d
|
@PureWeen strengthened the optional-context regression guard in |
PureWeen
left a comment
There was a problem hiding this comment.
Adversarial review
No actionable findings at b3b5abe72835e5b2fbbb0ae864d104214be2497e.
Independent reviewer consensus: Three independent reviewers reviewed the remote PR snapshot with adversarial reconciliation, plus a MAUI domain specialist. The only disputed cleanup-path concern was rejected by both follow-up reviewers because untrusted code cannot create the proposed path before sealing on this pre-checkout, ephemeral runner flow.
What looks right: Mandatory trusted inputs are sealed before PR checkout, exposed to the agent only through the fixed read-only mount, and verified by a focused Pester regression suite; the generated lock and peeled actions/github-script@v9.0.0 pin are consistent with the source.
Test coverage: The added Pester guard covers mandatory and optional sealed inputs, cleanup, mount mode, generated action pin consistency, and trigger coverage for the workflow inputs it protects.
Prior review status: 23 existing review threads were checked; all are resolved, and their concerns were not duplicated at this head.
Method: 3 independent reviewers with adversarial consensus + repo domain specialist.
Regenerate copilot-review-tests.lock.yml with the current main-pinned gh-aw v0.86.2 compiler in strict mode. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d00747b7-96f3-4e7a-8dfb-e3a48db04b2d
|
Resolved the current |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Suppressed comments (2)
.github/workflows/copilot-review-tests.md:309
- The trusted directory is created with
sudo mkdirand then permissions are applied in a follow-upchmod. This relies on root’s current umask and introduces an avoidable window where the directory permissions may be more permissive than intended (before the explicitchmod 0755). Since this directory is part of the workflow’s trust boundary, it’s safer to create it with the desired mode atomically (e.g.,sudo mkdir -m 0755 -- "${trusted}") and drop the redundantchown/chmod 0755(root will own it by default). Note: changing this requires regeneratingcopilot-review-tests.lock.ymland updating the Pester expectations inReviewTestsWorkflow.Tests.ps1.
trusted="/tmp/review-tests-trusted-${GITHUB_RUN_ID}"
test "$(stat -c '%u' /tmp)" = "0"
test -k /tmp
sudo mkdir -- "${trusted}"
sudo chown root:root "${trusted}"
sudo chmod 0755 "${trusted}"
.github/workflows/copilot-review-tests.lock.yml:3
- The PR description states validation with “repository-pinned gh-aw v0.85.4”, but this compiled lock file indicates it was generated with gh-aw v0.86.2 (see
compiler_versionhere and the “automatically generated by gh-aw (v0.86.2)” header). Please reconcile the PR description with the actual pinned/used gh-aw version to avoid future confusion when reproducing/regenerating the lock.
# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"dcd4b865804087cbf222f65999fe7282a18961009f696a97d7083c30524961c3","body_hash":"577e074b833b84fc467ea7b8767890debb33e93eb5b0bc589a80fb2d0d684a36","compiler_version":"v0.86.2","strict":true,"agent_id":"copilot","agent_model":"gpt-5.6-sol","engine_versions":{"copilot":"1.0.79"}}
# gh-aw-manifest: {"version":1,"secrets":["COPILOT_PAT_0","COPILOT_PAT_1","COPILOT_PAT_2","COPILOT_PAT_3","COPILOT_PAT_4","COPILOT_PAT_5","COPILOT_PAT_6","COPILOT_PAT_7","COPILOT_PAT_8","COPILOT_PAT_9","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"3d3c42e5aac5ba805825da76410c181273ba90b1","version":"v7.0.1"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"820762786026740c76f36085b0efc47a31fe5020","version":"v7.0.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"6aab9e5b5c91c615506061f09bedd81a23babe3c","version":"v0.86.2"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.27.44","digest":"sha256:0d727725c737b58c7bdf51f640cffb928385ec46517e0917c7f1a02f1bada8b4","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.27.44@sha256:0d727725c737b58c7bdf51f640cffb928385ec46517e0917c7f1a02f1bada8b4"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.44","digest":"sha256:b50fbadba138f6e9aba94aca09711335c489bb3b15861220cb66f6092e042dc7","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.44@sha256:b50fbadba138f6e9aba94aca09711335c489bb3b15861220cb66f6092e042dc7"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.27.44","digest":"sha256:83e48bbe12c634be8c228a576832fe45f66c529ac3659db92bddbcf2eeb6d627","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.27.44@sha256:83e48bbe12c634be8c228a576832fe45f66c529ac3659db92bddbcf2eeb6d627"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.4.9","digest":"sha256:e5a1569aeaf41820fa7bdee3e94468cae448133cdbf00119ad24f5b74db1ab9f","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.4.9@sha256:e5a1569aeaf41820fa7bdee3e94468cae448133cdbf00119ad24f5b74db1ab9f"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:0d9f1fb5fd6610c0ac1f5194a38e45a8a1e81f8a390d5142d8e4e6f26a4b3196","pinned_image":"ghcr.io/github/gh-aw-node@sha256:0d9f1fb5fd6610c0ac1f5194a38e45a8a1e81f8a390d5142d8e4e6f26a4b3196"},{"image":"ghcr.io/github/github-mcp-server:v1.9.0","digest":"sha256:881b53d6f75f69bdbc1b5b10fc2f1361717c19054143b3a8529fb5c32061a50e","pinned_image":"ghcr.io/github/github-mcp-server:v1.9.0@sha256:881b53d6f75f69bdbc1b5b10fc2f1361717c19054143b3a8529fb5c32061a50e"}]}
# This file was automatically generated by gh-aw (v0.86.2). DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md
Set the root-owned directory mode at creation time, update the trust-boundary regression, and regenerate the gh-aw lock with the current pinned compiler. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d00747b7-96f3-4e7a-8dfb-e3a48db04b2d
|
@copilot-pull-request-reviewer addressed the suppressed review notes in |
PureWeen
left a comment
There was a problem hiding this comment.
Automated adversarial review by an independent reviewer: no actionable issues found.
The review confirmed the sealed inputs are created before untrusted checkout, supplied only through the fixed read-only mount, and have no PR-worktree fallback. The generated lock remains consistent with the source workflow, and the shared action pin resolves consistently for its consumers.
Methodology: 3 independent reviewers with adversarial consensus + repo domain specialist. The specialist’s context-content observation was discarded after two reviewers confirmed the trusted skill already classifies log text as untrusted evidence, the exposure predates this PR, and the workflow’s output is limited to one deterministically capped advisory comment.
Test coverage: the added focused Pester suite exercises the trust-boundary invariants and the PowerShell workflow now triggers for every protected input.
PureWeen
left a comment
There was a problem hiding this comment.
Automated adversarial review by an independent reviewer: no actionable issues found at e18e080. The completed assessment confirmed the trusted pre-checkout input seal, fixed read-only mount, generated workflow consistency, and regression coverage.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Summary
/review testsskill, canonical CI facts, gathered context, and visual merger in a fail-closed root-owned/tmp/review-tests-trusted-${GITHUB_RUN_ID}directory created directly under sticky/tmpbefore checking out the untrusted PR branch/review-tests-trustedmount, while the host visual post-step uses the protected host path and never falls back to PR-controlled workflow instructionsactions/github-script@v9to the reviewedv9.0.0commit in the repository action lock, regenerate the gh-aw lock consistently, and document the trust boundaryInvestigation
The flagged run was reported as XPIA because the generated prompt said the PR branch was checked out and then told the agent to read
.github/skills/review-test-failures/SKILL.md. gh-aw restores.githubfrom the base branch, but that trust transition was implicit and the output threat detector did not consistently recognize it.I audited 24
/review testsoutputs since August 1 across 16 PRs. This was the only threat warning. Five reports had inaccessible AzDO builds because retained build IDs now return HTTP 404; the other 19 gathered inspectable evidence, so that is a separate retention limitation rather than the command regression.Validation
Invoke-Pester .github/scripts/ReviewTestsWorkflow.Tests.ps1— 9 passedcompile copilot-review-tests --strict— 1 workflow compiled, zero warningsactions/github-scriptcommit and mounts the sealed host directory read-only at/review-tests-trustedgit diff --checkAn isolated gh-aw trial was blocked before execution because the
copilot-pat-poolenvironment permits onlymain,net1*.0, andrelease/*branches.