feat(llm-security): wire TRG scanner into orchestrator and policy
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V3s6WnubSSrFjAQTLQdVbG
This commit is contained in:
parent
fea943bdfb
commit
75aeeeee68
4 changed files with 83 additions and 1 deletions
|
|
@ -65,6 +65,24 @@ const DEFAULT_POLICY = Object.freeze({
|
|||
// Substring matches against relative path — plain contains, no glob.
|
||||
suppress_paths: [],
|
||||
},
|
||||
// TRG — trigger/activation-abuse scanner. Lists mirror the scanner defaults
|
||||
// in scanners/trigger-scanner.mjs; override any of them via policy.json.
|
||||
trg: {
|
||||
mode: 'warn',
|
||||
baiting_phrases: [
|
||||
'anything', 'everything', 'always', 'whenever', 'no matter what',
|
||||
'any request', 'any task', 'any file', 'every time',
|
||||
'all files', 'all messages', 'all requests',
|
||||
],
|
||||
builtin_names: [
|
||||
'read', 'write', 'edit', 'bash', 'glob', 'grep', 'task',
|
||||
'webfetch', 'websearch', 'notebookedit', 'todowrite',
|
||||
'ls', 'cat', 'agent', 'search', 'fetch',
|
||||
],
|
||||
broad_single_words: [
|
||||
'run', 'do', 'go', 'help', 'fix', 'use', 'get', 'set', 'all', 'any', 'it', 'this', 'that',
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
// Cache loaded policy per project root
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue