Skip to content

Add protected authorization baseline verification - #79287

Merged
pelikhan merged 4 commits into
mainfrom
pelikhan/solid-carnival
Nov 19, 2026
Merged

pelikhan merged 4 commits into
mainfrom
pelikhan/solid-carnival

Conversation

@pelikhan

Copy link
Copy Markdown
Collaborator

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

  • Add gh aw validate --authorization-policy ... --json with a closed v1 baseline, checker-supplied platform repository identity, authority fingerprints, and fail-closed findings.
  • Read raw Git objects into an isolated snapshot, discover the complete workflow inventory, and reuse compiler-owned authorization resolution for native, custom, internal, standalone, launch, and prepared Claim routes. Regenerate complete locks in memory and compare them byte for byte.
  • Add acceptance coverage for enrollment removal, redirected or mutable bindings, staging, imports, deleted sources, forged locks, unexpected executable workflows, and candidate-script non-execution. Document protected checker deployment and its limits.

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

  • Build, schema freshness, and impacted tests passed during make agent-report-progress. Its lint findings were repaired and rechecked separately without repeating test-unit.
  • make agent-report-progress-no-test and 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.

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]>
Comment thread pkg/cli/authorization_snapshot.go Resolved
Comment thread pkg/cli/authorization_command.go Resolved
@pelikhan
pelikhan marked this pull request as ready for review November 19, 2026 15:57
Copilot AI adaptive review requested due to automatic review settings November 19, 2026 15:57
@github-actions

Copy link
Copy Markdown
Contributor

🚀 PR Specification Reviewer has started processing this pull request

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

✅ 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 happened

The threat detection engine failed to produce results.

Review the workflow run logs to troubleshoot the error.

Test Quality Sentinel

Outcome: reported_no_action

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.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⊞ 7.2K · ◷

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Design Decision Gate 🏗️ is checking for design decision records on this pull request...

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

✅ 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 happened

The threat detection engine failed to produce results.

Review the workflow run logs to troubleshoot the error.

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated by Ponytail Reviewer for #79287 · codex · routed: gpt61 medium · ~8 AIC · ⊞ 185 · ◷

@github-actions

Copy link
Copy Markdown
Contributor

🔎 PR Code Quality Reviewer is reviewing code quality for this pull request...

@github-actions

Copy link
Copy Markdown
Contributor

🧠 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]>

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.

🟡 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)

Comment thread pkg/workflow/authorization_compiler.go Resolved
Comment thread pkg/cli/authorization_verify.go Resolved
Comment thread pkg/workflow/authorization_compiler.go Resolved

Copy link
Copy Markdown
Collaborator Author

Regarding #79287 (comment): This is a processing-start notice, not an actionable review finding. No code change is needed.

Copy link
Copy Markdown
Collaborator Author

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.

Copy link
Copy Markdown
Collaborator Author

Regarding #79287 (comment): This announces a design-record check and does not identify a missing record. No code change is requested.

Copy link
Copy Markdown
Collaborator Author

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.

Copy link
Copy Markdown
Collaborator Author

Regarding #79287 (comment): This is a code-review progress notice without findings. No code change is needed.

Copy link
Copy Markdown
Collaborator Author

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]>
Comment thread pkg/cli/authorization_snapshot.go Resolved
Comment thread pkg/cli/authorization_command.go Resolved

Copy link
Copy Markdown
Collaborator Author

Regarding #79287 (comment): Already acknowledged as a processing-start notice; no additional action is needed.

Copy link
Copy Markdown
Collaborator Author

Regarding #79287 (comment): The prior assessment is unchanged: no actionable code finding or additional code change. Failed threat detection is not clean security evidence.

Copy link
Copy Markdown
Collaborator Author

Regarding #79287 (comment): Already acknowledged as a check-start notice, not a missing-record finding; no additional action is needed.

Copy link
Copy Markdown
Collaborator Author

Regarding #79287 (comment): The prior assessment is unchanged: no actionable code finding or additional code change. Failed threat detection is not clean security evidence.

Copy link
Copy Markdown
Collaborator Author

Regarding #79287 (comment): Already acknowledged as a review-progress notice without findings; no additional action is needed.

Copy link
Copy Markdown
Collaborator Author

Regarding #79287 (comment): Already acknowledged as a review-start notice without findings; no additional action is needed.

Copy link
Copy Markdown
Collaborator Author

Regarding #79287 (comment): This prior reply remains accurate; the processing notice requires no additional code change.

Copy link
Copy Markdown
Collaborator Author

Regarding #79287 (comment): This prior reply remains accurate; no additional code change is needed, and failed threat detection is not clean security evidence.

Copy link
Copy Markdown
Collaborator Author

Regarding #79287 (comment): This prior reply remains accurate; the check announcement identifies no missing record and requires no additional action.

Copy link
Copy Markdown
Collaborator Author

Regarding #79287 (comment): This prior reply remains accurate; no additional code change is needed, and failed threat detection is not clean security evidence.

Copy link
Copy Markdown
Collaborator Author

Regarding #79287 (comment): This prior reply remains accurate; the progress notice requires no additional action.

Copy link
Copy Markdown
Collaborator Author

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants