Repository navigation
[docs] auth: Document API-proxy upstream credential-echo masking (AUTH-005) - #11657
Conversation
Adds AUTH-005 and documents response, header and error masking. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit 2b711d7 |
There was a problem hiding this comment.
🟡 Changes recommended
The change still has unresolved documentation accuracy and diagnostics-registry synchronization issues, including stale generated consumers that will fail the repository’s freshness check.
3 open issues
What changed in this PR
Documents API-proxy upstream credential-echo masking and adds the corresponding AUTH-005 diagnostic finding, including fail-closed response-inspection behavior.
Changes:
- Documents masking across response bodies, headers, compressed responses, errors, logs, and WebSocket traffic.
- Links credential-echo protection from the authentication architecture documentation.
- Adds AUTH-005 to the canonical diagnostics registry and README indexes.
- Generated diagnosis consumers under
.github/still require regeneration, and the masking documentation should clarify bodyless and compressed-response framing behavior.
| File | Description |
|---|---|
| docs/diagnostics/README.md | Adds AUTH-005 to the diagnostic finding and symptom indexes. |
| docs/diagnostics/findings/auth/AUTH-005.json | Defines the canonical AUTH-005 finding for upstream response-inspection failures, including symptoms, probe guidance, workaround, and provenance. |
| docs/authentication-architecture.md | Links credential-isolation guidance to the API-proxy upstream credential-echo masking documentation. |
| docs/api-proxy-sidecar.md | Documents API-proxy credential-echo masking coverage and fail-closed handling for unsafe upstream responses. |
Review effort: Lite (dynamic)
| | AUTH-002 | auth | API-proxy OIDC mode is configured but the Actions token request variables are missing | workaround | [`findings/auth/AUTH-002.json`](./findings/auth/AUTH-002.json) | | ||
| | AUTH-003 | auth | gh-aw-launched HTTP MCP GitHub server fails the OIDC boundary check | workaround | [`findings/auth/AUTH-003.json`](./findings/auth/AUTH-003.json) | | ||
| | AUTH-004 | auth | Primary API-proxy OIDC initialization races Squid readiness | fixed | [`findings/auth/AUTH-004.json`](./findings/auth/AUTH-004.json) | | ||
| | AUTH-005 | auth | API-proxy refuses an upstream response it cannot safely inspect for credential echoes | workaround | [`findings/auth/AUTH-005.json`](./findings/auth/AUTH-005.json) | |
| @@ -0,0 +1,38 @@ | |||
| { | |||
| "$schema": "../../schema.json", | |||
| "id": "AUTH-005", | |||
| - **Response bodies** are masked in a stream, holding back only a suffix that could complete a credential in the next chunk. Masking is same-byte-length (a byte that does not occur in any credential), so successful JSON, UTF-8 output and length framing are preserved. JSON-escaped forms are masked as well. | ||
| - **Response headers** whose name or value contain a credential are dropped or masked, and integrity headers (`ETag`, `Content-MD5`, `Digest`, `Content-Digest`, `Repr-Digest`) are removed from masked responses because they describe the original bytes. | ||
| - **Compressed responses** (`gzip`, `deflate`, `br`) are decoded, masked and re-encoded. An unsupported `Content-Encoding`, or a corrupt or truncated stream, fails closed: the client receives `502` `Upstream response could not be safely inspected` (or the connection is aborted) instead of unmasked bytes. |
|
✅ Copilot review passed with no inline comments. @github-actions[bot] Add the |
|
@copilot address review feedback |
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Addressed in |
|
| Metric | Base | PR | Delta |
|---|---|---|---|
| Lines | 94.06% | 94.05% | 📉 -0.01% |
| Statements | 92.65% | 92.64% | 📉 -0.01% |
| Functions | 93.29% | 93.29% | ➡️ +0.00% |
| Branches | 87.07% | 87.06% | ➡️ -0.01% |
📁 Per-file Coverage Changes (1 files)
| File | Lines (Before → After) | Statements (Before → After) |
|---|---|---|
src/nvx/one-shot-process.ts |
84.0% → 81.5% (-2.47%) | 76.8% → 74.7% (-2.11%) |
Coverage comparison generated by scripts/ci/compare-coverage.ts


Caution
Protected files were modified in this change.
This pull request is in
request-reviewmode and requires explicit human scrutiny before merge.Protected files:
README.mdAllow intentional protected-file changes
If this workflow is intended to modify these files, add specific filenames or folder prefixes to
safe-outputs.create-pull-request.protected-files.excludein the workflow Markdown frontmatter. For example, to allow.changeset/*, exclude the folder using.changeset/:Keep your existing policy and exclusions. Folder exclusions use path prefixes, not glob patterns, and allow all files beneath that folder, including subfolders. Other protected files still require review. If
allowed-filesis configured, these paths must also match it. Rungh aw compileafter updating the workflow.Summary
reviewQueue.firstTime: 101 candidates,deferred: 0). No open[docs] auth:PR existed.mainonly. No pending work is presented as shipped.Documentation Changes
docs/api-proxy-sidecar.md: new "Upstream credential-echo masking" subsection under Security benefits. It covers what is masked, same-byte-length masking, dropped integrity headers, and the fail-closed502 Upstream response could not be safely inspectedfor unsupported or corrupt encodings.docs/authentication-architecture.md: one bullet under Credential isolation linking to that section.Canonical Registry Changes
workaround, versionsunknown/unknown): the 502 "Upstream response could not be safely inspected" is a response-inspection failure, not a provider auth failure.docker logs awf-api-proxyfiltered forrequest_error. It is read-only, prints no environment, and exposes no credentials.containers/api-proxy/credential-protection.js,containers/api-proxy/upstream-http.js,server.credential-isolation.test.js,credential-protection.test.js.docs/diagnostics/README.mdwas regenerated..github/agents/diagnose-awf.mdand.github/workflows/shared/diagnosis-findings.mdare outside the allowlist and were reverted. Trusted CI or a reviewer should runnpm run diagnostics:render.Validation
npm run diagnostics:validatepasses (29 findings).diagnostics:freshnessreports nothing overdue.main.Coverage and backlog
needs-evidencein receipts and stay in the backlog. Most are non-auth (refactors, CI, model-source refreshes, budget steering).Sources