Security: guardrails audit + external content improvements#6592
Closed
georgeykalangi wants to merge 3 commits into
Closed
Security: guardrails audit + external content improvements#6592georgeykalangi wants to merge 3 commits into
georgeykalangi wants to merge 3 commits into
Conversation
Author
|
Done |
georgeykalangi
force-pushed
the
security/guardrails-audit-and-external-content
branch
from
February 4, 2026 07:41
49fc391 to
01a61e0
Compare
thewilloftheshadow
force-pushed
the
main
branch
from
February 15, 2026 18:46
bfc1ccb to
f92900f
Compare
Member
|
Smaller prs please, and ensure you fix all conflicts etc. |
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.
What
allowUnsafeExternalContentis enabled for hooks (Gmail or hook mappings). Check ID:hooks.allow_unsafe_external_content.Why
Improves visibility of prompt-injection risk and documents guardrails so users can run OpenClaw with clearer safety expectations.
Testing
pnpm build— passedvitest run src/security/audit.test.ts src/security/external-content.test.ts— 66 tests passed (42 audit + 24 external-content)Made with Cursor
Greptile Overview
Greptile Summary
This PR improves OpenClaw’s prompt-injection guardrails by (1) adding a security-audit warning when
allowUnsafeExternalContentdisables external-content wrapping for Gmail/hooks mappings, (2) extending suspicious-pattern detection for prompt-leak / instruction-extraction phrases, and (3) documenting where external-content wrapping does and does not apply in the gateway security docs.The changes fit into the existing security tooling by extending
collectHooksHardeningFindingsinsrc/security/audit-extra.tsand expandingsrc/security/external-content.tspattern matching, with accompanying Vitest coverage updates.Confidence Score: 5/5
(2/5) Greptile learns from your feedback when you react with thumbs up/down!