MCPcopy Create free account
hub / github.com/SethGammon/Citadel / runProtectFiles

Function runProtectFiles

scripts/test-security.js:323–334  ·  view source on GitHub ↗
(toolName, filePath, extraEnv = {})

Source from the content-addressed store, hash-verified

321 assert(
322 result && typeof result.action === 'string',
323 'checkConsent should return { action: string }'
324 );
325 assert(
326 ['allow', 'block', 'first-encounter'].includes(result.action),
327 `checkConsent action should be allow/block/first-encounter, got ${result.action}`
328 );
329 });
330
331 // ── 5. Glob Pattern Matching (protect-files) ──
332
333 console.log('\n▶ Glob Pattern Security');
334
335 test('protect-files blocks protected glob patterns', () => {
336 // Create a temporary harness.json with a protected pattern
337 const tmpConfig = path.join(os.tmpdir(), `citadel-test-${Date.now()}.json`);

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected