Skip to content

[docs] auth: Document API-proxy upstream credential-echo masking (AUTH-005) - #11657

Merged
lpcox merged 2 commits into
mainfrom
docs/auth-credential-echo-masking-160835a39264d7a7
Nov 16, 2026
Merged

lpcox merged 2 commits into
mainfrom
docs/auth-credential-echo-masking-160835a39264d7a7

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Caution

Protected files were modified in this change.
This pull request is in request-review mode and requires explicit human scrutiny before merge.

Protected files: README.md

Allow 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.exclude in the workflow Markdown frontmatter. For example, to allow .changeset/*, exclude the folder using .changeset/:

safe-outputs:
  create-pull-request:
    protected-files:
      policy: request-review
      exclude:
        - .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-files is configured, these paths must also match it. Run gh aw compile after updating the workflow.

Summary

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-closed 502 Upstream response could not be safely inspected for unsupported or corrupt encodings.
  • docs/authentication-architecture.md: one bullet under Credential isolation linking to that section.

Canonical Registry Changes

  • AUTH-005 (new, workaround, versions unknown/unknown): the 502 "Upstream response could not be safely inspected" is a response-inspection failure, not a provider auth failure.
    • Probe: docker logs awf-api-proxy filtered for request_error. It is read-only, prints no environment, and exposes no credentials.
    • Provenance: fix: prevent API proxy upstream credential disclosure #11471, containers/api-proxy/credential-protection.js, containers/api-proxy/upstream-http.js, server.credential-isolation.test.js, credential-protection.test.js.
    • docs/diagnostics/README.md was regenerated.
    • The generated .github/agents/diagnose-awf.md and .github/workflows/shared/diagnosis-findings.md are outside the allowlist and were reverted. Trusted CI or a reviewer should run npm run diagnostics:render.

Validation

  • npm run diagnostics:validate passes (29 findings). diagnostics:freshness reports nothing overdue.
  • The implementation and tests listed above were read on main.
  • Markdown structure, relative anchor and code-fence review done on the diff.
  • The diff contains no tokens, keys, JWTs, authorization headers, or credential-bearing URLs.

Coverage and backlog

Sources

Generated by Auth Doctor Updater · copilot · routed: sonnet55 high · ~73 AIC · ⊞ 9.5K · ◷

Adds AUTH-005 and documents response, header and error masking.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added ai-generated documentation Improvements or additions to documentation labels Nov 16, 2026
Copilot AI adaptive review requested due to automatic review settings November 16, 2026 03:25
@github-actions github-actions Bot added documentation Improvements or additions to documentation ai-generated labels Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

Documentation Preview

Documentation has been built for this PR.

Download preview artifact

To view locally:

  1. Download the docs-preview-pr-11657 artifact from the workflow run
  2. Unzip and open index.html in your browser

Built from commit 2b711d7

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

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",
Comment thread docs/api-proxy-sidecar.md Outdated
Comment on lines +592 to +594
- **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.
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Copilot review passed with no inline comments.

@github-actions[bot] Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

@lpcox

lpcox commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

@copilot address review feedback

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

Copilot AI commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

@copilot address review feedback

Addressed in fdac450: regenerated both diagnostic consumers and clarified bodyless-response validation and compressed-body framing.

Copilot AI requested a review from lpcox November 16, 2026 03:38
@github-actions

Copy link
Copy Markdown
Contributor Author

⚠️ Coverage Regression Detected

This PR decreases test coverage. Please add tests to maintain coverage levels.

Overall Coverage

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

@lpcox
lpcox merged commit 63196ba into main Nov 16, 2026
37 of 40 checks passed
@lpcox
lpcox deleted the docs/auth-credential-echo-masking-160835a39264d7a7 branch November 16, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants