picoclaw/pkg/config
uiyzzi 16d23d8cdc feat(security): add sensitive data filtering for tool results sent to
LLM

Prevent LLM from seeing its own credentials (API keys, tokens, secrets)
by filtering sensitive values from tool call results before sending to
the
model. Values are collected from .security.yml and replaced with
[FILTERED] using an efficient strings.Replacer (O(n+m)).

- Add FilterSensitiveData and FilterMinLength to ToolsConfig
- Implement SensitiveDataReplacer() with sync.Once caching in
  SecurityConfig
- Use reflection to collect all sensitive values (Model API keys,
  channel
  tokens, web tool API keys, skills tokens)
- Apply filtering in agent loop at 4 tool result locations
- Add comprehensive tests covering all token types
2026-03-23 20:55:41 +08:00
..
config.go feat(security): add sensitive data filtering for tool results sent to 2026-03-23 20:55:41 +08:00
config_old.go Merge branch 'main' into version 2026-03-22 19:58:33 +08:00
config_test.go feat(security): add sensitive data filtering for tool results sent to 2026-03-23 20:55:41 +08:00
defaults.go feat(security): add sensitive data filtering for tool results sent to 2026-03-23 20:55:41 +08:00
envkeys.go refactor: centralize environment variable key constants (#1730) 2026-03-18 18:03:24 +08:00
example_security_usage.go rename security.yml to .security.yml 2026-03-23 11:20:42 +08:00
migration.go refactor: seperate security.yml for store keys 2026-03-22 01:55:00 +08:00
migration_integration_test.go refactor: seperate security.yml for store keys 2026-03-22 01:55:00 +08:00
migration_test.go refactor: seperate security.yml for store keys 2026-03-22 01:55:00 +08:00
model_config_test.go refactor: seperate security.yml for store keys 2026-03-22 01:55:00 +08:00
multikey_test.go refactor: seperate security.yml for store keys 2026-03-22 01:55:00 +08:00
security.go feat(security): add sensitive data filtering for tool results sent to 2026-03-23 20:55:41 +08:00
SECURITY_CONFIG.md rename security.yml to .security.yml 2026-03-23 11:20:42 +08:00
security_integration_test.go rename security.yml to .security.yml 2026-03-23 11:20:42 +08:00
security_test.go rename security.yml to .security.yml 2026-03-23 11:20:42 +08:00
version.go feat:Modify the location where version is obtained, and insert version information into the context (#1300) 2026-03-10 17:42:05 +08:00
version_test.go feat:Modify the location where version is obtained, and insert version information into the context (#1300) 2026-03-10 17:42:05 +08:00