mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-19 10:15:01 +00:00
fix(security): disable config leak detection to prevent false positives
StripConfigLeak was blocking legitimate responses when predefined agents mentioned SOUL.md/IDENTITY.md/AGENTS.md in architecture explanations. Improved detection logic to exclude code blocks but disabled the gate entirely for now until a more robust approach is designed.
This commit is contained in:
1 parent
b9e9e6e34a
commit
ee31387aa1
3 files changed
+43
-6
No files matched your search
@@ -887,8 +887,9 @@ func (l *Loop) runLoop(ctx context.Context, req RunRequest) (*RunResult, error)
|
||||
// 4. Full sanitization pipeline (matching TS extractAssistantText + sanitizeUserFacingText)
|
||||
finalContent = SanitizeAssistantContent(finalContent)
|
||||
|
||||
// 4b. Config leak detection (predefined agents only)
|
||||
finalContent = StripConfigLeak(finalContent, l.agentType)
|
||||
// 4b. Config leak detection — disabled: too many false positives
|
||||
// (e.g. agent explaining public architecture mentioning SOUL.md etc.)
|
||||
// finalContent = StripConfigLeak(finalContent, l.agentType)
|
||||
|
||||
// 5. Handle NO_REPLY: save to session for context but mark as silent.
|
||||
// Matching TS: NO_REPLY is saved (via resolveSilentReplyFallbackText) but
|
||||
|
||||
Reference in new issue
Block a user