diff --git a/README.md b/README.md index b668cfc..760932d 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Then open Claude Code and type `/plugin` to browse and install plugins from the ## Plugins -### [LLM Security](plugins/llm-security/) `v7.4.0` +### [LLM Security](plugins/llm-security/) `v7.5.0` Security scanning, auditing, and threat modeling for agentic AI projects. @@ -36,6 +36,7 @@ Built on OWASP LLM Top 10 (2025), OWASP Agentic AI Top 10, and the AI Agent Trap - **Deterministic scanning** — 23 Node.js scanners (10 orchestrated + 13 standalone) for byte-level analysis: Shannon entropy, Unicode codepoints, typosquatting detection, taint flow, DNS resolution, git forensics, AI-BOM, attack simulation, IDE extension prescan (VS Code + JetBrains — URL fetch from Marketplace / OpenVSX / direct VSIX / JetBrains Marketplace, hardened ZIP extractor for zip-slip / symlinks / bombs, plus OS sandbox via `sandbox-exec` / `bwrap` so the kernel enforces FS confinement), MCP cumulative-drift baseline reset (E14 — sticky baseline catches slow-burn rug-pulls). Bash-normalize T1-T6 for obfuscation-resistant denylists - **Advisory analysis** — 20 commands that scan, audit, and model threats with structured reports, letter grades, and actionable remediation - **Enterprise governance** — Compliance mapping (EU AI Act, NIST AI RMF, ISO 42001), SARIF 2.1.0 output, structured audit trail, policy-as-code, standalone CLI +- **v7.5.0 playground (2026-05-05)** — Single-file SPA at `plugins/llm-security/playground/llm-security-playground.html` (~10 200 lines) for onboarding, demoer og workshop-bruk uten Claude Code-installasjon. Parsere + renderere for alle 18 produces_report-kommandoer, 18 markdown test-fixtures som kontrakt-anker, komplett demo-prosjekt med alle 18 rapporter ferdig parsed, vendor-synket design-system, 9 Playwright-genererte screenshots. 11 nye `window`-globaler eksponert for testing/automasjon (`__store`, `__navigate`, `__loadDemoState`, `__PARSERS`, `__RENDERERS` …). Bug-fix: `normalizeVerdictText` håndterer GO-WITH-CONDITIONS uten å kollapse til ALLOW. Ingen scanner- eller hook-behavior-changes — purely additive surface - **v7.4.0 examples + e2e suite (2026-05-05)** — 9 runnable demonstration walkthroughs under `examples/` (lethal-trifecta, mcp-rug-pull, supply-chain-attack, poisoned-claude-md, bash-evasion-gallery, prompt-injection-showcase, malicious-skill-demo, toxic-agent-demo, pre-compact-poisoning) plus three new test suites under `tests/e2e/` (attack-chain, multi-session, scan-pipeline) that prove the framework works as a coordinated system. +45 tests (1777 → 1822), no scanner or hook behavior changes — purely additive surface - **v8.0.0 env-var deprecation runway (D3, v7.3.0)** — Hook configuration has historically been split between process env-vars and the team-distributable `.llm-security/policy.json` file. Until v7.3.0 the two surfaces could disagree silently. The new `getPolicyValueWithEnvWarn()` helper in `scanners/lib/policy-loader.mjs` now emits a one-time-per-process stderr line whenever both surfaces are explicitly set: - Affected pairs: `LLM_SECURITY_INJECTION_MODE`↔`injection.mode`, `LLM_SECURITY_TRIFECTA_MODE`↔`trifecta.mode`, `LLM_SECURITY_ESCALATION_WINDOW`↔`trifecta.escalation_window` (new key in `DEFAULT_POLICY`), `LLM_SECURITY_AUDIT_LOG`↔`audit.log_path` diff --git a/plugins/llm-security/.claude-plugin/plugin.json b/plugins/llm-security/.claude-plugin/plugin.json index 2279dcc..5b3e841 100644 --- a/plugins/llm-security/.claude-plugin/plugin.json +++ b/plugins/llm-security/.claude-plugin/plugin.json @@ -1,5 +1,5 @@ { "name": "llm-security", "description": "Security scanning, auditing, and threat modeling for Claude Code projects. Detects secrets, validates MCP servers, assesses security posture, and generates threat models aligned with OWASP LLM Top 10.", - "version": "7.4.0" + "version": "7.5.0" } diff --git a/plugins/llm-security/CHANGELOG.md b/plugins/llm-security/CHANGELOG.md index a27e3d3..ec5bed6 100644 --- a/plugins/llm-security/CHANGELOG.md +++ b/plugins/llm-security/CHANGELOG.md @@ -6,6 +6,38 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] +## [7.5.0] - 2026-05-05 + +### Added +- **Playground.** Single-file SPA at `playground/llm-security-playground.html` + (~10 200 linjer) for onboarding, demoer og workshop-bruk uten Claude Code- + installasjon. Parsere + renderere for alle 18 `produces_report=true`- + kommandoer (Fase 2: 10 høy-prio + Fase 3: 8 gjenstående). 18 markdown + test-fixtures under `playground/test-fixtures/` som kontrakt-anker for + parser-utvikling. Komplett demo-prosjekt `dft-komplett-demo` har alle 18 + rapporter ferdig parsed inline. +- **Design-system vendor-fil under `playground/vendor/`** (sjekksum-låst via + `MANIFEST.json`, synket fra `shared/playground-design-system/`). +- **9 screenshots** under `playground/screenshots/v7.5.0/` (Playwright- + generert): onboarding, home, catalog, project og 8 representative + rapporter (scan, plugin-audit, posture, dashboard, diff, clean, + threat-model, red-team). +- **Eksponerte window-globaler for testing/automasjon:** `__store`, + `__navigate`, `__loadDemoState`, `__scheduleRender`, `__PARSERS`, + `__RENDERERS`, `__CATALOG`, `__inferVerdict`, `__inferKeyStats`, + `__renderPageShell`, `__handlePasteImport`. Aktiverer Playwright-styrt + navigasjon og programmatisk parser/renderer-test. +- **2 nye archetypes i `KEY_STATS_CONFIG`:** `kanban-buckets` (auto/semi-auto/ + manual-stats for clean) og `matrix-risk` (trusler/maks score/celler for + threat-model). + +### Changed +- **`normalizeVerdictText` regex-rekkefølge:** GO-WITH-CONDITIONS / CONDITIONAL + / BETINGET sjekkes nå FØR plain GO, slik at betinget verdict (pre-deploy + med åpne vilkår) ikke kollapser til ALLOW. Fix-en er bakoverkompatibel — + alle eksisterende verdict-tekster løses til samme verdier. +- Ingen scanner- eller hook-behavior-changes — purely additive surface. + ## [7.4.0] - 2026-05-05 Examples + e2e suite. Seven runnable demonstration walkthroughs under diff --git a/plugins/llm-security/CLAUDE.md b/plugins/llm-security/CLAUDE.md index bd5140d..a1e9754 100644 --- a/plugins/llm-security/CLAUDE.md +++ b/plugins/llm-security/CLAUDE.md @@ -1,4 +1,4 @@ -# LLM Security Plugin (v7.4.0) +# LLM Security Plugin (v7.5.0) Security scanning, auditing, and threat modeling for Claude Code projects. 5 frameworks: OWASP LLM Top 10, Agentic AI Top 10 (ASI), Skills Top 10 (AST), MCP Top 10, AI Agent Traps (DeepMind). 1822+ unit, integration, and end-to-end tests (`tests/e2e/` covers the multi-hook attack chain, multi-session state simulation, and the full scan-orchestrator pipeline); mutation-testing coverage not published. @@ -69,6 +69,26 @@ revisions table (M10). Env-only vars without policy.json equivalents `LLM_SECURITY_MCP_CACHE_FILE`) are unchanged — they emit no deprecation signal because there is nothing to deprecate yet. +**v7.5.0 — Playground (additive surface, no scanner/hook behavior changes).** +Single-file SPA at `playground/llm-security-playground.html` (~10 200 lines) +for onboarding, demo og workshop-bruk uten Claude Code-installasjon. Parser ++ renderer for alle 18 `produces_report=true`-kommandoer i `CATALOG`. State +i IndexedDB primær (`llm-security-playground-v1`) med localStorage-fallback, +sirkelfri Proxy + EventTarget store, microtask-batchet render. Theme-bootstrap +med FOUC-prevention. 4 overflater: onboarding (5 grupper) → home (3 tracks) +→ catalog (20 kommandoer) ⇄ project (rapporter / oversikt / kontekst / +eksport). Demo-state har tre prosjekter inline; `dft-komplett-demo` har alle +18 rapporter ferdig parsed for klikk-gjennom. Vendor-synket design-system +under `playground/vendor/playground-design-system/` (sjekksum-låst via +`MANIFEST.json`, redigeres aldri direkte). Test-fixtures under +`playground/test-fixtures/` (én markdown-fil per kommando) er kontrakt-anker +for parser-utvikling. Skjermdumper i `playground/screenshots/v7.5.0/`. +Eksponerte vinduer-globaler for testing/automasjon: `__store`, `__navigate`, +`__loadDemoState`, `__scheduleRender`, `__PARSERS`, `__RENDERERS`, `__CATALOG`, +`__inferVerdict`, `__inferKeyStats`, `__renderPageShell`, `__handlePasteImport`. +Inkluderer fix av `normalizeVerdictText` regex-rekkefølge: GO-WITH-CONDITIONS +sjekkes før GO så betinget verdict ikke kollapser til ALLOW. + ## Commands | Command | Description | diff --git a/plugins/llm-security/README.md b/plugins/llm-security/README.md index 57728ee..e3b6b90 100644 --- a/plugins/llm-security/README.md +++ b/plugins/llm-security/README.md @@ -6,7 +6,7 @@ *AI-generated: all code produced by Claude Code through dialog-driven development. [Full disclosure →](../../README.md#ai-generated-code-disclosure)* -![Version](https://img.shields.io/badge/version-7.4.0-blue) +![Version](https://img.shields.io/badge/version-7.5.0-blue) ![Platform](https://img.shields.io/badge/platform-Claude_Code_Plugin-purple) ![Commands](https://img.shields.io/badge/commands-20-orange) ![Agents](https://img.shields.io/badge/agents-6-orange) @@ -483,6 +483,64 @@ Prompt injection is **structurally unsolvable** with current architectures (join --- +## Playground (v7.5.0) + +A single-file SPA at `playground/llm-security-playground.html` provides +an interactive surface for onboarding, command discovery and report demos +**without requiring Claude Code installation**. Open the file directly in +a browser (Chrome/Firefox/Safari over `file://`) — no build step, no +network calls, no npm install. Theme-bootstrap with FOUC-prevention; state +persisted in IndexedDB primary + localStorage fallback. + +**Layout:** + +``` +playground/ +├── llm-security-playground.html ← single-file SPA (~10 200 lines) +├── vendor/ +│ └── playground-design-system/ ← synket fra shared/, sjekksum-låst +├── test-fixtures/ ← markdown-fixtures (én per kommando) +└── screenshots/v7.5.0/ ← Playwright-genererte demobilder +``` + +**Hva playgroundet dekker:** + +- **Onboarding (5 grupper):** organisasjon, scope, profil, plattform, + compliance. Verdier persisteres som `shared`-state og prefylles automatisk + i alle command-skjemaer. +- **Home:** prosjekt-grid, fleet-tracks for posture/scan/red-team. «Last + inn demo-data»-knappen aktiverer 3 prosjekter inkludert `dft-komplett-demo` + med alle 18 rapporter ferdig parsed. +- **Catalog:** alle 20 kommandoer gruppert i 5 kategorier. Søk filtrerer + cards, og «Åpne skjema»-knapp bygger ferdig pipeline-streng for klipp-og- + lim til terminalen. +- **Project surface:** 4 skjermer (Oversikt / Rapporter / Kontekst / + Eksport). Rapporter-tabben har category-tabs (discover / posture / + findings-ops / hardening / adversarial / mcp-ops) og lim-inn-import for + hver rapport-kommando. + +**Parser/renderer-arkitektur:** Hver `produces_report=true`-kommando i +`CATALOG` har en parser (markdown → struktur) og en renderer (struktur +→ DS-komponenter). 18 archetypes støttes: `findings`, `findings-grade`, +`risk-score-meter`, `posture-cards`, `dashboard-fleet`, `red-team-results`, +`diff-report`, `kanban-buckets`, `matrix-risk`. Parser-kontrakten er +`{ ok: true, data: {...} } | { ok: false, errors: [...] }`. Test-fixtures +under `playground/test-fixtures/` er kontrakt-anker — én markdown-fil per +kommando som speiler `templates/unified-report.md`-formatet. + +**Eksponerte testing/automasjons-globaler:** `__store`, `__navigate`, +`__loadDemoState`, `__scheduleRender`, `__PARSERS`, `__RENDERERS`, +`__CATALOG`, `__inferVerdict`, `__inferKeyStats`, `__renderPageShell`, +`__handlePasteImport`. Aktiverer Playwright-styrt navigasjon og +programmatisk parser/renderer-test mot fixture-katalogen. + +**Begrensninger:** SPA er en lim-inn-overflate — den kjører ingen scannere +selv. Output må komme fra Claude Code (`/security scan ...`), CLI +(`node scanners/...`) eller stub-fixtures. Demo-state inneholder kun de +3 inline-prosjektene; nye prosjekter er per-bruker og lagres lokalt. + +--- + ## Self-scan Running `node scanners/scan-orchestrator.mjs .` on this plugin produces **0 findings (ALLOW)** with ~190 suppressions via `.llm-security-ignore`. Every suppression is explained — a security plugin that documents attack patterns, ships a malicious demo fixture, and tests against deliberately evil code will trigger its own scanners. The entropy scanner flags regex patterns in `knowledge/secrets-patterns.md`. The taint scanner flags `eval(user_input)` in test fixtures. The toxic flow analyzer flags the plugin's own commands that use Read+Bash. Remove the ignore file and re-run to see the unsuppressed picture. @@ -555,6 +613,7 @@ demonstrations — each with `README.md`, fixture, run script, and | Version | Date | Highlights | |---------|------|------------| +| **7.5.0** | 2026-05-05 | **Playground.** Single-file SPA at `playground/llm-security-playground.html` (~10 200 lines) for onboarding, demoer og workshop-bruk uten Claude Code-installasjon. Parsere + renderere for alle 18 `produces_report=true`-kommandoer (Fase 2: 10 høy-prio + Fase 3: 8 gjenstående: mcp-inspect, supply-check, pre-deploy, diff, watch, registry, clean, threat-model). 18 markdown test-fixtures under `playground/test-fixtures/` som kontrakt-anker. Komplett demo-prosjekt `dft-komplett-demo` har alle 18 rapporter ferdig parsed inline. Vendor-synket design-system under `playground/vendor/` (sjekksum-låst). 9 Playwright-genererte screenshots i `playground/screenshots/v7.5.0/`. 11 nye `window`-globaler for testing/automasjon. 2 nye `KEY_STATS_CONFIG`-archetypes (`kanban-buckets`, `matrix-risk`). Bug-fix: `normalizeVerdictText` regex-rekkefølge oppdatert så GO-WITH-CONDITIONS / CONDITIONAL / BETINGET ikke lenger kollapser til ALLOW. Ingen scanner- eller hook-behavior-changes — purely additive surface. | | **7.4.0** | 2026-05-05 | **Examples + e2e suite.** Seven runnable demonstration walkthroughs under `examples/` (`prompt-injection-showcase`, `lethal-trifecta-walkthrough`, `mcp-rug-pull`, `supply-chain-attack`, `poisoned-claude-md`, `bash-evasion-gallery`, `toxic-agent-demo`, `pre-compact-poisoning`) — each with `README.md`, runtime-isolated fixture, single-command run-script, and `expected-findings.md` testable contract. Three new `tests/e2e/` suites (attack-chain 17 tests + multi-session 9 tests + scan-pipeline 19 tests = +45 tests, total 1822) prove the framework works as a coordinated system, not just isolated units. No scanner or hook behavior changes — purely additive surface. Scanner `VERSION` constants synced across `dashboard-aggregator.mjs`, `posture-scanner.mjs`, `ide-extension-scanner.mjs`. | | **7.3.1** | 2026-05-01 | **Stabilization patch.** Project repositioned as solo, stabilization-only, with explicit "fork & own" stance for enterprise features. New public docs: `CONTRIBUTING.md` (fork-and-own model), README "Project scope" section (out-of-scope table with commercial alternatives), updated `SECURITY.md` (v7.3.x supported, v7.0–v7.2 best-effort, < v7.0 EOL). Coherence: `package.json` files whitelist + `bugs` URL + repo URL fix; scanner `VERSION` constants synced across `dashboard-aggregator.mjs`, `posture-scanner.mjs`, `ide-extension-scanner.mjs`. Test ceiling raised on flaky pre-compact-scan timing test (500 ms → 1000 ms; design target unchanged). No behavior changes. | | **7.3.0** | 2026-05-01 | **Batch C release.** Wave A (T7-T9 bash normalization + rot13 comment-block decoder), Wave B (`.gitattributes` post-clone advisory + npm scope-hop typosquat + GitHub/Forgejo workflow-scanner with 23-field blacklist + re-interpolation tracking + auth-bypass detection), Wave C (MCP cumulative-drift baseline + `/security mcp-baseline-reset`), Wave D (riskScoreV1 `@deprecated`; sandbox-architecture rationale docs; env-var deprecation runway to v8.0.0; CLAUDE.md hooks count + consistency test). 1665+ → 1777 tests. Wave E (additional attack-simulator scenarios) deferred indefinitely | diff --git a/plugins/llm-security/package.json b/plugins/llm-security/package.json index 76a01bb..beb6461 100644 --- a/plugins/llm-security/package.json +++ b/plugins/llm-security/package.json @@ -1,6 +1,6 @@ { "name": "llm-security", - "version": "7.4.0", + "version": "7.5.0", "description": "Security scanning, auditing, and threat modeling for Claude Code projects", "type": "module", "bin": { diff --git a/plugins/llm-security/playground/A11Y-RAPPORT.md b/plugins/llm-security/playground/A11Y-RAPPORT.md new file mode 100644 index 0000000..2c2040a --- /dev/null +++ b/plugins/llm-security/playground/A11Y-RAPPORT.md @@ -0,0 +1,120 @@ +# A11Y-rapport — llm-security playground v7.5.0 + +**Dato:** 2026-05-05 +**Verktøy:** Playwright headless audit (Chromium 1217) + manuell verifisering +**Spec:** WCAG 2.1 AA + +--- + +## Oppsummering + +Playgroundet er **i hovedsak konformt** med WCAG 2.1 AA. Automatisert audit +fant **0 blokkerende problemer**. Tre mindre forbedringer flagges for +oppfølging i v7.5.x patch eller v7.6.0. + +| Område | Status | Notater | +|--------|--------|---------| +| Språkattributt | ✓ | `` | +| Form-labels | ✓ | 4/5 inputs har eksplisitt `