Repository navigation
docs: specify OIDC-based AW activation admission - #70286
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ 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.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Ponytail Reviewer completed successfully!
|
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
L329-365: shrink: acceptance matrix duplicates the normative sections. Keep a compact behavior matrix and move permutations to implementation tests.
L371-377: shrink: implementation plan restates earlier requirements. Replace it with an owner-to-section map.
net: -30 lines possible.
Generated by ✂️ Ponytail Reviewer for #70286 · codex · gpt56 · 13.5 AIC · ⌖ 5.38 AIC · ⊞ 14.7K
Comment /ponytail to run again
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
Request changes
This spec has two blocking contract problems: it widens OIDC minting to repo-controlled activation hooks, and it redefines workflow_id/workflow_call_id incompatibly with current gh-aw behavior.
Blocking themes
- Granting
id-token: writeto the existing activation job is not isolated today because custom activation setup/pre/step scripts are compiled into that same job. - The request identity examples and field definitions do not match the values gh-aw currently emits in
aw_info.json, especially for reusable workflows. - This was a static diff review only; I did not run code or tests.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 42.6 AIC · ⌖ 6.14 AIC · ⊞ 15.9K
Comment /review to run again
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /grill-with-docs and /codebase-design (per pr-triage: change_type=documentation) — two minor clarification suggestions, no blocking issues.
📋 Key Themes & Highlights
Key Themes
- Daily-cap interaction gap: Section 7 defines the per-run ceiling composition with local per-run limits but never states how it relates to the existing max-daily-ai-credits 24-hour window documented in docs/reference/cost-management.md.
- Validator contract underspecified: Implementation Plan step 1 references adding the three managed variables to gh aw env get/update but doesn't name the specific validation rules (HTTPS-only, no embedded credentials/expressions) that should live in pkg/cli/env_command.go, mirroring the existing validateNonZeroInt/validatePositiveInt pattern.
Positive Highlights
- ✅ Excellent terminology fidelity: aw_info.workflow_id/workflow_call_id, gh-aw.max_ai_credits OTel attribute, and ERR_* naming convention all match real codebase usage verified against generate_aw_info.cjs, aw_context.cjs, and send_otlp_span.cjs.
- ✅ All 35 acceptance-test table rows (ADM-001..ADM-035) are present and counted correctly; relative links to compiler_activation_context.go, compiler_activation_permissions.go, env_command.go, and the two .cjs files all resolve.
- ✅ Clear separation of concerns between gh-aw (OIDC client, activation step, budget propagation) and gh-cao (verification, policy, App credentials) with explicit "no job added" and "no credential fallback" invariants repeated consistently throughout.
- ✅ Threat model is unusually rigorous for a spec: timing-independent denials, trace-context untrusted-input handling, and explicit non-goals (not a billing API, not a hard spend cap) are called out up front and reinforced in Section 9.
No code changes accompany this PR (pure spec), so /tdd and /diagnosing-bugs don't apply — correctly excluded by triage.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 108.9 AIC · ⌖ 15 AIC · ⊞ 10.1K
Comment /matt to run again
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Unresolved invocation-identity and admission-lifecycle contracts prevent a consistent, safe implementation.
No open issues 🎉
What changed in this PR
Adds a specification for OIDC-authenticated admission within gh-aw’s existing activation job. Runtime implementation remains future work.
Changes:
- Defines managed configuration, authentication, retries, and outage behavior.
- Specifies credit ceilings, telemetry correlation, and credential/privacy boundaries.
- Includes an implementation plan and 35 acceptance scenarios.
| File | Description |
|---|---|
specs/admission-service-spec.md |
Defines the admission protocol, security requirements, and implementation plan. |
Review effort: Max
Model cooperative activation, OIDC identity, retries, outage policy, privacy, shared credit ceilings, and telemetry correlation. Register exhaustive profiles, synthetic controls, and reachability witnesses in the pinned TLC runner. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Align executing workflow identity and call IDs with existing metadata, clarify job-wide OIDC and ambiguous reusable invocations, preserve independent daily limits, and map implementation ownership and validation requirements. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Accepted the substantive clarifications: Section 7 now preserves the independent rolling 24-hour daily guardrail, and Section 12 names URL, audience, and outage-policy validation for both CLI-managed and effective runtime values. This remains a specification-only change. |
|
Accepted the no-change disposition, but not as evidence that validation succeeded. I independently checked the request against the actual call-ID helper, ran the 24 checker unit tests, and built the Astro documentation with link validation; admission runtime conformance remains future implementation work. |
|
Partially accepted the underlying review: the request now uses the executing workflow references and call IDs emitted by |
|
Partially accepted: Section 12 is now an owner-to-contract map instead of a repeated implementation checklist. All 38 acceptance categories and their security edge cases remain because this downstream specification needs a conformance contract; concrete fixture permutations belong in the implementation tests. |
|
Partially accepted the saved themes: the workflow identity contract now matches existing |
Add configuration, retry/outage, and shared-budget flows. Consolidate credential flows so each numbered section has at most one diagram. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Document GitHub token issuance, request and claim bindings, public issuer/JWKS verification, optional App-backed run-attempt lookups, and continuation through the existing activation graph. Link every GitHub API exchange to its official documentation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use /api/admission throughout the route and audience examples. Require strict expiration checks on every request and before success, including cache hits, with blocking uniform denials and stable decisions across valid token renewal. Document expiration acceptance cases and the formal model's clock abstraction. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restore the prior expiration wording, acceptance cases, and formal-model documentation while preserving the /api/admission endpoint rename. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Require revocation of independently minted runtime installation tokens and recommend conditional, pinned actions/create-github-app-token cleanup. Distinguish installation-token revocation from non-revocable Actions OIDC JWTs, preserve OIDC-only admission, and add cleanup acceptance coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🎉 This pull request is included in a new release. Release: |
Motivation
Define centralized cost controls for participating AW workflows as a cooperative admission check—not an unbypassable organization policy or hard spending cap—without forwarding repository API credentials or exposing AI Credit spend through denial diagnostics.
Design
Adds a new-feature specification, bounded formal model, and implementation plan only; no admission runtime implementation is included. The Astro-ready page lives alongside the other published specifications at
docs/src/content/docs/specs/admission-service-specification.mdand describes a generic admission authority server. Example URLs use the neutral, reservedadmission.example.orgdomain.POST /api/admissionfrom the existing activation job, with execution identity and distinctactor/triggering_actorvalues in a JSON body. No additional job or alternate authentication path. Policy or accounting use of the rerun initiator requires independent run-attempt verification; original actor privileges remain unchanged.ignore, withblockavailable. Explicit denials, malformed success responses, and fatal configuration/credential errors block.200JSON response containingmax_ai_creditsfor the verified workflow invocation and a service-generated opaquecorrelation_id. Preserve stricter local credit limits, share the ceiling across continuations, and block enforcement failures. Keep uniform empty denials and do not expose remaining organization credit.gh-aw.admission.correlation_idon subsequent workflow OTel records across jobs and processes, independently of W3C trace/span IDs.traceparentis optional when AW OTel is disabled; admission does not require enabling client tracing/export. Successful admission still requires the service correlation ID.DELETE /installation/token. Consider conditional, commit-SHA-pinnedactions/create-github-app-tokenwith its default post-job revocation enabled; report cleanup failures and keep tokens job-local. This action does not mint or revoke OIDC JWTs, and GitHub provides no documented Actions OIDC-token revocation endpoint. Admission remains OIDC-only and does not introduce runtime App credentials.Formal model
specs/workflow-security/ActivationAdmission.tlaand its TLC configuration formalize activation gating, verified identity and rerun metadata, retry/outage classification, stable invocation-bound decisions, effective shared credit budgets, response privacy, financially side-effect-free admission, and optional tracing with service correlation. The shared checksum-pinned checker supports--model admissionand includes admission in default runs.The model has 23 safety/type invariants and a weak-fairness termination property. Four secure profiles cover both outage policies with OTel enabled/disabled; 20 synthetic negative controls and eight reachability witnesses exercise the guards and intended paths. Witnesses explicitly demonstrate no-endpoint and fail-open execution, cross-replica lost-response recovery, verified reruns, untraced admission, and credit consumption on both sides of a continuation.
Security boundaries
Repository variables can override organization variables, including shadowing the endpoint with an empty value or choosing fail-open behavior. Workflow editors can omit the step or change its environment wiring. The gate therefore cannot mandate participation or provide an unbypassable organization policy or hard spending cap. Stronger enforcement must occur independently at the controlled AI/backend resource.
The plan covers job-wide
id-token: writeaccess and the fail-open tradeoff. Skipped or fail-open executions preserve existing local controls without fabricating a service allowance or correlation ID. GitHub App credentials do not authenticate the workflow or mint its OIDC token.Formal verification is bounded and applies to the reference state machine, not an implementation. Cryptographic verification, runtime installation-token revocation, HTTP/JSON parsing, trusted URL handling, distributed cache concurrency/expiry, entropy, timing/logging privacy, and actual runtime billing enforcement remain implementation obligations. Synthetic counterexamples are not confirmed product vulnerabilities. Client and admission authority server implementations remain future work.
Validation
BASE_REF=88d48aeea7 make agent-report-progressnpm --prefix docs run validate-links— Astro production build (286 pages), all internal links validpython3 -m unittest discover -s specs/workflow-security -p 'check_test.py'— 24 tests passedignoreprofile and 39,416 perblockprofile