Repository navigation
Conversation
|
Codex review: found issues before merge. Reviewed June 30, 2026, 9:54 PM ET / 01:54 UTC. Summary PR surface: Source +533, Tests +225. Total +758 across 12 files. Reproducibility: yes. Source inspection on current main shows request SecretRefs are supported config fields, but generated models.json preservation and audit only cover apiKey/top-level headers while request sanitizer still returns marker strings as transport values. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Rebase onto current embedded-agent-runner paths, keep the request marker preservation and transport stripping, limit generated request-header audit findings to sensitive or explicitly secret headers, then rerun focused request/config/audit validation. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main shows request SecretRefs are supported config fields, but generated models.json preservation and audit only cover apiKey/top-level headers while request sanitizer still returns marker strings as transport values. Is this the best way to solve the issue? No, not as submitted. The direction is the right narrow Layer 1 mitigation, but the branch must be rebased to current runner paths and the request-header audit needs a sensitive-header or explicit-secret filter. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7ceaf0ece350. Label changesLabel justifications:
Evidence reviewedPR surface: Source +533, Tests +225. Total +758 across 12 files. View PR surface stats
Security concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Velvet Crabkin Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Follow-up pushed at 791e552: split SecretRef request marker helpers into a lightweight module so request config sanitization no longer imports the heavier model auth marker module during secrets runtime suite import.\n\nFresh validation:\n- Runtime external channel regression: 2 files / 3 tests passed.\n- Related request/model/secrets regression: 9 files / 97 tests passed.\n- Targeted oxlint: 0 warnings / 0 errors.\n- tsgo:core passed.\n- tsgo:test:src passed.\n- git diff --check passed.\n- check:changed passed.\n- Real behavior proof section now passes scripts/github/real-behavior-proof-policy.mjs locally.\n\nNote: test:changed still reports failures in agents tests that reproduce on a clean origin/main worktree with the same assertions, so they are baseline failures rather than regressions from this PR. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: [codex] Preserve request SecretRef markers in models.json This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Closing due to inactivity. |
Summary
requestsecrets when generating prompt-visiblemodels.json, including request headers, auth token/value, TLS material, and proxy TLS material.openclaw secrets auditto flag stale generatedmodels.jsonrequest secrets that may already exist on disk.Why
#11829 tracks reducing agent-visible API key exposure. Current main already protects top-level provider
apiKeyand providerheaders, butmodels.providers.*.request.*is also part of the documented SecretRef credential surface. Without this patch, resolved request header/auth/TLS secrets can still be serialized intomodels.json.The latest review also identified a downstream risk: once request markers are written into generated
models.json, the inline/discovered provider path must treat those marker strings as non-secret placeholders, not as outbound transport credentials. This update closes that consumer path.This is a focused Layer 1 hardening PR. It does not claim to close the full roadmap while plaintext config remains supported.
Real behavior proof
{ "generatedRequestBlock": { "headers": { "Authorization": "secretref-env:OPENAI_REQUEST_AUTH_HEADER", "X-Static": "tenant-a" }, "auth": { "mode": "authorization-bearer", "token": "secretref-env:OPENAI_REQUEST_BEARER" }, "tls": { "key": "secretref-managed", "serverName": "api.openai.com" } }, "sanitizedRuntimeRequestBlock": { "headers": { "X-Static": "tenant-a" }, "tls": { "serverName": "api.openai.com" } }, "inlineProviderTransportValues": { "headers": { "X-Static": "tenant-a" }, "tls": { "serverName": "api.openai.com" } } }The audit command output against a temporary generated models.json with redacted plaintext request residue reported the expected request-secret paths:
{ "auditCommandExitCode": 0, "requestSecretFindings": [ { "code": "PLAINTEXT_FOUND", "jsonPath": "providers.openai.request.headers.Authorization", "severity": "warn" }, { "code": "PLAINTEXT_FOUND", "jsonPath": "providers.openai.request.auth.token", "severity": "warn" }, { "code": "PLAINTEXT_FOUND", "jsonPath": "providers.openai.request.tls.key", "severity": "warn" } ] }Validation
corepack pnpm vitest run src/agents/provider-request-config.test.ts src/agents/pi-embedded-runner/model.inline-provider.test.ts corepack pnpm vitest run src/agents/models-config.runtime-source-snapshot.test.ts src/secrets/audit.test.ts src/agents/provider-request-config.test.ts src/agents/pi-embedded-runner/model.inline-provider.test.ts corepack pnpm exec oxlint src/agents/provider-request-config.ts src/agents/provider-request-config.test.ts src/agents/pi-embedded-runner/model.inline-provider.test.ts corepack pnpm run tsgo:core corepack pnpm run tsgo:test:src git diff --check corepack pnpm run check:changed corepack pnpm run test:changedResults:
tsgo:core,tsgo:test:src,git diff --check, andcheck:changedpassed.test:changedran the affected project shards and failed in two unrelated agent tests after 2021 tests passed:src/agents/cli-runner.reliability.test.tssrc/agents/subagent-registry.announce-loop-guard.test.tsThose two failing tests are outside the changed models/secrets/request transport paths and were previously reproduced on a clean
origin/mainworktree with the same assertions. The focused regression, security/config, lint, type, and changed checks for this PR pass.Refs #11829