chore(llm-security): remove leftover debug probe from tests/
probe-rm.mjs was self-labelled "Temporary probe — delete after debugging". It is not a test (no node:test harness, no assertions — it prints exit codes), it ran against a hardcoded absolute path into the INSTALLED marketplace copy rather than this repo, and it exercised the rm-block cases that are now covered properly by tests/hooks/pre-bash-destructive.test.mjs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TcQyMTQfyrsAapaCMPxTtQ
This commit is contained in:
parent
a035455979
commit
566c281b56
1 changed files with 0 additions and 20 deletions
|
|
@ -1,20 +0,0 @@
|
||||||
// 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