You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix fork skill validation with trusted checkouts and bounded Git data - #38745
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!
Description of Change
Fix fork skill-validation content acquisition without opting into unsafe PR checkout.
The Static validation jobs for #38533 and #38534 fail before validation because actions/checkout@v4 refuses the fork checkout in pull_request_target. The aggregate Skill Validation check reports that same failure; no Vally lint or UI test failed in those jobs.
This independent change starts from canonical main at f8a2f062a8e1b4686a5a3de93bb69cabc02c8c4a. It adapts the bounded Git-data design from local commit 304700740f, not that commit's old workflow/preparer/reporting implementation. It contains no UI-evidence or performance-analyzer implementation.
Security rationale
Every checkout uses the base repository at github.workflow_sha, with credentials not persisted. No allow-unsafe-pr-checkout, PR ref checkout, archive extraction, or candidate script execution is introduced.
A trusted helper reads the gated repository and exact head through GitHub commit/tree/blob endpoints. It rejects redirects, truncated responses, invalid object hashes, links/gitlinks, path traversal/aliases, and skill-local auto-loaded configuration. Acquisition is bounded to 1,024 files, 2 MiB/file, 32 MiB total, 4 MiB/response, 4,096 tree entries, and ten minutes.
Only candidate skill data is installed in the checkout; executable bits are removed. Agent/plugin metadata stays in a data-only Git snapshot. Trusted scripts, repository controls, and HEAD remain unchanged. A read-only token is scoped to acquisition, not model execution.
Candidate workflow-policy validation is preserved: the two workflow YAML files and rollback JSON are acquired as inert data into a fresh directory outside the trusted checkout. Trusted policy tests consume those candidate bytes. Missing candidate files do not fall back to trusted copies.
Discovery, baseline preparation and restoration use the exact candidate snapshot, not the now-trusted HEAD. Fixture fetching accepts only workflow-revision-approved pins and the trusted sanitized-fixture source revisions.
The current #38572 provider/executor restrictions, #38040 sanitized historical fixtures and runtime isolation, and #38573 static-only mode, default-branch manual-source gates, skill-evaluation-pat-pool, and reporting semantics are retained. The soak workflow, token selector and isolated runtime implementation are unchanged. No permission, secret, environment, model, or paid evaluation configuration is added.
Validation
On Windows with session-local Ruby 3.4.10 and actionlint 1.7.12:
Workflow operating-mode policy: 19 tests / 233 assertions passed. Post-review checks parse the static job, bind acquisition and validator inputs to the same external policy directory, and verify the actual trusted validator invocation. Negative mutations reject checkout fallbacks, a mismatched acquisition directory, and replacement of validation with inert path substrings.
Preparer safety: 78 tests / 459 assertions passed with the nine environment-limited cases excluded explicitly; no committed tests were skipped or disabled.
The full preparer invocation ran 87 tests and encountered seven Windows symlink-creation permission errors and two Git Bash mocked-token-selector fixture failures. The symlink failure and both selector failures were reproduced using unchanged upstream test source. A Linux full-suite run remains required; this PR does not claim that the entire suite passed here.
All 17 existing Vally specs, across nine skills, passed trusted structural validation; all eight mandatory paths passed.
Actual sanitized/synthetic fixture preparation and model-list validation passed for code-review, try-fix, and verify-tests-fail-without-fix after fetching the exact trusted historical source commits. No model was invoked.
Final credential-gate ordering/comment-verdict tests: 3 tests / 38 assertions passed.
actionlint passed for both skill workflows; git diff --check passed.
The new tests cover candidate policy-byte isolation and missing-file behavior, immutable heads, object/size/path bounds, control-file rejection, snapshot restoration, approved fixture refs, and preservation of sanitized-history dispatch.
Rollout and limitations
This is a base-workflow prerequisite. A fork PR cannot repair its own pull_request_target workflow by carrying these changes. Maintainers must review and land the prerequisite, then obtain fresh runs using that workflow revision. Old-run reruns may retain old workflow code.
No workflows or model evaluations were manually dispatched, and no cloud settings were changed. Tokenless local tests do not prove a deployed credentialed Actions run.
Automatic PR checks also expose two unchanged canonical-main Pester failures: CopilotPipeline.Tests.ps1 and Review-PR.Tests.ps1 expect the local test reviewer to select gpt-5.6-sol, while Review-Tests.ps1 selects gpt-6-astra. The CI run reports 2,268 tests, 2,266 passed and those two failed. Both were reproduced locally; all three files are byte-identical to canonical main. This PR deliberately does not change model policy or weaken those tests. See Pester job. The automatic static job still uses the old base-side fork checkout and fails as expected before this prerequisite lands.
The automatic agent job also failed before agent execution: downloading Copilot CLI v1.0.85 SHA256SUMS.txt returned HTTP 504 on all retries, and the install step exited 22. It was not manually retriggered.
Issues Fixed
Addresses the shared checkout blocker observed in #38533 and #38534. Does not close either UI-evidence PR or claim to resolve their measurement review findings.
Preserve current workflow-policy, provider, static-only and sanitized-fixture controls while keeping all checkouts trusted.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
@morning4coffe-dev — new skill validation results are available based on this last commit: d0c9ceb.
To request a fresh validation after new comments or commits, comment /evaluate-skills.
❌ Skill Validation Results — d0c9ceb · Fix fork skill validation with trusted checkouts and bounded Git data · 2026-09-21T15:42:23Z
❌ Static Checks Failed
Skills: 0 | Eval specs linted:
⏭️ LLM Evaluation: Skipped
💡 LLM evaluation was not run for this external PR.
A repository contributor can post /evaluate-skills on this PR to trigger full evaluation.
The s/agent-review-in-progress label stays on this PR while the run is active. The final recommendation and outcome labels are posted only after Gate, expert review, and Deep UI tests finish.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🔵 Needs a closer look
Candidate soak workflow validation is only regex-based and does not reject malformed YAML, allowing invalid workflows through the policy gate.
Review effort: Lite Findings: None
Previously missed (1)
In code that hasn't changed since last review
Candidate soak workflow is not parsed as YAML during validation
.github/scripts/TestSkillWorkflowModes.rb:102
The candidate skill-evaluation-soak.yml is passed through this suite, but the soak checks only use substring matching and job_block; unlike skill-validation.yml, it is never parsed as YAML. A malformed candidate soak workflow can therefore satisfy these assertions and be accepted, breaking the scheduled/manual soak workflow after merge. Add a trusted YAML-parse assertion (or run actionlint) for the candidate soak file before reporting validation success.
The s/agent-review-in-progress label stays on this PR while the run is active. The final recommendation and outcome labels are posted only after Gate, expert review, and Deep UI tests finish.
🗂️ Review Sessions — click to expand 🚦 Gate — Test Before & After Fix
Gate Result: ⚠️ SKIPPED
No tests were detected in this PR.
Recommendation: Add tests to verify the fix using the write-tests-agent.
📋 Pre-Flight — Context & Validation
Issue: No standalone issue; prerequisite for #38533 and #38534 PR:#38745 - Fix fork skill validation with trusted checkouts and bounded Git data Platforms Affected: GitHub Actions / skill-validation infrastructure (platform-neutral; review requested with Android) Files Changed: 3 implementation, 3 test, 1 instruction
Key Findings
Fork pull_request_target validation currently fails before static validation because actions/checkout refuses the fork checkout. The PR keeps the checkout on the trusted base revision and acquires candidate content as bounded, inert Git data.
The PR adds AcquireSkillValidationContent.rb, changes PrepareVallyEvaluation.rb to restrict fixture refs to trusted pins, and rewires skill-validation.yml so only candidate skill data is installed while candidate workflow-policy files remain outside the trusted checkout.
The security boundary requires exact head/object validation, bounded commit/tree/blob responses, rejection of unsafe paths and Git object modes, no candidate-script execution, no fallback to trusted policy bytes, and preservation of the existing provider/executor and token-isolation controls.
No inline review comments were present. The public discussion only contained review/build commands and automation status. The automatic static check still used the old base-side workflow and therefore could not validate this prerequisite.
Gate result supplied by the caller: SKIPPED because no tests were detected. It was not rerun and gate/content.md was not modified.
The targeted regression command must run only the acquisition, preparer, and workflow-mode Ruby suites required by the pipeline-security instructions; no full suite is requested.
Keep HEAD trusted; acquire the exact fork head as bounded Git commit/tree/blob data; install only inert candidate skill content; validate policy bytes from a separate temporary directory; restrict fixture refs to trusted workflow pins.
⚠️ SKIPPED (Gate found no tests)
7 files
Original PR; author reports targeted Windows runs, but this phase does not treat that narrative as gate evidence.
The submitted PR adds a bounded GitHub Git-data acquisition path and wires it into the trusted pull_request_target skill-validation workflow. The expert pass initially reported that .github/scripts/AcquireSkillValidationContent.rb:143 used a literal masked value for the authorization header.
Direct semantic inspection reconciled that report as an output-sanitization artifact: the committed source uses the GitHubData instance token with the Bearer scheme, does not contain a six-asterisk literal, and the focused request test expects the same authenticated header with its local token. The false positive was removed from inline-findings.json; there are no verified actionable inline findings.
The trusted Gate skipped because it detected no tests, so the review cannot recommend approval from Gate evidence alone. The focused Ruby validation is assessed separately for the materialized pr-plus-reviewer candidate.
Prior Review and CI Reconciliation
Anonymous retrieval found no prior error-severity top-level reviews or inline review comments. The only matching issue comment was the skill-validation bot's static-check failure on the external PR; pre-flight evidence and the PR description identify that as the old base-side workflow failing before Vally, which is the prerequisite this PR changes rather than an independent code-review finding.
gh pr checks --required could not run because the CLI is unauthenticated. Required-check state is therefore undetermined and confidence remains low.
🛠️ Try-Fix — Analysis & Comparison
Fix Candidates
#
Source
Approach
Test Result
Files Changed
Notes
1
gpt-5.3-codex try-fix
Policy-only candidate ingestion with hard failure for missing allowlisted workflow-policy files, while executable workflow/scripts remain trusted.
⚠️ BLOCKED
0 files
Mandatory baseline setup refused the pre-existing reverse/materialized target-file diff. No implementation or tests ran; restore reported no baseline state.
2
gpt-5.6-sol try-fix
Quarantined exact-SHA Git object ingestion without checkout, distinct from the PR's REST acquisition and Candidate 1's policy-only mechanism.
⚠️ BLOCKED
0 files
Mandatory baseline setup refused the same pre-existing reverse/materialized target-file diff. No implementation or tests ran; restore reported no baseline state.
Keep HEAD trusted; acquire the exact fork head as bounded Git commit/tree/blob data; install only inert candidate skill content; validate policy bytes from a separate temporary directory; restrict fixture refs to trusted workflow pins.
⚠️ SKIPPED (Gate found no tests)
7 files
Original PR; author-reported validation is not gate evidence.
Candidate 1 Details
Model:gpt-5.3-codex Result: Blocked Approach: Enforce policy-only candidate ingestion and fail closed when any allowlisted candidate policy file is absent. Diff: Empty. Test Results: Not run. The try-fix skill's mandatory baseline step failed before edits because the target files already had a reverse/materialized working-tree diff. Failure Analysis: The baseline script refused D .github/scripts/AcquireSkillValidationContent.rb, M .github/scripts/PrepareVallyEvaluation.rb, D .github/scripts/TestAcquireSkillValidationContent.rb, M .github/scripts/TestPrepareVallyEvaluation.rb, and M .github/scripts/TestSkillWorkflowModes.rb as pre-existing changes. Manual restoration is prohibited. The required script-only restore ran and reported No baseline state found. Self-Review: 0 findings; there was no candidate diff.
Candidate 2 Details
Model:gpt-5.6-sol Result: Blocked Approach: Ingest exact-SHA Git objects into a quarantined data area without checkout, rather than using the PR's GitHub REST acquisition helper or Candidate 1's policy-only ingestion boundary. Prior Approaches Avoided: The PR's bounded REST commit/tree/blob retrieval and Candidate 1's policy-only candidate ingestion were not repeated. Diff: Empty. Test Results: Not run. The try-fix skill's mandatory baseline step failed before edits because the target files still had the caller-provided reverse/materialized working-tree diff. Failure Analysis: With no generated baseline state, the skill's edit allow-list did not exist. Bypassing that boundary or manually cleaning the caller's changes was prohibited. The required script-only restore ran and reported No baseline state found / Restored False. Self-Review: 0 findings; there was no candidate diff.
Cross-Pollination
Skipped by STEP 5a contract.
Exhausted: Yes - both permitted model invocations completed; no additional agents or retries were launched. Selected Fix: PR #38745 provisionally - neither alternative reached implementation or testing, so there is no passing candidate that can supersede the PR. The supplied gate also skipped testing, so this is not a validation claim.
🏁 Report — Final Recommendation
⚠️ Final Recommendation: REQUEST CHANGES
Winner: pr
The raw submitted PR is the best available candidate because it is the only implemented fix, the expert pass produced no verified actionable finding, and pr-plus-reviewer proved byte-equivalent after the reviewer's apparent authorization issue was identified as secret-output masking. This is not an approval recommendation: the trusted Gate skipped test verification, and the one permitted targeted Linux validation stopped with two Ruby 3.0 compatibility errors before all three required suites could run.
Gate ⚠️ SKIPPED; author-reported Windows results are not trusted Gate evidence
Winner. No verified expert-review defect and no alternative implemented a superior fix, but approval remains blocked by missing trusted validation.
2
pr-plus-reviewer
Byte-equivalent to pr; no reviewer change was warranted after reconciling output masking
❌ Targeted chain stopped at 26 runs / 249 assertions / 2 errors under Ruby 3.0; later suites did not run
Adds no improvement over pr and did not produce a passing regression result.
3
try-fix-1
No diff; proposed policy-only candidate ingestion
⚠️ BLOCKED before tests by the STEP 5a baseline guard
Cannot supersede an implemented candidate.
4
try-fix-2
No diff; proposed quarantined exact-SHA Git-object ingestion
⚠️ BLOCKED before tests by the STEP 5a baseline guard
Cannot supersede an implemented candidate.
No candidate produced a passing trusted regression run. Candidates with failed or blocked validation are therefore not elevated over the submitted implementation.
Expert review reconciliation
The single expert pass initially interpreted the displayed authorization value as a hardcoded literal. A direct semantic check showed the committed line uses the instance token and Bearer scheme and that the request test expects the matching local-token header; the six asterisks were output sanitization. The invalid finding was removed, leaving inline-findings.json as an empty JSON array. No second audit or per-candidate review was run.
Anonymous review-surface reconciliation found no prior error-severity review bodies or inline findings. The public skill-validation bot reports a static failure on the external PR, but the pre-flight evidence and submitted description identify it as the old base-side checkout failure that this prerequisite PR is designed to fix. Required-check state could not be independently enumerated because gh is unauthenticated, so CI coverage remains undetermined.
Required follow-up
Run the acquisition, preparer, and workflow-mode Ruby suites in the supported Linux CI Ruby environment and obtain a complete pass. The submitted implementation remains the recommended design, but the skipped Gate and incomplete targeted run do not permit approval under the review contract.
🧭 Next Steps — review latest findings
No alternative fix was selected for this run. Review the session findings and CI results before merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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!
Description of Change
Fix fork skill-validation content acquisition without opting into unsafe PR checkout.
The Static validation jobs for #38533 and #38534 fail before validation because
actions/checkout@v4refuses the fork checkout inpull_request_target. The aggregate Skill Validation check reports that same failure; no Vally lint or UI test failed in those jobs.This independent change starts from canonical
mainatf8a2f062a8e1b4686a5a3de93bb69cabc02c8c4a. It adapts the bounded Git-data design from local commit304700740f, not that commit's old workflow/preparer/reporting implementation. It contains no UI-evidence or performance-analyzer implementation.Security rationale
github.workflow_sha, with credentials not persisted. Noallow-unsafe-pr-checkout, PR ref checkout, archive extraction, or candidate script execution is introduced.HEADremain unchanged. A read-only token is scoped to acquisition, not model execution.HEAD. Fixture fetching accepts only workflow-revision-approved pins and the trusted sanitized-fixture source revisions.The current #38572 provider/executor restrictions, #38040 sanitized historical fixtures and runtime isolation, and #38573 static-only mode, default-branch manual-source gates,
skill-evaluation-pat-pool, and reporting semantics are retained. The soak workflow, token selector and isolated runtime implementation are unchanged. No permission, secret, environment, model, or paid evaluation configuration is added.Validation
On Windows with session-local Ruby 3.4.10 and actionlint 1.7.12:
code-review,try-fix, andverify-tests-fail-without-fixafter fetching the exact trusted historical source commits. No model was invoked.git diff --checkpassed.The new tests cover candidate policy-byte isolation and missing-file behavior, immutable heads, object/size/path bounds, control-file rejection, snapshot restoration, approved fixture refs, and preservation of sanitized-history dispatch.
Rollout and limitations
This is a base-workflow prerequisite. A fork PR cannot repair its own
pull_request_targetworkflow by carrying these changes. Maintainers must review and land the prerequisite, then obtain fresh runs using that workflow revision. Old-run reruns may retain old workflow code.No workflows or model evaluations were manually dispatched, and no cloud settings were changed. Tokenless local tests do not prove a deployed credentialed Actions run.
Automatic PR checks also expose two unchanged canonical-main Pester failures:
CopilotPipeline.Tests.ps1andReview-PR.Tests.ps1expect the local test reviewer to selectgpt-5.6-sol, whileReview-Tests.ps1selectsgpt-6-astra. The CI run reports 2,268 tests, 2,266 passed and those two failed. Both were reproduced locally; all three files are byte-identical to canonical main. This PR deliberately does not change model policy or weaken those tests. See Pester job. The automatic static job still uses the old base-side fork checkout and fails as expected before this prerequisite lands.The automatic agent job also failed before agent execution: downloading Copilot CLI v1.0.85
SHA256SUMS.txtreturned HTTP 504 on all retries, and the install step exited 22. It was not manually retriggered.Issues Fixed
Addresses the shared checkout blocker observed in #38533 and #38534. Does not close either UI-evidence PR or claim to resolve their measurement review findings.