Repository navigation
Add protected authorization baseline verification - #79287
Conversation
Verify effective authorization and complete generated locks against an externally protected baseline using immutable, offline candidate snapshots. Add fail-closed JSON reports, compiler route inventory, acceptance coverage, and deployment guidance. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
🚀 PR Specification Reviewer has started processing this pull request |
|
✅ Test Quality Sentinel completed test quality analysis. Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs to troubleshoot the error. 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.
|
|
🔍 Design Decision Gate 🏗️ is checking for design decision records on this pull request... |
|
✅ Ponytail Reviewer completed successfully! Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs to troubleshoot the error. 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 is reviewing code quality for this pull request... |
|
🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills... |
Preserve owner-only snapshot directories and read-only files while satisfying the repository permission policy. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Authorization verification can incorrectly report compliance despite action-pinning failures or unpinned remote skill references, allowing mutable dependencies in a supposedly verified snapshot.
3 open issues
What changed in this PR
Adds protected authorization-baseline verification to gh aw validate, using an externally approved policy and an immutable candidate commit to check safe-output authorization and generated workflow integrity.
Changes:
- Adds policy validation, isolated Git snapshots, workflow inventory checks, and structured JSON reports.
- Introduces offline compiler controls, authorization-route inspection, and byte-for-byte lock comparison.
- Adds acceptance tests and documents protected checker deployment and limitations.
| File | Description |
|---|---|
pkg/workflow/safe_outputs_authorization.go |
Records unconfigured generated and internal authorization routes. |
pkg/workflow/engine_definition.go |
Suppresses engine-import lookup hints in offline mode. |
pkg/workflow/compiler.go |
Captures generated YAML without emitting locks. |
pkg/workflow/compiler_types.go |
Adds authorization-verification compiler state. |
pkg/workflow/compiler_orchestrator_workflow.go |
Preserves offline mode when resetting the engine catalog. |
pkg/workflow/authorization_inventory.go |
Exposes resolved authorization routes and staging status. |
pkg/workflow/authorization_inventory_test.go |
Tests route inventory and verification restrictions. |
pkg/workflow/authorization_compiler.go |
Adds read-only snapshot compilation. |
pkg/workflow/action_resolver.go |
Blocks unresolved action lookups in offline mode. |
pkg/parser/remote_resolve_path.go |
Restricts verification imports to the snapshot. |
pkg/parser/import_cache.go |
Stores local-only dependency policy. |
pkg/parser/import_cache_policy.go |
Configures read-only, local-only imports. |
pkg/constants/constants.go |
Adds owner-read-only snapshot permissions. |
pkg/cli/validate_command.go |
Exposes authorization flags and routes validation modes. |
pkg/cli/authorization_verify.go |
Checks bindings, dependency fingerprints, locks, and workflow inventory. |
pkg/cli/authorization_snapshot.go |
Materializes bounded snapshots from raw Git objects. |
pkg/cli/authorization_policy.go |
Defines policy parsing, fingerprints, and result types. |
pkg/cli/authorization_policy_test.go |
Covers policy validation and candidate tampering scenarios. |
pkg/cli/authorization_command.go |
Coordinates trusted inputs, snapshot verification, and reporting. |
docs/src/content/docs/specs/safe-outputs-specification.md |
Links authorization semantics to protected enforcement guidance. |
docs/src/content/docs/guides/authorization-policy.md |
Documents checker setup, reproducibility requirements, and trust boundaries. |
Review effort: Balanced (adaptive)
|
Regarding #79287 (comment): This is a processing-start notice, not an actionable review finding. No code change is needed. |
|
Regarding #79287 (comment): No code change is warranted because the sentinel provides no actionable code finding. The threat-detection tooling failure means this run must not be treated as a clean security analysis. |
|
Regarding #79287 (comment): This announces a design-record check and does not identify a missing record. No code change is requested. |
|
Regarding #79287 (comment): No code change is warranted because the reviewer provides no actionable code finding. The threat-detection tooling failure means this run must not be treated as a clean security analysis. |
|
Regarding #79287 (comment): This is a code-review progress notice without findings. No code change is needed. |
|
Regarding #79287 (comment): This is a review-start notice without findings. No code change is needed. |
Use a shared allowlisted environment for candidate discovery and raw object materialization. Cover inherited repository, alternate-object and configuration poisoning, and clarify platform-bound explicit candidate selection with a regression test. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
Regarding #79287 (comment): Already acknowledged as a processing-start notice; no additional action is needed. |
|
Regarding #79287 (comment): The prior assessment is unchanged: no actionable code finding or additional code change. Failed threat detection is not clean security evidence. |
|
Regarding #79287 (comment): Already acknowledged as a check-start notice, not a missing-record finding; no additional action is needed. |
|
Regarding #79287 (comment): The prior assessment is unchanged: no actionable code finding or additional code change. Failed threat detection is not clean security evidence. |
|
Regarding #79287 (comment): Already acknowledged as a review-progress notice without findings; no additional action is needed. |
|
Regarding #79287 (comment): Already acknowledged as a review-start notice without findings; no additional action is needed. |
|
Regarding #79287 (comment): This prior reply remains accurate; the processing notice requires no additional code change. |
|
Regarding #79287 (comment): This prior reply remains accurate; no additional code change is needed, and failed threat detection is not clean security evidence. |
|
Regarding #79287 (comment): This prior reply remains accurate; the check announcement identifies no missing record and requires no additional action. |
|
Regarding #79287 (comment): This prior reply remains accurate; no additional code change is needed, and failed threat detection is not clean security evidence. |
|
Regarding #79287 (comment): This prior reply remains accurate; the progress notice requires no additional action. |
|
Regarding #79287 (comment): This prior reply remains accurate; the review-start notice requires no additional action. |
Fail closed on unresolved action pins, mutable remote skills, and remote action metadata without inline inputs. Fingerprint canonical resolved dependencies, withhold digests for invalid policy files, and clarify the trusted executable PATH boundary. Add targeted reproducibility, provenance, and disclosure regressions. Co-authored-by: copilot-swe-agent[bot] <[email protected]>


Why
Repository-owned workflow edits can remove authorization enrollment, redirect an authority, or tamper with generated execution gates. Add a read-only verification mode that an independently protected required check can run against an externally approved baseline and the exact candidate commit.
Approach
gh aw validate --authorization-policy ... --jsonwith a closed v1 baseline, checker-supplied platform repository identity, authority fingerprints, and fail-closed findings.Runtime staging and builtin exemptions remain unchanged. This initial verification profile accepts local dependencies and embedded pins only; unresolved inputs are incomplete, not compliant. A passing result requires independently protected checker inputs and is not proof that arbitrary custom code cannot use other write paths.
Validation
make agent-report-progress. Its lint findings were repaired and rechecked separately without repeatingtest-unit.make agent-report-progress-no-testand focused authorization, staging, resolver, and validation-command regression tests passed.golangci-lint run ./pkg/cli ./pkg/workflow ./pkg/parser: zero issues. Custom analyzer output has no findings in changed files; existing findings remain in unchanged files.make check-workflow-drift: all 367 workflow locks remain in sync.npm --prefix docs run test:titles: 33 tests passed.