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>
This commit is contained in:
thanhnv
2026-07-03 22:03:44 +09:00
co-authored by Claude Opus 4.8
parent fabd5f8783
commit fbcef967e5
182 changed files with 3865 additions and 341 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
## One-Line Positioning
We upgraded the SDD Speckit OKR pipeline from CASAN Level 3/4 transition to **CASAN Level 4 achieved** and **Level 5 demonstrated locally with verifiable controls**.
We upgraded the SDD Speckit OKR pipeline from the CASAN Level 3→4 transition to **CASAN Level 4 — proven by attack**: H4/H5/H6 (former GAPs 20/25/30) now defeat ~23 live adversarial vectors with on-screen exit codes. Level 5 is stated as **roadmap** (IdP, WORM log storage, provider-telemetry API, hosted dashboard) — not claimed as achieved.
## Open These First
@@ -1,86 +1,106 @@
# Video Recording Guide
# Video Recording Guide — CASAN H4·H5·H6 Attack Battery
## Recommended Length
> **Một kịch bản THỐNG NHẤT.** Bản này thay thế mọi hướng dẫn quay cũ (bản 5–7 phút "Level 5 demonstrated" đã bị rút gọn/mâu thuẫn). Claim chính đã chốt: **CASAN Level 4 — chứng minh được bằng tấn công**; Level 5 chỉ nêu như *ranh giới/roadmap*, không phải tuyên bố đã đạt.
>
> Kịch bản chi tiết từng vector + lời thoại: `optimize-docs/CASAN_EVIDENCE_VIDEO_SCRIPT_15MIN.md`. Bộ dựng tách cảnh: `optimize-docs/video-steps/`.
5-7 minutes for submission video. Keep it focused on evidence.
---
## Recording Setup
## 0. Claim & nguyên tắc (đọc kỹ trước khi quay)
Use Zoom, Microsoft Teams, OBS, or QuickTime screen recording.
- **Claim chính (an toàn, phòng thủ được):** *"Ba harness từng là GAP — H4=20, H5=25, H6=30 — nay mỗi cái chống lại một loạt tấn công THẬT, có exit code trên màn hình. Harness thấp nhất đã vượt ngưỡng → pipeline đạt **Level 4 chứng minh được**."*
- **KHÔNG tuyên bố "Level 5 đã đạt".** Nếu nhắc Level 5: *"Level 5 là roadmap — cần IdP, WORM log, telemetry provider API, dashboard hosted cho production thật."* Tuyên bố khiêm tốn-mà-vững thắng tuyên bố to-mà-lỏng.
- **Con số đáng tin = SỐ TEST ĐỐI KHÁNG PASS, không phải điểm 0–100.** Khi hiện scorecard, nói: *"mỗi ✓ là một tấn công thật bị chặn/phát hiện, và mỗi gate đều fail-able — control hỏng thì ✗."* Điểm `(✓/5)×100` chỉ là quy đổi.
- **Nguyên tắc nội dung (đọc trên camera đầu video):** *"Mọi con số là kết quả chạy thật, có exit code on-screen; con số nào chưa tự đo tôi nói rõ nguồn — không suy diễn."*
- Chuẩn tham chiếu (hiện lên slide): OWASP LLM Top 10 · OWASP Agentic Top 10 · CSA MAESTRO 7 lớp · MITRE ATLAS · NIST AI RMF · ISO 42001.
Recommended screen layout:
---
- Left: terminal
- Right: VS Code/Finder/browser with evidence files
- Optional: open PPT in presenter mode before recording intro
## Video Structure
### 0:00-0:30 - Opening
Say:
> This submission upgrades the SDD Speckit OKR pipeline from CASAN Level 3/4 transition to Level 4 achieved and Level 5 demonstrated locally.
Show:
- `00_SUBMISSION_PACKAGE/README.md`
- final zip
### 0:30-1:30 - Baseline and Architecture
Show:
- `before-after-scorecard.md`
- `casan-level4-assessment.md`
Explain the original gaps: H4 Security, H5 Governance, H6 AgentOps.
### 1:30-3:30 - Live Verification
Run:
## 1. Pre-flight (ngoài video)
```bash
# (khuyến nghị) Ollama live để A3 semantic, A8 recall, D4 telemetry ra SỐ THẬT
ssh -N -L 11434:127.0.0.1:11434 <user>@<home-linux-server>
curl -s 127.0.0.1:11434/api/tags | jq '.models[].name' # thấy ornith:9b
# Môi trường sạch (chống nghi 'dàn dựng') — có sẵn CA certs cho phần cloud (Path C)
docker run --rm -it --network host -v "$PWD":/work -w /work node:24-slim bash
apt-get update -qq && apt-get install -y -qq python3 openssl git curl jq >/dev/null
ln -sf "$(command -v python3)" /usr/local/bin/python
export CASAN_MODEL_PRIMARY="ollama:ornith:9b"
cd Output_CASAN5_REFINED/AINative_OKR_CASAN5
bash .specify/tests/run-casan4-harness-tests.sh
```
Pause on PASS lines:
- Font terminal ≥ 16pt. Tắt thông báo desktop. Sạch history.
- Quay kèm `asciinema rec` để giám khảo replay terminal thật.
- Một lần dry-run trước khi quay.
- H4 injection block
- H5 audit-chain valid
- Level 5 drift/fallback/tool registry/rollback/KPI/policy/provider telemetry/reuse/dashboard
---
### 3:30-4:30 - Evidence Files
## 2. Cách quay — MỘT LỆNH chạy trọn battery
Open:
`run-all.sh` tự in title card + mô tả + lệnh + **exit code** cho từng vector.
- `docs/output/casan/evidence/harness-test-report.md`
- `docs/output/output_logs/casan-demo/pipeline-context.yaml`
- `docs/output/casan/central-agentops-dashboard.html`
```bash
# Bản đầy đủ (khuyến nghị — video tua được nên dài không sao):
REAL=1 AUTO=1 STEP_DELAY=6 bash ../../optimize-docs/video-steps/run-all.sh
# REAL=1 → vector H4 nạp qua casan-harness.sh (đường sản xuất) + lát cắt pipeline thật + money-shot H6
# AUTO=1 → tự chạy, nghỉ 6s/bước (đặt AUTO=0 để bấm Enter thủ công khi cần dừng lâu)
### 4:30-5:30 - Level 5 Boundary
# 2 pane (bản đồ sống bên trái + battery bên phải):
bash ../../optimize-docs/video-steps/start-tmux.sh # xem LAYOUT.md
```
Say:
Nếu Ollama tắt: A3/A8/D4 tự in "SKIP" có ghi chú (không crash). Mọi vector còn lại vẫn xanh offline.
> Level 4 is achieved. Level 5 is demonstrated locally with verifiable controls. For enterprise production, these contracts should be connected to IdP, WORM log storage, live provider telemetry API, and hosted dashboard.
---
### 5:30-6:30 - Closing
## 3. Nội dung battery (bám mục tiêu tối ưu H4·H5·H6)
Show:
| Cụm | Vector | Ý chính |
|---|---|---|
| ⭐ **H4 Security (9)** | A1 direct · A2 paraphrase(lọt) · A3 semantic · A4 obfuscation · A5 indirect artifact 🔥 · A6 secret-vào · A7 PII · A8 recall định lượng · **A9 secret ở ĐẦU RA** | injection mọi biến thể + rò rỉ 2 chiều + số recall |
| ⭐ **H5 Governance (8)** | B1 tamper 🔥 · B2 re-forge(RSA) · B3 secret commit · B4 no-bypass · B5 tool-audit · **B6 tự-duyệt bị chặn 🔥** · **B7 least-privilege** · **B8 rate-limit** | audit bất biến + tách khoá + phân quyền + chống lạm dụng |
| ⭐ **H6 AgentOps (6)** | D1 cost-spike 3× 🔥 · D2 negative · D3 drift · D4 telemetry token thật · D5 scanner · **D6 hallucination rate** | đo cost thật + phát hiện spike/drift + định lượng hallucination |
| 🔥 **Cross-layer chain** | injection→tool→credential→action, chặn ở 4 lớp | defense-in-depth MAESTRO (showpiece) |
| 🏭 **Pipeline slice (REAL=1)** | STEP1 qua wrapper thật → audit.jsonl +1 | control nằm trên đường sản xuất, không đứng bên lề |
| 💰 **Money-shot H6 (REAL=1)** | cost-spike trên **token đo THẬT** từ 4 step (không seed) | trả lời "step tốn 3× có ai biết" trên dữ liệu THẬT |
- `presentation/HarnessAthon_CASAN_Level5_Demo.pptx`
- `docs/03_judge_qna.md`
**4 cảnh KHÔNG được cắt (highlight):** A5 (indirect), B1 (tamper 1 ký tự), D1 + money-shot (cost-spike), CHAIN.
Thêm 3 cảnh mạnh mới: **B6 tự-duyệt bị chặn**, **A9 secret đầu ra**, **money-shot cost-spike token thật**.
End with:
---
> The key difference is that the harness is no longer a document. It is executable, auditable, measurable, and testable.
## 4. Chốt + scorecard (cuối video)
## Recording Tips
```bash
bash .specify/scripts/bash/security-gate.sh | tail -6 # PASS=11 FAIL=0 SKIP=0
# scorecard chạy live cuối run-all.sh (hoặc chạy tay):
CASAN_ROOT="$PWD" bash ../../optimize-docs/video-steps/scorecard.sh
```
- Do one dry run before recording.
- Zoom terminal font to at least 16pt.
- Keep the terminal command history clean.
- Do not show secrets or personal desktop notifications.
- Keep the final video file name simple: `HarnessAthon_CASAN_Level5_Demo.mp4`.
**Lời thoại kết:**
> "H4/H5/H6 từ GAP (20/25/30) nay chặn/phát hiện ~23 vector tấn công đa dạng theo OWASP Agentic Top 10 và MAESTRO, gồm cross-layer chain, cost-spike 3× trên token đo thật, tách khoá và phân quyền. Mỗi ✓ là một tấn công thật, mỗi gate fail-able. Harness thấp nhất đã vượt ngưỡng → **Level 4 chứng minh được**. casan-old thắng một buổi demo; casan5 sống sót trong production."
**Khi hiện scorecard, nói rõ:** *"Đây là điểm phủ-control-chứng-minh-bằng-tấn-công, không phải điểm trưởng thành chủ quan. Con số thật là số test pass."* (scorecard in `Average` + `CASAN Level` từ công thức `casan_harness_assessment.md`; H1/H2/H3/H7 giữ baseline assessment, chỉ H4/H5/H6 đo mới.)
---
## 5. Q&A giám khảo (chuẩn bị trước)
| Giám khảo hỏi | Trả lời |
|---|---|
| "H4/H5/H6 = 100 có thổi phồng không?" | "Điểm là (5/5 control × 20). Mỗi control chống một tấn công THẬT và **fail-able** — nếu tôi gỡ control, gate thành ✗. Con số đáng tin là số test đối kháng pass, không phải 100." |
| "cost-spike D1 dùng số gõ tay?" | "D1 là seed để minh hoạ logic. Money-shot (REAL=1) chạy 4 step thật, token do agent-metrics ĐO từ artifact — spike đến từ dữ liệu thật." |
| "Recall 0.85 của 9B ở đâu ra?" | "Chạy `phase3-redteam-metrics.sh` LIVE trên camera → số thật của 9B. 0.85 là số dự án tự báo; regex = 0.00 trên paraphrase mới (tự chạy)." |
| "Đây có phải Level 5?" | "Không — tôi tuyên bố Level 4 chứng minh được. Level 5 cần IdP/WORM/telemetry API/dashboard hosted — đó là roadmap." |
| "Chạy được không cần Ollama?" | "Có — hầu hết vector offline. Model chỉ chạm H4 recall + H6 nguồn telemetry. H5 hoàn toàn không cần model. Cloud (OpenAI/Anthropic) đã hiện thực, chỉ cần key (chưa test key thật)." |
---
## 6. Lưu ý kỹ thuật khi quay
- Giữ **exit code on-screen** mọi lệnh (`run-all.sh` đã in sẵn `●━━▶ exit=N`).
- `run-casan4-harness-tests.sh` tự `rm -rf .specify/logs` — **đừng** chạy nó xen giữa cụm H5 (mất audit). Battery này đã tự sinh audit riêng nên an toàn.
- Tên file xuất: `HarnessAthon_CASAN_H456_AttackBattery.mp4`.
- Nếu buộc phải ngắn (5–7 phút): quay OLD-vs-NEW (0:30) → 4 highlight (A5, B1, money-shot, CHAIN) → scorecard (1:00). Giữ bản đầy đủ làm phụ lục cho giám khảo muốn xem sâu.