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
30
plugins/llm-security/tests/hooks/probe-secrets.mjs
Normal file
30
plugins/llm-security/tests/hooks/probe-secrets.mjs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
// 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-edit-secrets.mjs';
|
||||
|
||||
// Fake AWS key
|
||||
const awsKeyId = 'AKIA' + 'IOSFODNN7EXAMPLE';
|
||||
|
||||
async function test(filePath) {
|
||||
return new Promise(resolve => {
|
||||
const child = execFile('node', [SCRIPT], {timeout:5000}, (err, stdout, stderr) => {
|
||||
resolve({ code: child.exitCode, filePath, stderr: stderr.split('\n')[0] });
|
||||
});
|
||||
const payload = { tool_name: 'Write', tool_input: { file_path: filePath, content: `key = "${awsKeyId}"` } };
|
||||
child.stdin.end(JSON.stringify(payload));
|
||||
});
|
||||
}
|
||||
|
||||
const paths = [
|
||||
'knowledge/aws-docs.md',
|
||||
'/project/knowledge/aws-docs.md',
|
||||
'tests/config.test.mjs',
|
||||
'tests/config.test.js',
|
||||
'config.example',
|
||||
'src/config.example.js',
|
||||
];
|
||||
|
||||
for (const p of paths) {
|
||||
const r = await test(p);
|
||||
console.log('exit=' + r.code, JSON.stringify(p), r.stderr || '');
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue