feat(llm-security-copilot): port llm-security v5.1.0 to GitHub Copilot CLI
Full port of llm-security plugin for internal use on Windows with GitHub Copilot CLI. Protocol translation layer (copilot-hook-runner.mjs) normalizes Copilot camelCase I/O to Claude Code snake_case format — all original hook scripts run unmodified. - 8 hooks with protocol translation (stdin/stdout/exit code) - 18 SKILL.md skills (Agent Skills Open Standard) - 6 .agent.md agent definitions - 20 scanners + 14 scanner lib modules (unchanged) - 14 knowledge files (unchanged) - 39 test files including copilot-port-verify.mjs (17 tests) - Windows-ready: node:path, os.tmpdir(), process.execPath, no bash Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
901bf0ae12
commit
f418a8fe08
169 changed files with 37631 additions and 0 deletions
53
plugins/llm-security-copilot/skills/registry/SKILL.md
Normal file
53
plugins/llm-security-copilot/skills/registry/SKILL.md
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
---
|
||||
name: security-registry
|
||||
description: Skill signature registry — view stats, scan and register skills, search known fingerprints
|
||||
---
|
||||
|
||||
# Skill Registry
|
||||
|
||||
Track scanned skills by fingerprint. Three sub-commands.
|
||||
|
||||
## Sub-command: Stats (default)
|
||||
|
||||
```bash
|
||||
node -e "
|
||||
import { getStats, listEntries } from '<plugin-root>/scanners/lib/skill-registry.mjs';
|
||||
const stats = getStats('<plugin-root>');
|
||||
const entries = listEntries('<plugin-root>', 5);
|
||||
console.log(JSON.stringify({ stats, entries }));
|
||||
" --input-type=module
|
||||
```
|
||||
|
||||
Show: total entries, last scan date, 5 most recent entries.
|
||||
|
||||
## Sub-command: Scan
|
||||
|
||||
```bash
|
||||
node -e "
|
||||
import { fingerprintSkill, checkRegistry } from '<plugin-root>/scanners/lib/skill-registry.mjs';
|
||||
const r = fingerprintSkill('<target>');
|
||||
const c = checkRegistry(r.fingerprint, '<plugin-root>');
|
||||
console.log(JSON.stringify({ fingerprint: r.fingerprint, name: r.name, files: r.files, ...c }));
|
||||
" --input-type=module
|
||||
```
|
||||
|
||||
If cached and not stale: show cached result. If miss or stale: run full scan, then register:
|
||||
|
||||
```bash
|
||||
node -e "
|
||||
import { registerScan } from '<plugin-root>/scanners/lib/skill-registry.mjs';
|
||||
registerScan({ skillPath: '<target>', fingerprint: '<fp>', name: '<name>', files: <files>, verdict: '<v>', risk_score: <n>, counts: <counts>, files_scanned: <n> }, '<plugin-root>');
|
||||
" --input-type=module
|
||||
```
|
||||
|
||||
## Sub-command: Search
|
||||
|
||||
```bash
|
||||
node -e "
|
||||
import { searchRegistry } from '<plugin-root>/scanners/lib/skill-registry.mjs';
|
||||
const results = searchRegistry('<pattern>', '<plugin-root>');
|
||||
console.log(JSON.stringify(results));
|
||||
" --input-type=module
|
||||
```
|
||||
|
||||
Show matching entries with verdict, risk score, last scanned date.
|
||||
Loading…
Add table
Add a link
Reference in a new issue