feat: initial open marketplace with llm-security, config-audit, ultraplan-local
This commit is contained in:
commit
f93d6abdae
380 changed files with 65935 additions and 0 deletions
20
plugins/llm-security/tests/hooks/probe-rm.mjs
Normal file
20
plugins/llm-security/tests/hooks/probe-rm.mjs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
// Temporary probe — delete after debugging
|
||||
import { execFile } from 'node:child_process';
|
||||
const SCRIPT = '/Users/ktg/.claude/plugins/marketplaces/plugin-marketplace/plugins/llm-security/hooks/scripts/pre-bash-destructive.mjs';
|
||||
async function test(cmd) {
|
||||
return new Promise(resolve => {
|
||||
const child = execFile('node', [SCRIPT], {timeout:5000}, (err, stdout, stderr) => {
|
||||
resolve({ code: child.exitCode, cmd, line: (stderr || '').split('\n')[0] });
|
||||
});
|
||||
child.stdin.end(JSON.stringify({ tool_name: 'Bash', tool_input: { command: cmd } }));
|
||||
});
|
||||
}
|
||||
const cmds = [
|
||||
'rm -f -r /home',
|
||||
'rm -rf /etc',
|
||||
'rm --force -r $HOME',
|
||||
];
|
||||
for (const c of cmds) {
|
||||
const r = await test(c);
|
||||
console.log('exit=' + r.code, JSON.stringify(c), r.line);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue