openclaw - 💡(How to fix) Fix secrets audit: Improve detection to distinguish plaintext secrets from environment variable references

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

  1. Actual plaintext secrets: Real API keys stored directly in config files → should warn
  2. Environment variable references: Variable names like OPENCLAW_DEEPSEEK_API_KEY → should NOT warn
  • Only warn when actual secret values (not just variable names) are detected
RAW_BUFFERClick to expand / collapse

Problem

When running openclaw secrets audit --check, the tool reports PLAINTEXT_FOUND for apiKey fields that contain environment variable references like OPENCLAW_DEEPSEEK_API_KEY. These are NOT actual secrets — they are just variable names pointing to secrets stored in environment variables.

User Impact

This causes confusion and frustration for users with high standards for security hygiene. Even when users correctly store secrets in environment variables (not in config files), they still see 4 false positive warnings every time they run the audit.

Expected Behavior

The audit tool should distinguish between:

  1. Actual plaintext secrets: Real API keys stored directly in config files → should warn
  2. Environment variable references: Variable names like OPENCLAW_DEEPSEEK_API_KEY → should NOT warn

Suggested Fix

Add logic to detect if apiKey values look like environment variable references:

  • Check for patterns like *_KEY, *_TOKEN, *_SECRET, *_PASSWORD
  • If the value matches these patterns, skip the PLAINTEXT_FOUND warning
  • Only warn when actual secret values (not just variable names) are detected

Additional Context

  • This is not a security vulnerability — it is a UX issue
  • The current behavior makes users question their correct configuration
  • Users who store secrets properly (via environment variables) should not see warnings

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING