fix(openclaw): improve credential detection in extraction instructions#4552
Merged
whysosaket merged 1 commit intomainfrom Mar 26, 2026
Merged
fix(openclaw): improve credential detection in extraction instructions#4552whysosaket merged 1 commit intomainfrom
whysosaket merged 1 commit intomainfrom
Conversation
The previous exclude rule for credentials was too generic and the extraction LLM failed to recognize credentials embedded in config blocks, setup logs, and tool output (29% of test memories contained leaked credentials). Give the LLM concrete patterns to watch for (sk-, m0-, ak_, ghp_, bot tokens, bearer tokens, webhook URLs, pairing codes) and WRONG/RIGHT examples showing what to store instead of the raw secret. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
kartik-mem0
approved these changes
Mar 26, 2026
whysosaket
approved these changes
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improve the credential exclude rule in OpenClaw plugin's custom extraction instructions to prevent the LLM from storing API keys, bot tokens, and other secrets embedded in configuration blocks and tool output.
Problem
The previous rule was too generic:
"Passwords, API keys, tokens, secrets, or any credentials — even if shared in conversation."The extraction LLM failed to recognize credentials when they appeared inside config blocks, setup logs, or tool output. In testing, 29% of memories (4 out of 14) contained leaked credentials including API keys, bot tokens, dashboard tokens, and pairing codes.Fix
Replace the generic rule with concrete guidance:
sk-,m0-,ak_,ghp_, bot tokens (digits:alphanumeric), bearer tokens, webhook URLs with tokens, pairing codesTest plan
🤖 Generated with Claude Code