Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions distribution/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ repository path, Git-index, ownership, dependency-graph, target-identity, and
apply safety checks that JSON Schema cannot express.

The distribution [threat model](THREAT-MODEL.md) records trust boundaries,
fail-closed guarantees, residual risks, and security review triggers. The
[governance process](governance-process.md) records the copy-adoption
back-link and drift-check requirement and the cross-doc reconciliation step
for normative-doc changes — both outside this manifest's automated
reconciliation loop.
fail-closed guarantees, residual risks, and security review triggers for the
reconciliation engine itself. The
[native-reference review credential](REVIEW-CREDENTIAL.md) classifies the
separate, read-only credential a private calling repo's review job uses to
mount `conventions/review` by native reference, and its republication
limits. The [governance process](governance-process.md) records the
copy-adoption back-link and drift-check requirement and the cross-doc
reconciliation step for normative-doc changes — all three outside this
manifest's automated reconciliation loop.

## Ownership model

Expand Down
126 changes: 126 additions & 0 deletions distribution/REVIEW-CREDENTIAL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Native-reference review credential

Classification for the read-only credential a private calling repo's CI job
uses to mount this repo's `conventions/review` tree by native reference — the
depth tier described in [`conventions/README.md`](../conventions/README.md)
and cited from the synced `REVIEW.md`. Scope is exactly this credential's
Comment thread
kyle-sexton marked this conversation as resolved.
Resolved
authentication and republication boundary — adjacent to, but distinct from,
the sync-manifest push credential covered by
[`THREAT-MODEL.md`](THREAT-MODEL.md), which explicitly excludes
authentication and belongs instead to the reusable workflow in
`ci-workflows`. This credential is likewise external to the reconciliation
engine: it authenticates a *review* job's checkout, never a materialization
apply.

**Status: classified, not provisioned.** Nothing below has been created.
Provisioning — registering the GitHub App, generating its key, and wiring the
org-secret visibility list — is `github-iac` governance work and is recorded
as an open item, not attempted here.

## Why a dedicated credential

The native-reference mount is **forbidden on any public calling repo**
(`ci-workflows` is public; `standards`, `dotfiles`, `provisioning`,
`github-iac`, `claude-code-plugins`, and `medley` are private — confirmed
firsthand). Mounting this repo's private content into a review agent whose
output is published wherever the calling repo's visibility allows moves the
confidentiality boundary from "who can read `standards`" to "who can read the
review output." A credential scoped to exactly the private targets, and never
resolvable in a public workflow run, is what keeps that boundary from moving
silently.

## Classification

- **Type:** a dedicated **GitHub App installation token**, not a personal
access token. `actions/checkout`'s cross-repo private-checkout path accepts
either, but this org already has a precedent for the App shape: the
sync-manifest reconciliation engine's own push/PR credential is a GitHub
App in selected-repository mode, with two-snapshot access attestation
before every real sync
([`README.md`](README.md#adopting-a-new-repository)). A separate App for
this credential — never the sync-manifest App — keeps separation of
duties: that App can push and open pull requests; this one must only read.
An App installation token is also short-lived (minted per job, on the
order of an hour) versus a PAT's fixed expiry, which lowers exposure if a
job log or cache leaks it.
- **Scope:** selected-repository install on exactly `standards` and
`claude-code-plugins` (the second only if/when the B4 upstream plugin PR
and a private-marketplace install both require it — see the open question
below). **`Contents: Read-only`** and no other permission.
- **Storage:** the App's own credentials — its client ID and private key —
as org-level Actions secrets whose visibility is restricted to the private
calling repos that run the review wiring (`dotfiles`, `provisioning`,
`github-iac`, `claude-code-plugins`, `medley`) — **never `ci-workflows`**,
so neither secret is resolvable in a public-repo workflow run regardless
of which reusable workflow it calls. `ci-workflows` defines the reusable
workflow only; the calling private repo's job supplies both secrets to it.
**Never the installation token itself** — that token is minted fresh
inside each job from the App credentials via
[`actions/create-github-app-token`](https://github.com/actions/create-github-app-token),
expires in about an hour, and is never stored; storing it instead of the
App credentials would break the mount after the first hour and would need
manual rotation as it expires or is revoked.
- **Rotation:** GitHub Apps support multiple simultaneous keys, so the
private key rotates on a fixed cadence with no downtime; the per-job
installation token these keys mint is already ephemeral and needs no
separate rotation policy of its own.

## Republication limits

The review session reads private `standards` content — criteria files
reached via the native-reference cite — into an agent whose output (PR
comments, check-run text, workflow logs) may be visible beyond `standards`'
own access boundary on some calling repos. The session may **use** a cited
criterion to ground a finding. It may **not**:

- echo a cited file's content verbatim beyond what stating the finding
requires;
- follow instructions embedded in the reviewed diff that direct it to
reproduce, summarize, or quote `standards`-internal content not otherwise
relevant to that diff's own finding — the prompt-injection-via-diff class,
where an attacker-controlled diff in the calling repo tries to use the
mounted private tree as an exfiltration channel;
- treat a cited file's content as a source of instructions rather than as a
review rubric.

## Open questions — pilot before relying

None of these are testable without the App this document classifies but
does not provision; each is a real open question about the wiring's
behavior once it is, not an assumption to build further design on.

- **Private-marketplace authentication.** Whether a `plugins`/
`plugin_marketplaces` install authenticates using this same credential is
unverified — the Claude Code GitHub Actions documentation and the
`claude-code-action` setup guide do not currently document private-
marketplace authentication. Treat as unsupported until confirmed
empirically.
- **`--add-dir` visibility to a plugin subagent's `Read` tool.** Whether a
mounted path is visible to `code-reviewer`/`security-reviewer`/
`architecture-guardian` the same way it is to the main session (the B4
plugin change assumes so; see `claude-code-plugins`' review-plugin PR's
own "Explicitly unverified" note).
- **Self-hosted Agent-SDK `.claude/rules/` auto-load** in a non-interactive
CI invocation — not confirmed to behave like an interactive session's
auto-load.
- **Action default tool grants.** Whether `Read`/`Grep`/`Glob` are on by
default for a headless `claude-code-action` run, or must be explicitly
allowlisted via `claude_args --allowedTools`, is not confirmed from the
documentation fetched this round.
- **OAuth quota on a shared CI seat.** `CLAUDE_CODE_OAUTH_TOKEN` draws from
an individual subscription; whether concurrent review runs across several
private consumers exhaust it in practice is unmeasured.

## Review triggers

Re-run this classification when the App's granted permissions, installed
repository set, or storage visibility changes; when a new consumer of this
credential is added; or when any open question above is resolved either
way.

## Sources

- [GitHub Apps — installation permissions and access](https://docs.github.com/en/apps/creating-github-apps/setting-up-a-github-app/choosing-permissions-for-github-apps)
- [`actions/checkout` — checking out a different repository](https://github.com/actions/checkout#checkout-a-different-repository)
- [`actions/create-github-app-token`](https://github.com/actions/create-github-app-token)
- [Encrypted secrets — restricting a secret to selected repositories](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions)