Skip to content

fix(record): write request headers by allowlist (#1466) - #1469

Merged
amiddavid merged 4 commits into
mainfrom
fix/record-header-allowlist
Nov 26, 2026
Merged

amiddavid merged 4 commits into
mainfrom
fix/record-header-allowlist

Conversation

@amiddavid

@amiddavid amiddavid commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Behavior change (needs a human yes)

  • Who: operators who run with --record, and any replay or analysis that reads the headers field of a .wire.jsonl file.
  • Old: the recorder wrote every header except those with a credential-like name.
  • New: the recorder writes only listed headers. Any other header is dropped.
  • Off switch: none. This is a security fix.

Summary

A credential under an unexpected header name reached the wire file. Now only an allowlist of safe names is written. Fixes #1466.

What changed

  • internal/record/wire.go: dropHeader (name denylist) is gone. allowedHeaders and headerAllowed replace it. AllowedHeaders is the one shared filter. wireHeaders still redacts each value.
  • proxy/proxy.go: the proxy copies only allowed names (record.AllowedHeaders), not r.Header.Clone().
  • Allowlist, generic names (internal/record): content-type, accept, accept-encoding, user-agent, anthropic-version, anthropic-beta, openai-beta, and the x-stainless- prefix. The prefix is trusted because Stainless telemetry has a fixed shape.
  • Correlation ids (agent.CorrelationHeaders): the list lives in package agent and uses the constants the client parsers use. It holds x-claude-code-agent-id (agent/claudecode), session-id, thread-id, x-codex-parent-thread-id (agent/codex), x-opencode-session-id, x-opencode-parent-session-id (agent/opencode) and x-task-id. A test checks the record allowlist holds every name in that list.
  • Readers: agent.Identify reads the claudecode, codex and opencode ids. x-task-id is read by agent/bob (SessionID), apply/apply.go (the host id of a route) and proxy/recctx.go (the recorder's session key).
  • Dropped: x-claude-code-session-id. Nothing in the repo reads it. Claude Code names its session in the body.
  • Rule: a new header is dropped until someone adds it to the list on purpose.
  • Replay (Inference-Perf) reads no header.

How it was tested

macOS, Go 1.27.4.

  • End to end through the proxy with --record on: X-Passwd, X-Signature, X-Bob-Session, Authorization and X-Api-Key carry sk-test-SECRET-123. The whole record directory has no secret. anthropic-version is kept.
  • proxy/credmask_test.go: heldAuth keeps only auth headers. maskHeaders differs from the plaintext and unmasks back. target and Dispatcher show no secret under encoding/json, %+v, %v and %#v.
  • CONTEXT_GURU_CAPTURE through the handler and directly: no header, no secret in the file.
  • Mutation: a denylist put back in headerAllowed fails TestRecordWritesHeadersByAllowlist, TestWireHeadersDropCredentials and TestAllowedHeadersCopiesOnlyListedNames.
  • go build ./... and -tags cg_record, go vet, plain go test of internal/record, proxy and components/all, and -race -run on the new tests: all pass.

Local tests: waived (owner rule)

Data dependence

Trace recording stays a content feature. This PR lowers what it stores. It adds no data dependence. The row in docs/data-dependence/features/trace-recording.md has a new note, and gen-datadep is run.

Open questions

  • Does any replay or analysis tool read a header that is now dropped? The repo has none.
  • Is x-task-id (Bob) fine to keep? The agent package reads it as a session id.

The recorder dropped a header only when its name was on a denylist.
A credential under another name (X-Passwd, X-Signature, a gateway
session header) reached the .wire.jsonl file.

- record.AllowedHeaders and wireHeaders keep only listed names.
- The proxy copies only listed names when it queues an event.
- Tests: end to end through the proxy, credmask gaps, target and
  Dispatcher serialization, CONTEXT_GURU_CAPTURE.

Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: DAVID AMID <[email protected]>
@amiddavid amiddavid added the priority: high Blocking or user-facing; should be picked up soon label Nov 26, 2026
Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: DAVID AMID <[email protected]>

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 2 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.332 offload-review skill, @amiddavid's session fresh 2 of 2 1 of 4 a9fa5b882d23 blocking

Verdict: blocking

Findings

  1. internal/record/wire.go:96-104 — the allowlist names one client's headers outside agent.Identify and the agent packages
    • What fails: the allowlist hardcodes a second copy of the client header names that package agent owns: x-claude-code-agent-id (agent/claudecode/claudecode.go:18), session-id, thread-id, x-codex-parent-thread-id (agent/codex/codex.go:48-50), x-opencode-session-id, x-opencode-parent-session-id (agent/opencode/identify.go:22-23), x-task-id (agent/bob/bob.go:34). The copy can drift. When a client renames its session header, or a new client joins, agent is updated and the recorder is not: the wire file silently loses that client's correlation ids. No test fails, because nothing ties the two lists together. The drift exists already: x-claude-code-session-id (wire.go:97) is on the list, but no code in this repo reads it — agent/identify.go:50 says Claude Code names its session in the body. The PR body calls the list "the id headers package agent reads", which is not true for that entry. CLAUDE.md, Client-specific code: "if a rule names one client, it lives in agent.Identify, and nowhere else"; a header of one client outside the agent packages is a blocking finding. A PR that adds a client rule also updates docs/client-coverage.md; this one does not.
    • Proof: grep -rn "x-claude-code-session-id" hits only internal/record/wire.go:97 and internal/record/wire_test.go:105. grep -rn "x-task-id" in agent/ hits only agent/bob/bob.go:34. Each allowlisted id header duplicates a constant or literal in an agent package.
    • Fix: export the correlation header names from package agent (one list, built from the same constants the Identify parsers use), and build the id part of allowedHeaders from it in internal/record. Keep only the generic names (content-type, accept, accept-encoding, user-agent, the version and beta flags, x-stainless-) local to record. Cite the source and version for x-claude-code-session-id, or drop it if nothing sends it. Update docs/client-coverage.md if the row changes.

Non-blocking

  • internal/record/wire.go:51 — the WireCall.Headers comment still says "Wire removes credentials". proxy/recctx.go:28 says "credentials are removed when written". Both describe the old denylist. Say "allowlisted" instead.
  • internal/record/wire.go:110 — the x-stainless- prefix match accepts any suffix an SDK adds later. Safe today: the values still pass Content, and the SDK's telemetry names carry no credential. Worth a line in the comment that the prefix is trusted because Stainless telemetry is fixed-shape.
  • proxy/recordheaders_test.go runs only under -tags cg_record. CI runs that tag (ci.yaml line 259), so the coverage is real. The untagged internal/record tests also pin the allowlist.

What I checked

  • The full diff f9ec697c..a9fa5b88, and the code around each change: internal/record/wire.go, proxy/proxy.go (serve's record defer), proxy/sessionrec.go, proxy/recctx.go, proxy/credmask.go, proxy/dispatcher.go.
  • Every allowlisted name against its reader. Generic names: content-type, accept, accept-encoding, user-agent, anthropic-version, anthropic-beta, openai-beta, x-stainless-. Client id names: see finding 1. Credential names (authorization, x-api-key, x-goog-api-key, cookies, x-context-guru-) are all excluded.
  • The redaction chain: AllowedHeaders filters at the queue (proxy.go:1947), wireHeaders filters again and passes each value through Content (wire.go:141). The second guard is real: Content runs identity, internal/redact, extra shapes and a base64 pass (redact.go:117-127).
  • Other request-header sinks: the OTLP path (record.TurnFromCall, ProxiedCall) carries no headers; the dashboard content capture and store hold no request headers; CONTEXT_GURU_CAPTURE writes provider, model and body only. The wire file was the only sink, and it is fixed.
  • Replay impact: the wire loader in this repo reads no header; the Inference-Perf converter is external and the PR states it reads none. The loader-relevant fields (path, bodies, status, times, model) are unchanged.
  • Tests: the new internal/record tests and both new proxy test files compile against the current helpers (newTestRecorder, wireLines, testSSE, ccBody in sessionrec_test.go; heldAuth, maskHeaders, credMask, zeroHeaders, captureRequest, NewDispatcher in untagged files). credmask_test.go is correctly untagged; recordheaders_test.go is correctly tagged cg_record. No time.Sleep; the timingguard rule is met.
  • Data dependence: the row file docs/data-dependence/features/trace-recording.md and the generated page carry the same new text; datadep.Build joins the row body with single spaces, which matches the page diff. TestGeneratedPageIsUpToDate enforces it. The change lowers what the feature stores and the row says so.
  • Behavior change: named at the top of the PR (who, old, new, no off switch). The PR author is the row's "Decided by" owner.
  • Host boundary: the filter lives in internal/record (a library package); the proxy change is one call. No business logic was added to a host package.
  • Fail-open: AllowedHeaders cannot fail or panic on any input, including nil. The record path keeps its own recover.
  • Commit: DCO sign-off present, Assisted-By: used, no binaries, no go.mod change.

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.332 offload-review skill, @amiddavid's session fresh 1 of 2 1 of 4 a9fa5b882d23 blocking

Verdict: blocking

Findings

  1. internal/record/wire.go:96-104 — the allowlist hardcodes one-client headers outside the agent packages, and its justification is false for two entries
    • What fails: CLAUDE.md says a header that only one client sends lives in agent.Identify and the agent packages, nowhere else. This allowlist copies eight such names into internal/record. The comment (wire.go:83-84) says they are "correlation ids that package agent reads". Package agent does not read two of them:
      • x-claude-code-session-id (wire.go:97): no reader in any Go package. agent/identify.go:50 says Claude Code names its session in the body, not in a header.
      • x-task-id (wire.go:104): Bob's route id. Its readers are apply/apply.go:387 and proxy/recctx.go:83, not package agent.
        The PR body repeats the false claim: "the id headers package agent reads", and "The agent package reads it [x-task-id] as a session id".
    • Why it matters: the names duplicate knowledge the agent packages own (agent/claudecode/claudecode.go:18, agent/codex/codex.go:48-50, agent/opencode/identify.go:22-23). When a client renames or adds an id header, the agent packages update and the recorder silently drops the new header from traces. No test fails. The comment then goes stale in the way CLAUDE.md bans. Also, the allowlist's own rule is "add it here on purpose, and only when it can never carry a credential". Two entries sit on the list with a reason that is not true, so that rule was not applied to them.
    • Fix: export the id-header names from package agent as one list, next to Identify. Build the record allowlist from that list plus the generic names (content-type, accept, accept-encoding, user-agent, the version and beta flags). Correct or drop the x-claude-code-session-id and x-task-id entries, or justify them with their real readers. Update docs/client-coverage.md for the client entries that stay in record.

Non-blocking

  • internal/record/wire_test.go:80-81: the test comment still describes the old design ("A credential in a header nobody expected is still caught, by redacting every value"). Now such a header is dropped, not redacted. proxy/recctx.go:28 says "credentials are removed when written"; the filter now runs at queue time in proxy/proxy.go:1947.
  • The x-stainless- prefix match (wire.go:110) admits any future header of that family without a list entry. The comment explains why it is safe today. It is a small exception to "add it here on purpose". Acceptable, but it weakens the guarantee the file comment promises.
  • The PR names the behavior change at the top, as required. Round 1 rules stopped me from reading PR comments, so I could not verify that the human's yes, and the confirm from the trace-recording row's "Decided by" (David Amid), are recorded. The integrator must check both before merge.

What I checked

  • The full diff of the head against the base, and the code around each change.
  • The old dropHeader denylist: X-Passwd and X-Signature passed it, so the leak the PR fixes was real. Values went through Content, which redacts by key shape only, so a non-key-shaped credential survived.
  • Every caller: record.Wire has one caller (proxy/sessionrec.go:288), AllowedHeaders has one caller (proxy/proxy.go:1947). No other host writes request headers. captureRequest writes provider, model and body only.
  • r.Header is never mutated in place during serve (copyHeaders copies onto the outgoing request; scrubToken works on a copy), so the recorded headers are the client's own.
  • The OTLP path (buildTurn) passes no headers, so only the wire file is affected.
  • Test compile level: heldAuth, maskHeaders, credMask, zeroHeaders, heldHeader, target, Dispatcher.held, dispatch.Ref, captureRequest, newTestRecorder, wireLines, testSSE and ccBody all exist with matching signatures. scrubToken does not drop the test values (sk- is not the cg_live_ prefix).
  • Build tags: the new end-to-end test carries cg_record. CI runs go test -race -tags cg_record on ./proxy/... (ci.yaml:259), so it runs.
  • No golden file or existing test asserts a now-dropped header.
  • Data dependence: the row file docs/data-dependence/features/trace-recording.md and the generated page carry the same new text. The PR lowers what the feature stores and says so.
  • docs/client-coverage.md was not updated; see finding 1.

Round 1 review. The recorder allowlist copied 8 one-client header
names. Now agent.CorrelationHeaders lists them, built from the same
constants the parsers use. internal/record keeps only generic names.

- x-claude-code-session-id is dropped: nothing reads it.
- A test checks the allowlist holds every agent name.
- Comments say "allowlisted"; x-stainless- prefix is explained.

Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: DAVID AMID <[email protected]>
@amiddavid

Copy link
Copy Markdown
Collaborator Author

Replies to round 1 (both reviewers blocked)

0937ff80 merges main (accountant v0.10.0). b178da63 holds the fixes.

Both reviewers, finding 1: one-client header names outside package agent. Fixed.

  • agent.CorrelationHeaders() lists the correlation header names. It is built from the constants the parsers use: claudecode.AgentHeader, new constants in agent/codex and agent/opencode, and agent.TaskIDHeader, which sits in agent because agent/bob imports it. The parsers use the same constants.
  • internal/record keeps only the generic names (content-type, accept, accept-encoding, user-agent, anthropic-version, anthropic-beta, openai-beta) and the x-stainless- prefix. It adds the agent list when it builds the allowlist.
  • TestAllowlistHoldsEveryAgentCorrelationHeader checks that the two lists cannot drift.
  • x-claude-code-session-id is dropped, because nothing in the repo reads it. The wire test uses x-claude-code-agent-id.
  • x-task-id now names its real readers: agent/bob, apply/apply.go and proxy/recctx.go.
  • The PR body states these readers correctly. docs/client-coverage.md is unchanged, because no client row changed.

Non-blocking notes: the stale comments in wire_test.go, wire.go and proxy/recctx.go now say "allowlisted". The x-stainless- prefix has a line saying why it is trusted: Stainless telemetry has a fixed shape, and its values still pass Content.

Tests (macOS, Go 1.27.4): go build ./... and -tags cg_record are clean. go vet is clean. Plain go test passes on agent/..., internal/record and proxy, with and without cg_record. -race -run on the new tests passes.

Local tests: waived (owner rule)

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.332 offload-review skill, @amiddavid's session resumed 1 of 2 2 of 4 b178da63a3b5 approve

Verdict: approve

Findings

None.

Round 1 findings

  1. Allowlist hardcoded one-client headers outside package agent, with a false justification for two entries — fixed. I verified each part of the fix in b178da63:

    • agent.CorrelationHeaders() (agent/identify.go:231-240) is built from the constants the parsers use: claudecode.AgentHeader, the new codex.SessionHeader/ThreadHeader/ParentThreadHeader, the new opencode.SessionHeader/ParentSessionHeader, and agent.TaskIDHeader. The parsers now read the same constants (agent/codex/codex.go:55-57, agent/opencode/identify.go:28-29, agent/bob/bob.go:34). One source of truth; no copy left in internal/record.
    • x-claude-code-session-id is dropped. Nothing in the repo reads it. The wire test now uses x-claude-code-agent-id.
    • x-task-id lives in agent as TaskIDHeader, with its real readers named: agent/bob (SessionID), apply/apply.go, proxy/recctx.go. The placement reason (bob imports agent, so the constant cannot live in bob) is documented and correct.
    • TestAllowlistHoldsEveryAgentCorrelationHeader (internal/record/wire_test.go:152) fails if the two lists drift.
    • The PR body now separates the generic names from the correlation ids and states the readers correctly.
    • docs/client-coverage.md stays unchanged. I accept the author's reason: no client row changed. The record allowlist no longer names a client, and TaskIDHeader is a constant for a literal agent/bob already used.

    Non-blocking notes from round 1 are fixed too: wire_test.go:80-82, wire.go:51 and proxy/recctx.go:28 now say "allowlisted", and stainlessPrefix (wire.go:104-106) states why the prefix is trusted.

Non-blocking

  • The behavior change at the top of the PR still says "needs a human yes", and no comment on the PR records the yes. The PR author is the row's "Decided by" owner. The integrator should record the yes before the merge, per CLAUDE.md.
  • scripts/tooldefer-accuracy/tap.py:51 still reads X-Claude-Code-Session-Id from live traffic. It does not read wire files, so the dropped allowlist entry does not affect it. Noted only so nobody mistakes it for a reader of the record.

What I checked

  • Last review: round 1, a9fa5b8, 2026-11-26T14:30:31Z.
  • New commits read: 2 — 0937ff80 (merge origin/main) and b178da63 (refactor(record): take client header names from package agent).
  • Read in full: 2 reviews, 1 comment, 0 inline comments (from the three files .review-in-reviews.txt, .review-in-comments.txt, .review-in-inline.txt).
  • New items since my last review:
    • Reviewer 2's round-1 review (14:29:02Z, before my posting time). Same finding 1 as mine, same non-blocking notes. I checked its proof lines myself in round 1; nothing new to add.
    • The author's comment (14:42:35Z) describing the fixes. Each claim checked against the diff; all hold.
    • Merge 0937ff80: it brings main ebd659bb (accountant v0.10.0, PR #1464). The merge diff against ebd659bb touches only this PR's own files, so no manual edit rode in with it.
    • Fix b178da63: the full diff of agent/, internal/record/ and proxy/recctx.go, plus the code around each change.
  • Import graph: internal/record now imports agent. No agent package imports internal/record, so there is no cycle. agent imports no host package.
  • The allowlist at init (wire.go:88-101) lowercases every agent name before adding it. All seven names are already lowercase.
  • The drift test covers the agent-to-record direction. The other direction is structural: the allowlist is built from agent.CorrelationHeaders(), so a name removed from agent leaves the allowlist with it.
  • Recorded behaviour change versus round 1: Claude Code traces lose x-claude-code-session-id, which no code reads. Nothing else changed in what is written.
  • Data dependence: the row text ("the client's session ids") stays true for the names now sourced from agent. No row change needed for the fix commit.
  • Round-1 checks that still hold at the new head: single caller each for record.Wire and AllowedHeaders; r.Header not mutated in place; the OTLP path writes no headers; the end-to-end test runs under -tags cg_record in CI (ci.yaml:259).

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 2 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.332 offload-review skill, @amiddavid's session resumed 2 of 2 2 of 4 b178da63a3b5 approve

Verdict: approve

Findings

None.

Earlier findings

  1. Round 1, mine, finding 1 (one-client header names outside package agent) — fixed in b178da63.
    • agent.CorrelationHeaders() (agent/identify.go:235-242) now owns the list. It is built from the same constants the parsers use: claudecode.AgentHeader, the new codex.SessionHeader/ThreadHeader/ParentThreadHeader, the new opencode.SessionHeader/ParentSessionHeader, and agent.TaskIDHeader. The parsers were changed to read those constants (agent/codex/codex.go:55-57, agent/opencode/identify.go:28-29, agent/bob/bob.go:34), so there is one copy.
    • internal/record keeps only the generic names and the x-stainless- prefix, and adds the agent list when it builds the map (wire.go:89-103). No client name is spelled in record any more.
    • TestAllowlistHoldsEveryAgentCorrelationHeader (wire_test.go:150-160) fails if a name is added to agent and not to the allowlist. The other direction cannot drift, because the map is built from the list.
    • x-claude-code-session-id is dropped. Nothing in the repo reads it. Correct.
    • The PR body now states the real readers. docs/client-coverage.md stays unchanged; no client row changed. Correct.
    • No import cycle: agent/bob imports agent; agent does not import agent/bob or internal/record; internal/record importing agent is a library-to-library import.
  2. Round 1, reviewer 1, finding 1 — the same defect. Fixed by the same change. I checked it myself; my proof is above. Reviewer 1's extra point, that x-task-id's readers are apply and proxy/recctx rather than package agent, is also answered: agent/bob.SessionID reads it through agent.TaskIDHeader, and apply/proxy/recctx reach it through that method, so the name now lives in agent with its direct reader.
  3. Round 1 non-blocking notes (both reviewers) — fixed. WireCall.Headers (wire.go:51) and proxy/recctx.go:28 say "allowlisted". stainlessPrefix (wire.go:105-108) carries the reason the prefix is trusted. The wire_test.go comment describes the allowlist design.

Non-blocking

  • agent/identify.go:225-227 — the TaskIDHeader doc names apply and proxy/recctx.go as readers. Both read the header indirectly, through agent/bob.SessionID and apply.ExplicitSessionFor. The direct reader is agent/bob. A precision point in a comment only.

What I checked

  • Last review: round 1, a9fa5b8, 2026-11-26T14:29:02Z.
  • New commits read: 2 on the PR plus 1 from main inside the merge.
    • 0937ff80 merge origin/main. Brings ebd659bb (accountant v0.10.0 bump, from main, not this PR's change). The merge touches docs/data-dependence.md on two different rows (Trace recording from this branch, Metrics push from main); git resolves both, and the result keeps each side's row. No conflict was resolved by hand. The row files and the page stay in sync.
    • b178da63 refactor(record): take client header names from package agent. The fix commit. Read in full, plus every changed file around the change: agent/identify.go, agent/bob/bob.go, agent/codex/codex.go, agent/opencode/identify.go, internal/record/wire.go, internal/record/wire_test.go, proxy/recctx.go.
  • Read in full: 2 reviews, 1 comment, 0 inline comments (from the three files .review-in-reviews.txt, .review-in-comments.txt, .review-in-inline.txt).
  • New items since my last review:
    • Reviewer 1's round-1 review (14:30:31Z). Finding 1 matches mine. I checked its extra claim (x-task-id readers) myself; see finding 2.
    • The author's comment (14:42:35Z) describing the fixes. I verified each claim against the code: the constants exist and are used by the parsers; the allowlist map is built from agent.CorrelationHeaders; the drift test exists; x-claude-code-session-id is gone; the PR body's reader list matches the code.
  • The fix commit changes no behavior on the wire: the allowlist holds the same seven id names as before plus the six it always had, minus x-claude-code-session-id (dropped, nothing reads it). The generic names and the x-stainless- prefix are unchanged. Fail-open paths are unchanged.
  • headerAllowed lowercases before the map lookup, and every constant in CorrelationHeaders is lowercase, so casing cannot drop a name.
  • Data dependence: the fix commit touches no docs. The row text from round 1 ("the client's session ids") is still true. The generated page is unchanged and in sync.
  • Commit: DCO sign-off present, Assisted-By: used, no binaries, no go.mod lines added by this PR.

agent/bob reads x-task-id directly. apply and proxy/recctx.go read it
through bob.SessionID. Only the comment changes.

Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: DAVID AMID <[email protected]>
@amiddavid

Copy link
Copy Markdown
Collaborator Author

Round 2: both approve. One comment fix.

Reviewer 2 noted that the TaskIDHeader comment named indirect readers. Fixed in 249c6f43, which changes the comment only. The comment says agent/bob is the direct reader, and apply and proxy/recctx.go read the header through bob.SessionID.

approved: b178da63a3b5 (base ebd659bb3eee) patch-id a13ce2314bb2
head:     249c6f437d1d (base ebd659bb3eee) patch-id 7f44569da667
COMMENTS ONLY: b178da63a3b5..249c6f437d1d changes only comment lines in .go and .sh files. The approval of b178da63a3b5 still counts. Say so on the PR.

Local tests: waived (owner rule)

@amiddavid
amiddavid merged commit d0af063 into main Nov 26, 2026
12 checks passed
@github-project-automation github-project-automation Bot moved this from New/ToDo to Done in Rossoctl Issue Prioritization Nov 26, 2026
amiddavid added a commit that referenced this pull request Nov 26, 2026
…signal (#1470)

The test const fakeSecret clashed with #1469. The startup line now reads
tenants != nil, the same signal the proxy decides on.

Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: DAVID AMID <[email protected]>
amiddavid added a commit that referenced this pull request Nov 26, 2026
…signal (#1470)

The test const fakeSecret clashed with #1469. The startup line now reads
tenants != nil, the same signal the proxy decides on.

Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: DAVID AMID <[email protected]>
amiddavid added a commit that referenced this pull request Nov 26, 2026
feat(keepalive): the audit-sink rule applies in hosted mode only (#1457)

A single-tenant proxy holds only its own user's credential, in memory.
It now holds a thread and pings with no dashboard. A hosted proxy with
no recorder still holds nothing.

- keepalive.MayHoldCredentials decides; the proxy calls it from
  keeper.mayHold (hosted = Options.Tenants != nil).
- The gate covers recordTouch, canPing, session arming and the Ping route.
- With no dashboard the Ping route reads the cold gate from the keeper
  (Keeper.WarmFacts), and the route stays mounted.
- The credential stays in memory: no new file, log or metric.

Fixes #1457

fix(keepalive): round 1 of #1470

- WarmFacts uses the entry's cacheTTL; a 1-hour-tier test pins it.
- Test for the header hold with no dashboard.
- Fix the route-table and Ping-route comments.
- body-stash row: the in-memory copies now exist with no dashboard too.

test(keepalive): the 1-hour press must return 200 and send one ping (#1470)

fix(keepalive): rename the test key; log hosted mode by the decision signal (#1470)

The test const fakeSecret clashed with #1469. The startup line now reads
tenants != nil, the same signal the proxy decides on.

Behavior change (the audit-sink rule applies in hosted mode only: a single-tenant proxy without --dashboard holds the user's own credential in memory only and pings) approved by the owner in the integrator session: "1470 yes". Approvals at b2472bd carried over (SAME CHANGE: re-signed merge commit). Proxy-boundary and credential checks passed.

Assisted-By: Claude Opus 5.5
Signed-off-by: DAVID AMID <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: high Blocking or user-facing; should be picked up soon

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

security(record): write request headers by allowlist, so no credential reaches the wire file

1 participant