feat(llm-security): playground Fase 1 — single-file SPA skjelett [skip-docs]
Mirror av ms-ai-architect playground-arkitektur, tilpasset llm-security:
- 4 overflater (onboarding/home/catalog/project) med surface-router
- IndexedDB persistens (llm-security-playground-v1) + localStorage fallback
- Theme-bootstrap med FOUC-prevention og localStorage-persist
- 20 kommandoer i CATALOG (5 kategorier: discover/posture/findings-ops/
hardening/adversarial/mcp-ops) med full input_fields + report_archetype
- 5-gruppers onboarding (organisasjon/scope/profil/plattform/compliance)
med form-progress sidebar
- Home: 3 tracks + fleet-grid prosjektliste + tom-state med demo-data
- Katalog: ekspanderbare grupper med live-søk og forhåndsvisning
- Prosjekt-stub: 4 screen-tabs + 6 kategori-tabs + per-kommando
skjema/paste-import/rapport-soner
- Demo-state: Direktoratet for digital tjenesteutvikling med 2 prosjekter
- Eksport/import (JSON envelope), action-handlers (35), modal-portal
PARSERS + RENDERERS er tomme routing-objekter — fylles i Fase 2 (10 høy-prio
kommandoer) og Fase 3 (resterende 10). Paste-import viser «parser ikke
implementert»-guide-panel for kommandoer uten parser, og lagrer rå markdown
i state for fremtidig parsing.
Vendor: 27 filer synket fra shared/playground-design-system/
(MANIFEST.json sjekksum-låst, source_commit 487f7ae).
Verifisert: node --check OK (2737 linjer, 113733 char inline JS),
HTML-tag-balanse OK. Manuell smoke-test gjenstår.
Docs (plugin README, CLAUDE.md, rot-README) bumpes ved Fase 3-fullføring
sammen med plugin.json v7.5.0. Derfor [skip-docs] her.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
487f7ae746
commit
fba0adf17c
28 changed files with 7545 additions and 0 deletions
88
plugins/llm-security/playground/vendor/playground-design-system/schemas/finding.schema.json
vendored
Normal file
88
plugins/llm-security/playground/vendor/playground-design-system/schemas/finding.schema.json
vendored
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://playground-ds.no/schemas/finding.json",
|
||||
"title": "Finding",
|
||||
"description": "Et enkelt funn fra en plugin-skanning. Brukes av llm-security, config-audit, ultraplan-review og ms-ai-review.",
|
||||
"type": "object",
|
||||
"required": ["id", "title", "severity", "source"],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Stabil ID, f.eks. DDT-2026-118-F-001",
|
||||
"pattern": "^[A-Z0-9-]{4,}$"
|
||||
},
|
||||
"title": { "type": "string", "minLength": 4, "maxLength": 140 },
|
||||
"severity": {
|
||||
"enum": ["info", "low", "medium", "high", "critical"],
|
||||
"description": "Standard 5-trinns skala. Maps til CSS-tokens --color-severity-*."
|
||||
},
|
||||
"score": {
|
||||
"type": "number", "minimum": 0, "maximum": 10,
|
||||
"description": "CVSS-lignende numerisk score. Valgfri — severity er primær."
|
||||
},
|
||||
"rules": {
|
||||
"type": "array",
|
||||
"items": { "type": "string", "pattern": "^[A-Z]{2,4}[0-9]{2}(\\.[0-9]+)?$" },
|
||||
"description": "Regler/categories truffet, f.eks. LLM01, ASI02, DDT01"
|
||||
},
|
||||
"source": {
|
||||
"type": "object",
|
||||
"required": ["kind", "ref"],
|
||||
"properties": {
|
||||
"kind": { "enum": ["document", "prompt-response", "code-file", "config-file", "okr-set"] },
|
||||
"ref": { "type": "string", "description": "Filnavn / URL / sak-ID" },
|
||||
"line": { "type": "integer", "minimum": 1 },
|
||||
"col": { "type": "integer", "minimum": 0 },
|
||||
"snippet": { "type": "string", "maxLength": 800 }
|
||||
}
|
||||
},
|
||||
"evidence": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["kind", "value"],
|
||||
"properties": {
|
||||
"kind": { "enum": ["text", "codepoint", "metric", "url", "image"] },
|
||||
"value": { "type": "string" },
|
||||
"label": { "type": "string" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"rationale": { "type": "string", "description": "Norsk forklaring av hvorfor dette er et problem i denne konteksten" },
|
||||
"recommendation": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"summary": { "type": "string" },
|
||||
"steps": { "type": "array", "items": { "type": "string" } },
|
||||
"ttf": { "type": "string", "description": "Tid til løsning, f.eks. '2 t', '1 d', '5 d'" },
|
||||
"owner": { "type": "string", "description": "Foreslått eier (rolle eller person)" }
|
||||
}
|
||||
},
|
||||
"references": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": { "type": "string" },
|
||||
"url": { "type": "string", "format": "uri" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"enum": ["new", "acknowledged", "in-progress", "fixed", "accepted-risk", "false-positive"],
|
||||
"default": "new"
|
||||
},
|
||||
"acceptance": {
|
||||
"type": "object",
|
||||
"description": "Påkrevd hvis status = accepted-risk og severity ≥ high",
|
||||
"properties": {
|
||||
"approver": { "type": "string" },
|
||||
"date": { "type": "string", "format": "date" },
|
||||
"rationale": { "type": "string" },
|
||||
"review_by": { "type": "string", "format": "date" }
|
||||
}
|
||||
},
|
||||
"created": { "type": "string", "format": "date-time" },
|
||||
"updated": { "type": "string", "format": "date-time" }
|
||||
}
|
||||
}
|
||||
78
plugins/llm-security/playground/vendor/playground-design-system/schemas/okr-set.schema.json
vendored
Normal file
78
plugins/llm-security/playground/vendor/playground-design-system/schemas/okr-set.schema.json
vendored
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://playground-ds.no/schemas/okr-set.json",
|
||||
"title": "OKR-sett",
|
||||
"description": "Et OKR-sett: ett mål (Objective) med 1–6 nøkkelresultater (KR). Brukes av OKR live-writer.",
|
||||
"type": "object",
|
||||
"required": ["id", "objective", "key_results", "owner", "period"],
|
||||
"properties": {
|
||||
"id": { "type": "string" },
|
||||
"owner": {
|
||||
"type": "object",
|
||||
"required": ["name", "unit"],
|
||||
"properties": {
|
||||
"name": { "type": "string" },
|
||||
"unit": { "type": "string", "description": "Avdeling/seksjon" },
|
||||
"org": { "type": "string", "description": "Kommune/etat" }
|
||||
}
|
||||
},
|
||||
"period": {
|
||||
"type": "object",
|
||||
"required": ["kind", "label", "start", "end"],
|
||||
"properties": {
|
||||
"kind": { "enum": ["tertial", "kvartal", "halvår", "år"] },
|
||||
"label": { "type": "string", "description": "f.eks. 'T2 2026'" },
|
||||
"start": { "type": "string", "format": "date" },
|
||||
"end": { "type": "string", "format": "date" }
|
||||
}
|
||||
},
|
||||
"objective": {
|
||||
"type": "object",
|
||||
"required": ["text"],
|
||||
"properties": {
|
||||
"text": { "type": "string", "minLength": 10, "maxLength": 240 },
|
||||
"rationale": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"key_results": {
|
||||
"type": "array", "minItems": 1, "maxItems": 6,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["id", "text"],
|
||||
"properties": {
|
||||
"id": { "type": "string", "pattern": "^KR[0-9]+$" },
|
||||
"text": { "type": "string" },
|
||||
"metric": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": { "type": "string" },
|
||||
"unit": { "type": "string", "description": "%, dager, kr, antall, …" },
|
||||
"baseline": { "type": "number" },
|
||||
"target": { "type": "number" },
|
||||
"stretch": { "type": "number" },
|
||||
"source": { "type": "string", "description": "KPI-katalog ref / Tableau-sett / etc." }
|
||||
}
|
||||
},
|
||||
"deadline": { "type": "string", "format": "date" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"score": {
|
||||
"type": "object",
|
||||
"description": "Generert av OKR-writer ved kvalitetsanalyse",
|
||||
"properties": {
|
||||
"overall": { "type": "number", "minimum": 0, "maximum": 100 },
|
||||
"measurability": { "type": "number" },
|
||||
"specificity": { "type": "number" },
|
||||
"ambition": { "type": "number" },
|
||||
"actionability": { "type": "number" }
|
||||
}
|
||||
},
|
||||
"critiques": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "https://playground-ds.no/schemas/finding.json" }
|
||||
},
|
||||
"version": { "type": "string", "description": "Semver eller utkast 0.4-stil" },
|
||||
"status": { "enum": ["draft", "in-review", "approved", "active", "closed"], "default": "draft" }
|
||||
}
|
||||
}
|
||||
59
plugins/llm-security/playground/vendor/playground-design-system/schemas/ros-threat.schema.json
vendored
Normal file
59
plugins/llm-security/playground/vendor/playground-design-system/schemas/ros-threat.schema.json
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://playground-ds.no/schemas/ros-threat.json",
|
||||
"title": "ROS-trussel",
|
||||
"description": "Én identifisert trussel i en risiko- og sårbarhetsanalyse. NS 5814-justert.",
|
||||
"type": "object",
|
||||
"required": ["id", "title", "category", "inherent"],
|
||||
"properties": {
|
||||
"id": { "type": "string", "pattern": "^T-[0-9]{3,}$" },
|
||||
"title": { "type": "string" },
|
||||
"description": { "type": "string" },
|
||||
"category": {
|
||||
"enum": ["personvern", "informasjonssikkerhet", "datakvalitet",
|
||||
"compliance", "dataintegritet", "leverandørrisiko",
|
||||
"tilgjengelighet", "omdømme", "økonomi", "andre"]
|
||||
},
|
||||
"actors": {
|
||||
"type": "array",
|
||||
"items": { "enum": ["intern-bruker", "saksbehandler", "innbygger", "ekstern-aktør", "leverandør", "system", "ai-modell"] }
|
||||
},
|
||||
"inherent": {
|
||||
"type": "object",
|
||||
"required": ["likelihood", "consequence"],
|
||||
"properties": {
|
||||
"likelihood": { "type": "integer", "minimum": 1, "maximum": 5 },
|
||||
"consequence": { "type": "integer", "minimum": 1, "maximum": 5 },
|
||||
"rationale": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"controls": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["id", "title"],
|
||||
"properties": {
|
||||
"id": { "type": "string", "pattern": "^M-[0-9]{3,}$" },
|
||||
"title": { "type": "string" },
|
||||
"kind": { "enum": ["preventiv", "deteksjon", "korreksjon", "policy", "opplæring", "teknisk"] },
|
||||
"status": { "enum": ["planlagt", "implementert", "validert", "ute-av-drift"] },
|
||||
"owner": { "type": "string" },
|
||||
"due": { "type": "string", "format": "date" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"residual": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"likelihood": { "type": "integer", "minimum": 1, "maximum": 5 },
|
||||
"consequence": { "type": "integer", "minimum": 1, "maximum": 5 },
|
||||
"rationale": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"regulatory_refs": {
|
||||
"type": "array",
|
||||
"items": { "type": "string", "description": "GDPR Art. 35, AI Act Art. 6, NS 5814, …" }
|
||||
},
|
||||
"status": { "enum": ["open", "mitigating", "monitored", "closed", "transferred"], "default": "open" }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue