Skip to content

Redact bare Fireworks API keys - #98226

Merged
steipete merged 3 commits into
openclaw:mainfrom
ooiuuii:fix/redact-fireworks-api-key
Jul 1, 2026
Merged

steipete merged 3 commits into
openclaw:mainfrom
ooiuuii:fix/redact-fireworks-api-key

Conversation

@ooiuuii

@ooiuuii ooiuuii commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

Closes #98225

What Problem This Solves

Fixes an issue where Fireworks users could have bare API key material shown unchanged in logs, tool output, or Control UI tool details when the key was not attached to a sensitive field name such as FIREWORKS_API_KEY.

Why This Change Was Made

OpenClaw already redacts generic API-key assignments, auth headers, and many provider-specific raw token prefixes. Fireworks raw token prefixes were missing from the default Node redaction pattern set, the fast-path prefilter, and the browser-only Control UI display redactor.

This adds Fireworks fw-..., fw_..., and fpk_... token shapes with a non-identifier left boundary so short ordinary strings remain visible. It does not change Fireworks authentication or provider behavior.

User Impact

Fireworks provider users get the same raw-token masking protection as other first-class provider users across logs and browser-rendered tool details. Short non-key strings such as fw-tooshort, fw_tooshort, and fpk_tooshort continue to render unchanged.

Evidence

Runtime proof on PR commit 17c915e0b2dea8cbc6cd9006081b72e8fe953359, using synthetic in-memory token strings only ('fw-' + 'C'.repeat(40), 'fw_' + 'A'.repeat(40), and 'fpk_' + 'B'.repeat(40)). No real credentials were used.

Synthetic Fireworks redaction proof (no real secrets)
Node input generated token families: fw-, fw_, fpk_
Node output: provider error fw-CCC?CCCC fw_AAA?AAAA fpk_BB?BBBB
Node leaked raw token: false
Browser tool-detail output: openclaw onboard --provider fireworks fw-CCC...CCCC fw_AAA...AAAA fpk_BB...BBBB
Browser leaked raw token: false

The proof exercises the actual PR implementations of redactSensitiveText(..., { mode: "tools" }) and the browser-only redactToolDetail(...) entrypoint.

Focused verification:

  • node scripts\run-vitest.mjs src\logging\redact.test.ts --testNamePattern="masks expanded vendor-prefix token corpus|does not redact ordinary identifiers containing short token-prefix substrings"
    • 1 Test File passed
    • 2 passed | 106 skipped
  • node scripts\run-vitest.mjs ui\src\ui\browser-redact.test.ts --testNamePattern="redacts tool detail credential families without Node config imports"
    • 1 Test File passed
    • 1 passed | 1 skipped
  • git diff --check
  • $env:PYTHONUTF8='1'; python .agents\skills\autoreview\scripts\autoreview --mode local
    • autoreview clean: no accepted/actionable findings reported

@clawsweeper

clawsweeper Bot commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 30, 2026, 9:33 PM ET / 01:33 UTC.

Summary
The PR adds Fireworks fw-, fw_, and fpk_ raw-token patterns to the shared Node and browser Control UI redactors with regression tests.

Reproducibility: yes. Source inspection on current main shows the Fireworks raw-token prefixes are absent from both Node and browser redaction corpora, and the linked issue gives synthetic calls against those exact entry points.

Review metrics: none identified.

Stored data model
Persistent data-model change detected: durable storage schema: ui/src/ui/storage.node.test.ts, durable storage schema: ui/src/ui/storage.ts, migration/backfill/repair: docs/gateway/cli-backends.md, persistent cache schema: CHANGELOG.md, persistent cache schema: appcast.xml, unknown-truncated-pull-files, and 4 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #98225
Summary: The linked issue is the canonical report for the Fireworks bare-token redaction gap, and this PR is the open candidate fix.

Members:

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

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Risk before merge

  • [P1] This read-only sweep did not execute the focused tests; required CI or maintainer verification should remain the final merge gate.

Maintainer options:

  1. Decide the mitigation before merge
    Land this focused redaction fix after required CI, or keep the linked issue open until an equivalent patch ships.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P2] No repair lane is needed; this PR is now a focused change awaiting normal maintainer and CI merge gates.

Security
Cleared: The current potential merge commit changes only redaction code and tests, adds credential masking coverage, and leaves no surviving dependency or release-automation change.

Review details

Best possible solution:

Land this focused redaction fix after required CI, or keep the linked issue open until an equivalent patch ships.

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

Yes. Source inspection on current main shows the Fireworks raw-token prefixes are absent from both Node and browser redaction corpora, and the linked issue gives synthetic calls against those exact entry points.

Is this the best way to solve the issue?

Yes. Updating both redaction corpora and the Node fast-path prefilter with boundary-aware patterns is the narrow maintainable fix, and the current potential merge commit avoids the unrelated stale-base drift.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 35af831fd0bc.

Label changes

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes synthetic live output from the Node and browser redactors, and the current merge result only changes those redaction paths and tests.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body includes synthetic live output from the Node and browser redactors, and the current merge result only changes those redaction paths and tests.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: The PR fixes a credential-redaction bug with limited blast radius and a focused merge result.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body includes synthetic live output from the Node and browser redactors, and the current merge result only changes those redaction paths and tests.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes synthetic live output from the Node and browser redactors, and the current merge result only changes those redaction paths and tests.
Evidence reviewed

What I checked:

Likely related people:

  • amknight: Authored recent shared tool-output secret redaction work that expanded the default redaction corpus and prefilter this PR extends. (role: redaction feature history contributor; confidence: high; commits: 3faf669801d0; files: src/logging/redact.ts, src/logging/redact.test.ts)
  • steipete: Recent history shows browser tool-detail redaction canonicalization, and this login authored the current PR head hardening commits. (role: browser redaction area contributor and current PR branch contributor; confidence: high; commits: 219d85417867, eba68ed9d483, f4476c5bcc6d; files: ui/src/ui/browser-redact.ts, ui/src/ui/browser-redact.test.ts, src/logging/redact.ts)
  • joshavant: Authored a recent shared logging redaction fix for denied exec failure parameters, making them a plausible routing candidate for this area. (role: adjacent redaction contributor; confidence: medium; commits: 221f5349b512; files: src/logging/redact.ts, src/logging/redact.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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 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.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jun 30, 2026
@ooiuuii

ooiuuii commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 30, 2026
@steipete steipete self-assigned this Jun 30, 2026
@steipete
steipete requested a review from a team as a code owner July 1, 2026 01:05
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord channel: googlechat Channel integration: googlechat channel: imessage Channel integration: imessage channel: line Channel integration: line channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: msteams Channel integration: msteams channel: nextcloud-talk Channel integration: nextcloud-talk channel: nostr Channel integration: nostr channel: signal Channel integration: signal channel: slack Channel integration: slack labels Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Dependency Guard

This PR changes dependency-related files. Maintainers should confirm these changes are intentional.

Changed files:

  • extensions/acpx/npm-shrinkwrap.json
  • extensions/acpx/package.json
  • extensions/admin-http-rpc/package.json
  • extensions/alibaba/package.json
  • extensions/amazon-bedrock-mantle/npm-shrinkwrap.json
  • extensions/amazon-bedrock-mantle/package.json
  • extensions/amazon-bedrock/npm-shrinkwrap.json
  • extensions/amazon-bedrock/package.json
  • extensions/anthropic-vertex/npm-shrinkwrap.json
  • extensions/anthropic-vertex/package.json
  • extensions/anthropic/package.json
  • extensions/arcee/npm-shrinkwrap.json
  • extensions/arcee/package.json
  • extensions/azure-speech/package.json
  • extensions/bonjour/package.json
  • extensions/brave/npm-shrinkwrap.json
  • extensions/brave/package.json
  • extensions/browser/package.json
  • extensions/byteplus/package.json
  • extensions/canvas/package.json
  • extensions/cerebras/npm-shrinkwrap.json
  • extensions/cerebras/package.json
  • extensions/chutes/npm-shrinkwrap.json
  • extensions/chutes/package.json
  • extensions/clickclack/npm-shrinkwrap.json
  • 182 additional dependency-related files not shown

Maintainer follow-up:

  • Review whether the dependency changes are intentional.
  • Inspect resolved package deltas when lockfile, shrinkwrap, or workspace dependency policy changes are present.
  • Treat package-lock.json and npm-shrinkwrap.json diffs as security-review surfaces.
  • Run pnpm deps:changes:report -- --base-ref origin/main --markdown /tmp/dependency-changes.md --json /tmp/dependency-changes.json locally for detailed release-style evidence.

@github-actions

github-actions Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

Dependency graph change authorized

This PR includes dependency graph changes. A repository admin or member of @openclaw/openclaw-secops authorized this exact head SHA with /allow-dependencies-change.

  • Approved SHA: f4476c5bcc6da3348714db1111b1d00110c49241
  • Approved by: @steipete

A later push changes the PR head SHA and requires a fresh security approval.

@steipete

steipete commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

/allow-dependencies-change

@steipete

steipete commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

/allow-dependencies-change

@steipete

steipete commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Merged via squash.

@steipete

steipete commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Landed verification for c5bc35de12cae088f08b4b261dc6f0767f307ae8:

Linked issue #98225 auto-closed on merge. Post-land duplicate searches found no separate related issue or PR.

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

Labels

agents Agent runtime and tooling app: android App: android app: ios App: ios app: web-ui App: web-ui channel: discord Channel integration: discord channel: feishu Channel integration: feishu channel: googlechat Channel integration: googlechat channel: imessage Channel integration: imessage channel: irc channel: line Channel integration: line channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: msteams Channel integration: msteams channel: nextcloud-talk Channel integration: nextcloud-talk channel: nostr Channel integration: nostr channel: qa-channel Channel integration: qa-channel channel: qqbot channel: raft Channel integration: Raft channel: signal Channel integration: signal channel: slack Channel integration: slack channel: sms Channel integration: sms channel: synology-chat channel: telegram Channel integration: telegram channel: tlon Channel integration: tlon channel: twitch Channel integration: twitch channel: voice-call Channel integration: voice-call channel: whatsapp-web Channel integration: whatsapp-web channel: zalo Channel integration: zalo channel: zalouser Channel integration: zalouser cli CLI command changes commands Command implementations docs Improvements or additions to documentation extensions: acpx extensions: admin-http-rpc extensions: anthropic extensions: arcee extensions: byteplus extensions: cerebras extensions: cloudflare-ai-gateway extensions: codex extensions: codex-supervisor Extension: codex-supervisor extensions: copilot extensions: copilot-proxy Extension: copilot-proxy extensions: deepinfra extensions: deepseek extensions: diagnostics-otel Extension: diagnostics-otel extensions: diagnostics-prometheus extensions: duckduckgo extensions: fal extensions: gmi extensions: gradium extensions: huggingface extensions: inworld Extension: inworld extensions: kilocode extensions: kimi-coding extensions: litellm extensions: llama-cpp extensions: llm-task Extension: llm-task extensions: lmstudio extensions: lobster Extension: lobster extensions: memory-core Extension: memory-core extensions: memory-lancedb Extension: memory-lancedb extensions: memory-wiki extensions: minimax extensions: moonshot extensions: novita extensions: nvidia extensions: oc-path extensions: open-prose Extension: open-prose extensions: openai extensions: policy extensions: qa-lab extensions: qianfan extensions: senseaudio extensions: stepfun extensions: synthetic extensions: tavily extensions: tencent extensions: together extensions: tokenjuice Changes to the bundled tokenjuice extension extensions: tts-local-cli extensions: venice extensions: vercel-ai-gateway extensions: volcengine extensions: webhooks extensions: xiaomi gateway Gateway runtime P2 Normal backlog priority with limited blast radius. plugin: azure-speech Azure Speech plugin plugin: bonjour Plugin integration: bonjour plugin: file-transfer plugin: google-meet plugin: migrate-claude plugin: migrate-hermes plugin: pixverse plugin: workboard rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bare Fireworks API keys can bypass raw-token redaction

2 participants