10 Commits

Author SHA1 Message Date
changelog-bot
453d580f69 chore(changelog): draft pending entries [skip ci] 2026-07-18 22:17:28 +00:00
Rene Fichtmueller
bc340da1f9 feat(gateway): backport Magatama injection-defense hardening (RU fix, normalization, patterns)
Backport of the hardened injection-defense from magatama core
(packages/core/src/security/injection-scan.ts) so both layers stay in
lockstep. Pattern ids are identical across layers for cross-layer telemetry.

- fix latent dead ignore-ru pattern: JS \b is ASCII-only and never matches
  around Cyrillic, so the Russian "ignore previous instructions" pattern
  never fired. Removed the leading/trailing \b.
- add normalizeForScan de-obfuscation pre-pass (NFKC; strip zero-width/bidi/
  unicode-tag/combining; map Cyrillic+Greek homoglyphs to ASCII; collapse
  spaced-out letters; de-leet). scanForInjection now scans BOTH raw and
  normalized input and unions matches by id; new viaNormalization flag.
- add excessive-letter-spacing (high) + broaden repeat-words-above (stacked
  determiners), ignore-zh (mid-phrase) and ignore-ko (before-verb determiners).

Block-mode FP guard: the gateway BLOCKS (INJECTION_DEFENSE_MODE=block), so
excessive-letter-spacing diverges from the Magatama regex by a letter-guard
lookahead (>=3 consecutive spaced letters). The raw Magatama form would 422
legit numeric traffic ("what comes next: 1 2 3 4 5 6 7 8 9 10"). Same id +
severity so telemetry stays in lockstep.

Verified: 76/76 red-team + benign dev/ops FP battery against built dist; 10 new
vitest cases; live /v1/guard/scan before/after (RU clear->blocked,
homoglyph/spacing/ko blocked, numeric sequence stays clear); gateway rebuilt +
restarted, health 200, 0 new false positives.
2026-07-07 21:49:08 +00:00
root
2ad363d7e8 sec(injection-defense): +9 patterns closing red-team bypass classes
Internal red-team showed the pattern layer caught only ~33% of injection-
shaped prompts. Adds 9 high-severity, FP-tuned patterns for the bypassed
classes (system-prompt extraction via repeat/read, self-referential secret
exfil, authority-spoof, base64 decode-exec, unfiltered persona, jailbreak-
confirm). Result: 10/10 attacks blocked on the red-team set, 0 false-
positives from the new patterns (verified against benign dev/ops prompts).
2026-07-07 19:36:15 +00:00
root
73da9d7391 sec(redteam): gateway injection-defense ~33% catch rate (confirms ShieldX landmine) 2026-06-28 22:04:04 +00:00
root
912f796e1f fix(pii): presidio sidecar language misconfig — stops silent name-redaction fail-open 2026-06-23 01:09:06 +00:00
root
88dec91d09 sec(pii): REDACT_PII_MODE=always — anonymize all gateway traffic incl. local Ollama 2026-06-23 00:56:40 +00:00
Rene Fichtmueller
45e296a8ae docs: changelog entry for /v1/guard scan API 2026-06-12 19:45:11 +02:00
Rene Fichtmueller
2ca77d0aee feat: Phase 2F — Multi-Agent Integration (ADRs + Client Fallback + Tests)
- ADR-0001: Multi-Agent Coworking Architecture with LLM Gateway Orchestrator
- ADR-0002: Tier Assignment Strategy for Model Selection (cost-first escalation)
- ADR-0003: Confidence Gate Thresholds & Learning Cycle Intervals (6h/12h/24h cycles)
- ADR-0004: External Provider Fallback Chain Ordering (Cerebras → Groq → Mistral)
- Enhanced client SDK: Offline Ollama fallback, health checks, exponential backoff retry
- Integration tests: claude-code-integration.test.ts (14 test cases)
- PHASE_2F_DEPLOYMENT.md: Pre-deployment checklist, automated deploy, rollback plan
- Post-deployment verification procedures for health, client fallback, metrics
2026-04-19 21:39:44 +02:00
Rene Fichtmueller
e0b9fa1f53 feat: add CtxHealth self-healing daemon as new workspace package
New package @llm-gateway/ctx-health (packages/ctx-health/) — a TypeScript
infrastructure monitoring and auto-healing daemon. Monitors 8 subsystems
every 60s (PM2, PostgreSQL, Ollama, Cloudflare tunnel, disk, memory,
network, WireGuard), gets AI-powered root cause analysis via the gateway
(ctxhealer caller / ctx_health_diagnose task_type), executes healing
actions with cooldown (5min) and escalation guards (3+ failures → human
escalation), persists all incidents to ctx_health_incidents and
ctx_health_status tables. Dry-run mode via CTX_HEALTH_DRY_RUN=true.
Runs as ctx-health PM2 process on Erik server.
2026-04-03 00:16:08 +02:00
Rene Fichtmueller
c3248da6c0 chore: add pending changelog entries for 2026-04-02 fixes 2026-04-02 23:52:17 +02:00