Skip to content

[Bug] secrets audit / doctor falsely flags static routing header as plaintext secret #89664

Closed as not planned

Description

@Stache73

`openclaw doctor --fix` and `openclaw secrets audit` flag
`models.providers.wafer-zdr.request.headers.Wafer-ZDR` as a
plaintext secret-bearing field.

The value is `"required"` — a static routing string, not a credential.
The name-heuristic appears to be over-triggering on the header name
`Wafer-ZDR` despite it containing no documented auth/credential fragment
(`authorization`, `x-api-key`, `token`, `secret`, `password`,
`credential`).

Expected: static non-credential routing headers should not trigger the
plaintext secret warning.

Actual: Doctor reports:

WARNING: openclaw.json contains plaintext secret-bearing config fields.
Paths: models.providers.wafer-zdr.request.headers.Wafer-ZDR

Version: 2026.5.28 (e932160) | OS: Windows

Activity

  1. clawsweeper commented on Jun 3, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 1, 2026, 8:22 AM ET / 12:22 UTC.

    Summary
    Keep open: current main still deliberately reports a plaintext finding for static models.providers.*.request.headers.* values, while its own direct-header path and the documented audit policy use a name-based sensitivity rule. The linked candidate PR was closed unmerged, so it is not implementation provenance. Likely related people: Peter Lee (medium) and lukaIvanic (medium) are the strongest history routes for the secrets/Doctor surfaces.

    Reproducibility: yes. —at source level with high confidence. Current Doctor and audit tests construct a static X-Proxy-Region request header and explicitly expect the false-positive warning/finding, matching the reported Wafer-ZDR mechanism.

    Root-cause cluster
    Relationship: canonical
    Canonical: #89664
    Summary: This issue is the canonical report for static request-header false positives; the linked PR was a candidate implementation but closed unmerged.

    Members:

    Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

    Next step
    Current source proves the defect, but the existing clawsweeper:no-new-fix-pr and security-review routing signals mean a new automated repair should not be dispatched from this review.

    Security
    Needs attention: The defect is a security-diagnostic policy mismatch; any repair must preserve warnings for genuinely credential-bearing request headers.

    Review details

    Best possible solution:

    Apply the existing shared model-provider header-sensitivity policy to models.providers.*.request.headers.* in both Doctor and the secrets audit, with regression coverage for static routing headers and sensitive authorization headers.

    Do we have a high-confidence way to reproduce the issue?

    Yes—at source level with high confidence. Current Doctor and audit tests construct a static X-Proxy-Region request header and explicitly expect the false-positive warning/finding, matching the reported Wafer-ZDR mechanism.

    Is this the best way to solve the issue?

    Yes. Reusing the existing name-based sensitivity policy for request headers is the narrowest coherent fix because it aligns the two audit paths, direct-header sibling behavior, and the documented policy while preserving sensitive-header detection.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • Applying the exemption to request headers must retain warnings for credential-bearing names such as Authorization, X-API-Key, and provider-specific token or secret headers.
    • The checkout could not complete historical release-file reads because its promisor remote was unreachable, so no shipped-release conclusion is asserted.

    Codex review notes: model internal, reasoning high; reviewed against 142ad75c4336.

    Label changes

    Label justifications:

    • P2: This is a bounded false-positive security-audit defect that creates operator noise but does not stop provider runtime traffic.
    • impact:security: Doctor and the secrets audit incorrectly classify a non-secret value on a credential-capable surface, weakening trust in security diagnostics.
    • impact:auth-provider: The affected configuration is a model-provider request-header surface used for provider routing and authentication transport.
    Evidence reviewed

    Security concerns:

    • [low] Preserve credential-header detection — src/secrets/model-provider-header-policy.ts:31
      The current policy is intentionally conservative. A repair should exempt only names that fail the shared sensitivity predicate and must retain positive coverage for Authorization and similar credential headers.
      Confidence: 0.95

    What I checked:

    • Current Doctor behavior: The plaintext-warning collector applies isLikelySensitiveModelProviderHeaderName only when the target id is models.providers.*.headers.*; request transport headers therefore continue to reach the generic plaintext warning path. (src/commands/doctor-security.ts:215, 0991fad3a34b)
    • Current audit behavior: The secrets audit has the same direct-header-only exception and does not apply it to models.providers.*.request.headers.*. (src/secrets/audit.ts:217, 0991fad3a34b)
    • Regression tests prove the report remains valid: Current tests explicitly expect X-Proxy-Region under request.headers to produce a Doctor warning and a PLAINTEXT_FOUND audit finding, whereas the same static header under direct provider headers is exempt. (src/commands/doctor-security.test.ts:411, 142ad75c4336)
    • Documented policy conflicts with the special case: The public secrets-audit documentation says provider header sensitivity is name-heuristic based and lists authorization, API-key, token, secret, password, and credential fragments; it does not distinguish request transport headers. Public docs: docs/cli/secrets.md. (docs/cli/secrets.md:65, 142ad75c4336)
    • Request headers are the affected provider transport surface: The registry separately identifies models.providers.*.request.headers.* as an audited SecretRef-capable target, and the configuration docs describe it as extra headers merged with provider defaults. (src/secrets/target-registry-data.ts:283, 142ad75c4336)
    • Candidate repair was not merged: The provided GitHub context identifies [codex] fix security audit request headers #95303 as a focused repair with static-versus-sensitive header proof, but it closed unmerged on July 30, 2026; it cannot close this issue. (e92d9c033c8d)

    Likely related people:

    • Peter Lee: Authored the recent fix(config,secrets) history entry covering the current Doctor/audit file set, making this the strongest available route for the audited-secret behavior. (role: recent secrets-area contributor; confidence: medium; commits: 8539640abc3c; files: src/secrets/audit.ts, src/commands/doctor-security.ts)
    • lukaIvanic: Authored the historical Doctor change that introduced plaintext-secret config warnings, which is the warning mechanism affected here. (role: introduced Doctor plaintext-warning behavior; confidence: medium; commits: 9cdf8a1e2f9f; files: src/commands/doctor-security.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P2Normal backlog priority with limited blast radius.
    impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.
    impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.
    on Jun 3, 2026
  3. added
    clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.
    and removed
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    on Jun 21, 2026
  4. added
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    and removed
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    on Jul 30, 2026
  5. steipete commented on Oct 24, 2026

    @steipete
    Contributor

    Thanks for filing this. We're closing older issues that no longer look actionable on current main.

    Static request header values are deliberately flagged by the audit as potential plaintext secrets. Moving the value to a SecretRef silences it; please open a fresh issue if you want to propose a different audit rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions