diff --git a/docs/compliance/APPI_DATA_PROCESSING.md b/docs/compliance/APPI_DATA_PROCESSING.md new file mode 100644 index 0000000..cbbd628 --- /dev/null +++ b/docs/compliance/APPI_DATA_PROCESSING.md @@ -0,0 +1,73 @@ +# APPI Data Processing and Cross-Border Assessment + +## Status and use + +This is a customer-specific assessment template for CASAN deployments in Japan. +It records facts needed for an APPI review; it does **not** claim that CASAN or +a customer deployment is APPI-compliant. The customer’s privacy/legal owner +must approve the completed version before production processing begins. + +## Processing inventory + +| Data category | Typical source | CASAN purpose | Storage / recipient | Default retention | Deployment decision required | +|---|---|---|---|---|---| +| Source code and diffs | Git repository, AI coding tool | policy/test/security evaluation; Evidence Pack | customer workspace and Evidence Pack store | customer policy | whether any code may leave customer network | +| Prompts and chat content | Control Panel / AI tool | governed response, routing, audit | customer runtime; selected model provider only when configured | customer policy | provider, country/region, model and allowed fields | +| Secrets / credentials | source, logs, environment | detection/blocking only | should be masked; must not be placed in Evidence Pack | not retained intentionally | scanner/exception procedure | +| Developer identifiers | IdP claims, audit record | RBAC, accountability, approval trace | customer identity/audit store | customer policy | legitimate purpose, access roles | +| Telemetry and costs | model/provider and runner | FinOps, reliability, anomaly detection | customer telemetry store / selected provider | customer policy | provider API and export destination | +| Evidence Pack metadata | CASAN gates and manifests | auditability and proof | customer Evidence Pack storage; optional Gitea artifact | customer policy | retention, immutable-storage setting, artifact access | + +## Required deployment register + +For every customer project, complete the following fields and attach it to the +PoC or production change record. + +| Field | Value / approval | +|---|---| +| Customer data controller / privacy contact | | +| CASAN operator and support contact | | +| Processing purpose and affected projects | | +| Personal information expected in source, prompts or logs | | +| Model providers, model IDs, processing country/region | | +| Subprocessors and service locations | | +| Cross-border transfer assessment / required information | | +| Retention, deletion and export schedule | | +| Evidence Pack, backup and artifact storage location | | +| Incident notification contacts and target timing | | +| Approved masking / secret-scanning policy | | +| Approval date, reviewer and next review date | | + +## CASAN control mapping + +- H4 / data-exfil guard scans prompts and artifacts before release. A BLOCK is + evidence of detection, not evidence that no sensitive data was ever sent. +- H5 audit records accountable actions and policy changes. +- H6 records execution/cost telemetry. It must be included in the retention + decision because it can identify a user, project, provider or run. +- Evidence Pack stores summaries and hashes; it still needs a retention, + access-control, backup and deletion decision. +- Cloud-model use is opt-in at deployment time. The customer must document what + fields are transmitted and select an allowed provider/region. + +## Data-subject and operational procedures + +The operator must implement customer-approved procedures for access requests, +correction/deletion/export where applicable, retention expiry, secret leak +investigation, incident triage and vendor/subprocessor changes. A Gitea Actions +artifact is not an immutable long-term retention system by itself. + +## Evidence required before a production claim + +1. Completed register for each tenant/project and model route. +2. Network/data-flow diagram tested against the deployed configuration. +3. Provider and subprocessor review, including cross-border transfer facts. +4. Retention/deletion test for logs, Evidence Packs, backups and CI artifacts. +5. Incident-response tabletop or drill with named contacts. +6. Review by the customer’s Japanese privacy/legal owner. + +## Reference + +Use the authoritative Japanese APPI text and Personal Information Protection +Commission guidance for the final legal assessment. English translations and +this template are working aids only; they are not the controlling legal text. diff --git a/docs/jp-poc/README.md b/docs/jp-poc/README.md index 8570086..da71afb 100644 --- a/docs/jp-poc/README.md +++ b/docs/jp-poc/README.md @@ -14,3 +14,7 @@ 製品名(提案): **CASAN AI-SDLC Governance Platform** (生成AIによるソフトウェア開発を、セキュリティ・品質・コスト・監査証跡の観点から統制するプラットフォーム) + +本番移行時には、顧客ごとの個人情報・越境移転・保持期間を +[`APPI_DATA_PROCESSING.md`](../compliance/APPI_DATA_PROCESSING.md) で記録し、 +法務/プライバシー責任者の承認を得ます。 diff --git a/docs/plans/CASAN_BACKLOG_STATUS.md b/docs/plans/CASAN_BACKLOG_STATUS.md index cca7686..5c1d49e 100644 --- a/docs/plans/CASAN_BACKLOG_STATUS.md +++ b/docs/plans/CASAN_BACKLOG_STATUS.md @@ -66,6 +66,12 @@ | **17 Loop Engineering** | � T1–T6 done+test (offline) | **Agentic Loop Governance** — đủ 5 primitive + orchestrator (97/0 WSL, nối CI). T1 **Governor** (`loop-governor.py`; deny-by-default, no/corrupt policy→strict/HALT, on_exceed halt/escalate) 15/0; T2 **Convergence** (`loop-convergence.py`; repeat/thrash→OSCILLATING, flat→STALLED, fail-closed) 15/0; T3 **Verify Contract** (`loop-gate.py`; H4→DENY, unmet→FAIL, correction bounded→ESCALATE, no self-declared DONE) 20/0; T4 **Trace/Replay** (`loop-trace.py`; append-only hash-linked, edited→BREAK, tampered artifact→replay DRIFT) 16/0; T5 **Meta-loop** (`loop-metaloop.py`; propose≠apply, SoD, loosen>org_ceiling refused, apply qua governed CP store→đổi thật ceiling + rollback) 15/0; T6 **Orchestrator** (`loop-run.sh`; gate→governor→convergence→trace/turn, secure-by-default opt-out, nén giữa vòng) 16/0. State qua `CASAN_LOOP_STATE_ROOT` (repo `.specify/state` sạch). **Còn (infra):** T4 KMS-anchor head (A7 Vault), T6 widget Command Center (17.22, C5), live H3-judge. Chi tiết: `CASAN_PLAN_17_LOOP_ENGINEERING.md`. | | **16 Security audit remediation** | � P0/P1/P2 phần lớn done+test | **Remediation đã thực thi:** 28 SEC suite (151/0 WSL, nối `ci-harness-gate.sh`). Done: SEC-01..10, 12, 13, **14** (model-digest bỏ env-override ở prod/strict), 15, 16..21, **22** (trusted-time JWT `exp` ARCH-06 + tag proposal nguồn-không-tin ARCH-08), **26** (stored/second-order injection scan), 27..30, **23 Phase 1–5 offline** (multi-tenant: tenant-store+guard · per-tenant CP/audit/telemetry · RBAC data-boundary · tenant kill-switch/quota · ký registry · crypt at-rest per-tenant), **24 offline** (image digest-pin + ký workflow), **25 offline** (artifact attestation tested==deployed); **SEC-11 gộp vào SEC-17** (`CASAN_PROFILE=prod` enforce-by-default). **Còn 📋 planned (hạ tầng/process):** SEC-22 ARCH-10 (attestation ngoài) · SEC-23 23.11 (crypt qua Vault Transit) · **SEC-24 còn** (live CVE/OSV + scan image thật — offline image-pin/ký-workflow đã done) · **SEC-25 còn** (signed-commit enrollment + SLSA chain — offline artifact-attestation đã done). Chi tiết: `CASAN_PLAN_16` §0a/§2d. | | **18 Chat Console** | ✅ **MVP-0 + MVP-1 + MVP-2 + MVP-3 + Track M done+test** | **Governed Chat Console** (cắt lát MVP chống lan man). **MVP-0 Ask CASAN read-only DONE**: `prompt-mode-router.py`, `chat-readonly.py`, `chat-session.schema.json`, H4 input/output scan, H5 chat audit hash-chain, H6 token telemetry, answer kèm evidence sources. **MVP-1 Operator DONE**: registered actions through `action-gate`, no free-command, action artifacts with provenance. **MVP-2 Track 4 DONE**: `agent-registry.yaml`, `chat-agent-resolver.py`, `chat:select_agent` RBAC, delegation hold, tool allowlist BLOCK, Control Panel agent picker, CODEGEN draft-only through `artifact-scan` + Plan-17 loop certification. **MVP-2 OPERATOR Track 5/6 DONE**: `chat-turn.py` certifies UNCERTIFIED draft through Plan-17 `loop-run.sh` + trace verify/replay before side-effect release. **Track 8.1/8.2 DONE**: `chat-replay.py` verifies chat chain, evidence artifact hash, and OPERATOR/CODEGEN loop replay; Control Panel `GET /api/v1/chat/replay`. **Track 8.3 DONE**: Command Center `chat_loop` widget reads chat audit/replay evidence, loop ticker, budget gauge, and click-through evidence drawer. **Track 8.4 DONE**: `REQUIRES_APPROVAL` chat turns become pending `chat.escalate` approvals, SoD/reason enforced, strict/fake JWT denied before mutation. **Track 9 DONE**: non-default tenant chat state is partitioned by `tenant-store.sh`, explicit cross-tenant replay paths are denied, encrypted audit snapshots are written via `tenant-crypt.sh`, tenant kill-switch/quota are isolated. Test: chat suites **59/0** (`phase-chat-prompt-router` 9/0, `phase-chat-readonly` 5/0, `phase-chat-session-audit` 3/0, `phase-chat-operator` 8/0, `phase-chat-agent-select` 8/0, `phase-chat-pipeline` 4/0, `phase-chat-stream-hold` 2/0, `phase-chat-replay` 4/0, `phase-chat-approval` 4/0, `phase-chat-codegen` 4/0, `phase-chat-tenant` 8/0), Control Panel **29/0** + build xanh. **Track M (2026-07-09) DONE**: model-optional grounded synthesis — read-only Ask CASAN tổng hợp câu trả lời tự nhiên có citations qua `model-router.sh` khi `CASAN_CHAT_MODEL_MODE=model` (config `model-providers.yaml`), offline-first (mặc định deterministic), fail-safe fallback, cloud→ép preflight PII-guard, model output vẫn qua H4 (secret→DENY), H6 real token/cost. `phase-chat-model-synthesis` **7/0** (chat suites **66/0**), nối `ci-harness-gate.sh`, UI badge model/deterministic. **Uplift items 1–5 (2026-07-09b) DONE**: (1) ANALYSIS mode reasoning/compare; (2) multi-turn memory per-chat/tenant nén Plan-08; (3) streaming draft UNCERTIFIED→final (API `/chat/ask/stream` + UI toggle); (4) CODEGEN full model-router draft (artifact-scan + loop-cert); (5) `chat-cloud-smoke.sh` (SKIP nếu thiếu key). `phase-chat-advanced` **8/0**, chat suites **74/0**. Còn: cloud live-smoke với key thật; token-level SSE (hiện 2-pha). | + +## Production-enterprise preparation (P2) + +| Hạng mục | Trạng thái | Bước tiếp theo | +|---|:--:|---| +| APPI/data-processing documentation | 🟡 template ready | `docs/compliance/APPI_DATA_PROCESSING.md` records the customer/project/model data register, retention, transfer and incident-review evidence. Complete and approve it with the Japanese privacy/legal owner for each production tenant. | --- ## Trần điểm & điều kiện lên "Strong (81+)"