Repository navigation
Add GitHub self-governance, docs, policies, CI, and trust-authority scaffolding - #14
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b88fe08d0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| if (req.method === "POST" && url.pathname === "/re/authorize") { | ||
| const body = await parseBody(req) as AuthorizeRequest |
There was a problem hiding this comment.
Handle invalid JSON without crashing the authority server
The /re/authorize handler awaits parseBody(req) without any try/catch, and parseBody explicitly rejects on malformed JSON. Because this callback is async in http.createServer, a bad payload causes an unhandled rejection that terminates the Node process instead of returning a 4xx response, so any malformed request can take the authority service down.
Useful? React with 👍 / 👎.
| if [ "$DECISION" != "PERMIT" ]; then | ||
| echo "Fail-closed: decision=$DECISION receipt=$RECEIPT" | ||
| exit 1 |
There was a problem hiding this comment.
Let STEP_UP and ESCALATE reach the approval job
This step fails the protected-action-gate job for every non-PERMIT decision, but step-up-approval depends on that job via needs. In GitHub Actions, failed dependencies prevent downstream jobs from running unless they use always(), so STEP_UP/ESCALATE decisions never reach the intended manual environment approval path and the workflow hard-fails immediately.
Useful? React with 👍 / 👎.
Motivation
Description
CODEOWNERS, workflows for CI and TTP-protected gates (.github/workflows/ci.yml,ttp-protected-gate.yml,ttp-governed-pr-action.yml).docs/github-self-governance-reference-architecture.md, API contractruntime/api/re-authorize.contract.md, authority service scaffoldservices/authority/*, receipt schemareceipts/schemas/execution-receipt.v1.jsonand extended receipt schemaspec/extensions/execution-receipt-v2.schema.json.agents/manifests/role-agents.yaml,agents/*/manifest.json) and a docs-oriented agentagents/docs-dx/manifest.jsonto model workload identities and allowed actions.policy/*.yaml,docs/protected-action-model.md,examples/acceptance/protected-workflow-edit.md, andpolicy/github-self-governance-policy.yamlto enumerate protected paths and outcomes.CONTRIBUTING.md,README.mdupdates, manydocs/*.md(getting-started, operator-guide, repo-access-control, public-readiness, ecosystem-integrations, roadmap, open-source-boundary, scim-re mapping, etc.).reference-implementations/trust-authority/jest.config.cjs,src/aggregation.test.ts), updatedpackage.jsondev deps, small crypto fixes toed.etc.sha512Syncusage insrc/crypto.ts,src/index.ts, and key-generation script, added admin listing route and store helpers (listAgents,getAgentReceiptsAcrossDomains) and store metric support.services/authority/index.ts,receiptSigner.ts,schemas.ts,policyLoader.ts) implementingPOST /re/authorizedecision flow, chain-hash/receipt signing, and protected-path checks.Testing
reference-implementations/trust-authority/src/aggregation.test.tsand executed withnpm test(Jest); the test suite (three assertions covering insufficient-data, score bounds, and issuer-weight capping) passed./.github/workflows/ci.ymlis configured to runnpm install,npm run build, andnpm testforreference-implementations/trust-authorityon PRs and pushes tomain/work(no CI run failures reported here).Codex Task