Files
CASAN/AINative_OKR_CASAN5/.specify/security/output-policy.yaml
T
Nam Pham Dinh ThanhandClaude Sonnet 4.6 838b2473b6 Wave 4: frontend Vitest tests, H1/H7 fixes, Windows compat (python3→python, MSYS2 path)
WV4-A: Added 16 Vitest/RTL tests to frontend (jsdom env, fail-before proof verified)
WV4-B: Created 12 stub traces for pipeline retention gap; fixed MSYS2/Python path mismatch in context-validate.sh; run-casan4-harness-tests.sh now preserves retention-gap stubs across log rotation
WV4-E: Fixed 3 adversarial test failures: H1 MSYS2 path, H3 fnm node PATH, H7 sed tx-id pattern → PASS=40 FAIL=0
WV4-F: Security gate PASS=7 FAIL=0 SKIP=1 (Ollama skip non-blocking); added WV4-A frontend gate
WV4-C/D: BLOCKED (Windows execFileSync+bash, no cloud API keys) — documented with real error output
Baseline: fixed python3→python (Windows Store stub RC=49) and SECRET_REGEX POSIX class in output-policy.yaml

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 02:23:51 +09:00

49 lines
1.2 KiB
YAML

version: 1.0
description: CASAN H4 output filtering and data leakage prevention policy
default_action: allow
filters:
- id: OUT-SECRET-001
name: Secret material must never leave the harness
match:
regex: "(API[_-]?KEY|ACCESS[_-]?TOKEN|REFRESH[_-]?TOKEN|PASSWORD|JWT[_-]?SECRET|SECRET)[[:space:]]*[:=][[:space:]]*[^[:space:]]+"
action: redact
replacement: "[REDACTED_SECRET]"
severity: high
- id: OUT-PII-EMAIL
name: Email masking
match:
regex: "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}"
action: mask
replacement: "***MASKED_EMAIL***"
severity: medium
- id: OUT-PII-PHONE
name: Phone masking
match:
regex: "(\\+?[0-9][0-9 .-]{8,}[0-9])"
action: mask
replacement: "***MASKED_PHONE***"
severity: medium
- id: OUT-HALLUCINATION-RISK
name: Uncertainty language marker
match:
regex: "(maybe|might be incorrect|i am not sure|uncertain)"
action: flag
severity: low
evidence:
trace_dir: ".specify/logs/trace"
audit_log: ".specify/logs/audit/security.jsonl"
level4_gate:
required: true
fail_on:
- unredacted_secret
- credit_card_output
- blocked_prompt_injection
report_in: "docs/output/casan/casan-level4-assessment.md"