1
0
Fork 0
llm-ingestion-pipeline-secu.../CLAUDE.md
Kjell Tore Guttormsen 98ebc07b56 release: 1.0.0 -- the exported Python surface is frozen under semver
Nine current-state surfaces bumped by hand. The classification sweep ran
FIRST, before the first edit: 421 hits on 'v?0.N(.N)' across all tracked
files, each read and sorted current-state vs provenance. Provenance is
untouched -- 'New in v0.4.0', 'measured against 0.3.1', every '0.7.0'
in a code comment or a census candidate name still says what it measured.

The sweep found two surfaces the plan's nine-item list did not name:
README's status BADGE (still 'alpha' -- a version string grep cannot see
it) and ADOPTION-BRIEF's test count, which said 791 against a suite that
runs 792. Both corrected.

pyproject also moves Development Status :: 3 - Alpha -> 5 -
Production/Stable, likewise invisible to a version grep.

CHANGELOG [1.0.0] references [0.3.0] and [0.3.1] for the behaviour
changes rather than repeating them, and carries the freeze point itself:
what is frozen (the exported surface), what is deliberately NOT (all
detection calibration), the three conceded limitations, the one known
open defect (:43), and the runtime-coverage gap -- no external consumer
has run 0.7.0.

No code changed. Per docs/PLAN-v1.md the release gate is the whole suite
green, not a new test: 792 passed, coverage matrix 129/129 + 6/6, exit 0.
2026-08-13 22:20:48 +02:00

3.2 KiB

llm-ingestion-pipeline-security

Kontekst

Gjenbrukbar, minimal defensiv layer for LLM ingestion-pipelines (write-time), til forskjell fra query-time chatbot-guardrails. Pakker det arkitektoniske kontraktet — sanitize → fence → tool-less karantenert transform → per-stadium capability-isolasjon → scan output før commit → fail-secure — som komponerbar, framework-agnostisk kode.

Referanse-implementasjon: claude-code-llm-wiki Stage B (tools/wiki_ingest/). Lexikon-seed: injection-patterns.mjs fra llm-security-pluginen.

Repoet er på v1.0.0 — den eksporterte Python-surfacen er frosset under semver (deteksjonsatferd er det IKKE; kalibrering flytter seg i 1.x). Stdlib-kjernen er bygget og testet (15 moduler + topp-nivå wiring, showcase + korpus), inkl. OKF-adapter og aktivt-innhold- detektor (EchoLeak-klassen) i output-gaten. Mode-b import_bundle skanner reserverte strukturfiler (index.md/log.md) i mottatte bundles i stedet for å path-avvise dem; upload-front-end beholder shadow-reject (allow_reserved=False). Output-gatens decode-and-rescan mater dekodet base64-klartekst gjennom BÅDE lexicon og secret-egress (LLM02), så en base64-innpakket credential fanges som decoded:egress:* i stedet for å forsvinne; hex-innpakket er en dokumentert restgap (entropy eksponerer kun base64-klartekst). active:raw-html krever et EKSTERNT mål på URL-attributt-grenen, og <base> er ute av det aktive navnesettet; scanner og mutator har hver sin predikat (is_active_tag / is_defangable_tag). Rå HTML graderes nå også på BÆRER: <a>/<area> er klikk-krevende og rapporteres som active:raw-html-link (MEDIUM), og en tagg hvis hele affordans ER en URL den ikke bærer (</a>, <Frame>, <video />) er inert. Klassifisering skjer i active_tag_class; is_active_tag er en tynn wrapper, og census patcher den FØRSTE (en boolsk patch kan ikke uttrykke en regradering). ZWJ (U+200D) dømmes på KONTEKST, ikke identitet — unntas kun mellom to emoji, på begge flater (sanitize eier predikatet, output importerer det). Start med docs/BRIEF.md for design, README.md for bruk, docs/PLAN.md for byggerekkefølgen.

Konvensjoner

  • Norsk for dialog og planer, engelsk for kode og innhold (repoet er publisert).
  • Ingen GitHub — kun Forgejo (git.fromaitochitta.com).
  • Remote satt: offentlig open/-speil på Forgejo; push hver commit (durabelt autorisert).
  • Minimal-dependency: stdlib-first kjerne; ML/judge-detektorer bak extras.

Communication patterns

Linking to local files

When pointing to local files in responses, always use markdown link syntax with a descriptive name:

  • Use [Human-friendly name](file:///absolute/path) — never bare file:///... URLs or autolinks <file://...>.
  • Always use absolute paths. Never ~/ or relative paths.
  • For multiple files, render as a bullet list of named markdown links.

Why: bare file:// URLs only render the first as clickable across multiple lines. Named markdown links make each entry independently clickable and look cleaner.

Example (the path is a placeholder — the checkout root is the reader's own, and this file is published, so it must not carry one machine's directory layout):