Commit Graph
7 Commits
Author SHA1 Message Date
thanhnvandClaude Opus 4.8 7f81120999 docs: attack catalog (visual) + playbook (internal) covering both demo scripts
- CASAN_ATTACK_CATALOG.md: one-page visual map of ALL ~38 attack scenes from
  run-all.sh (A1-A9, B1-B8, D1-D6, chain) + run-hardening.sh (HA1-7, HC1-4,
  HE1-4). Legend for 12 attack directions (input/output/artifact/tool-out/audit/
  telemetry/cost/action/supply/exfil/runtime/evidence), a defense-in-depth
  diagram, per-scene matrix with control + verdict + AI marker.
- CASAN_ATTACK_PLAYBOOK.md: internal deep-dive — per attack: scenario, why
  dangerous, exact blocking mechanism, AI-or-deterministic, verify command +
  expected result, threat-model ref. Prominent AI-usage answer: only A3/A8/D4
  invoke the model; everything else is deterministic. Semantic AI is an optional
  escalation that only ADDS a block, never removes one.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-04 00:21:21 +09:00
thanhnvandClaude Opus 4.8 2ffbda3fad feat(video+deck): Part 2 hardening demo script + slide deck update
- run-hardening.sh: narrated "Part 2" battery in the same visual language as
  run-all.sh (card/attack/guard/cmd + on-screen exit code with ⛔/✋/✅ verdict
  chips). Scenes: Track A (HA1-7: homoglyph/zero-width/base64, strict fail-closed,
  telemetry tamper, cost slow-boil/spray, benign FP=0%), Track C-MVP (HC1-4:
  action-gate, supply-chain, data-exfil, sandbox), and the Evidence Pack
  money-shot (HE1-4: pack → verify VALID → tamper 1 byte → TAMPERED exit=1 →
  certified-only-when-earned). Verified end-to-end (exit 0).
- CASAN_SLIDE_DECK.html: reflect implemented vs planned honestly. Updated H4/H5/H6
  AFTER columns, evidence terminal (140 checks), threat-model reframed to
  "identified AND Track A closed", readiness meters bumped to ~3.8-4.0, Track C-MVP
  reframed to DELIVERED (29/29), roadmap marks 07+09 done. Added 2 slides:
  "Track A delivered" and "Evidence Pack money-shot" (18 slides total).
- video guide: Part 1 (run-all) + Part 2 (run-hardening) with pre-flight note.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 23:51:11 +09:00
thanhnvandClaude Opus 4.8 fbcef967e5 chore(freeze): snapshot demo state before Plan-07 hardening work
Freeze current submission/demo baseline:
- casan-next-plans/: full task-level plan set (Plan 00 index + 02/04/06/07/08/09/12, QA, slide deck)
- optimize-docs/video-steps/: per-vector scene breakdown (commands/screen-text/script) + start-tmux
- run-all.sh / scorecard.sh / map-live.sh: REAL=1 live-battery wiring
- regenerated evidence + audit/telemetry logs from live REAL=1 run
- submission README + video recording guide updates
- dry-run pipeline logs for 001-okr-web-app

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 22:03:44 +09:00
thanhnvandClaude Opus 4.8 392f190b7e feat(model): implement OpenAI/Anthropic cloud backends + cloud-aware judge gate
The cloud branch of model-call.py was a stub (cloud_backend_not_implemented,
failed even with a key set); casan-step.mjs gated the judge on a hard-coded
Ollama ping. Wire up the real cloud path so a model can run without Ollama.

- model-call.py: add call_openai() and call_anthropic() (raw urllib, no new
  dependency — matches the existing call_ollama). Endpoints hard-pinned to the
  SSRF allowlist; keys read from env, never logged. Anthropic sends no
  temperature/thinking (rejected as 400 on Opus 4.8/4.7; omitting thinking
  keeps the terse one-word classify/judge answer). main() routes by
  ollama:/openai:/anthropic: prefix; key-unset still fails closed honestly.
  provider-usage.jsonl cost_source is per-backend, keeping ollama's exact
  "ollama_local_real_tokens" tag that evidence/tests key on.
- casan-step.mjs: ollamaAvailable() -> modelAvailable() — when
  CASAN_MODEL_PRIMARY is a cloud spec with its key set, the judge runs through
  the cloud path; otherwise it pings local Ollama as before. Default
  (unset CASAN_MODEL_PRIMARY) is unchanged.
- CASAN_MASTER_RUNBOOK.md: update sections 0/1/4/7/8 — cloud is now
  implemented (not a stub); keep the honest "untested with a real key" +
  CA-cert caveats.

Not verified against a live API key (none available); confirmed key-set makes
a real HTTPS call and key-unset fails closed. Gates unchanged:
security-gate PASS=11 FAIL=0, adversarial PASS=44 FAIL=0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:38:59 +09:00
thanhnvandClaude Opus 4.8 c08d119381 feat(demo): REAL=1 runs the live attack battery through the production wrapper
Add REAL=1 to the video-steps demo so attack vectors flow through the real
production entry-point instead of calling sub-scripts directly.

- run-all.sh: REAL=1 feeds each H4 vector (A1/A2/A4/A6/A7 + cross-layer step
  1) as the INPUT of an agent step run through casan-harness.sh, so the
  BLOCK/PASS verdict is produced by the wrapper itself (H4-in -> H5 -> H6 ->
  exec -> H4-out) exactly as when the real pipeline meets malicious input.
  After the battery it runs a real pipeline slice (STEP1 okr.srs via
  casan-harness.sh -- node casan-step.mjs) and shows audit.jsonl growing by a
  real record. An inline inventory documents which vectors intentionally keep
  calling a single control directly (artifact-scan, audit tamper/re-forge,
  detectors on synthetic telemetry) and why. Default mode (no REAL) unchanged.
- map-live.sh: show the PIPELINE (STEP1) row only under REAL=1, driven by a
  mode sidecar file written by run-all.sh.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 10:05:06 +09:00
thanhnvandClaude Sonnet 4.6 2f06662f5d scorecard: chấm live 2 mục hardcode; pipeline: fallback real + honest scoring doc
Hướng A — scorecard.sh (video demo):
- h5_1 approval workflow: hardcode 0 → governance-check deploy live (approval_required)
- h6_2 hallucination rate: hardcode 0 → hallucination-scan phân biệt dirty>clean live
- "N/5 mục" chuyển từ text cứng sang đếm động
- H4/H5/H6 → 100/100 (5/5 gate live), Average 57.9 → 90.0

Hướng B — run-casan-pipeline.mjs:
- fallback: stub 'exit 9' → 'cat /nonexistent' (real failure, nhất quán adversarial T3)
- drift: giữ so fallback-output vs golden (clean run=1.0); năng lực phát hiện
  drift thật chứng minh ở adversarial suite
- Full 12-step run verify: H1 CONTEXT_VALID=24, H2 tool-audit records=25 signed,
  H5 audit-chain records=22 signed, H6 provider_telemetry per-step thật, H7 rollback real

phase3-real-run-scoring.md: giải thích vì sao scorecard cũ cho H5=60/H6=80
(hardcode), phân biệt scorecard-90 vs re-score-84 (2 mục đích khác nhau).

Verify: adversarial 44/0, security-gate 11/0/0, pipeline 12 steps OK.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-03 00:18:43 +09:00
thanhnv 928f074b5f feat: add optimize dsoc 2026-07-02 22:17:03 +09:00