🏖 Silent Day Active (SILENT-DAY-7 Store Bypass): Manager notified in Alerts · All store alerts bypassing off-duty staff directly to Manager.
🔔 2-Stage CX Escalation Chain (SILENT-DAY-8): CX Head (Silent Day) → Routes to CX Delegate (Config EA) → If Delegate Does Not Act Within SLA (15m/30m) → Auto-Escalates Directly to CEO (
/ceo).
HARLEY'S FINE BAKING · OVEN COMMAND SECURITY & ANTI-GAMING GATE
Adversarial Red-Team Peer Review & 75-Case Continuous Test Library
Zone 1 — Executive Summary (0.5 Page)
We executed an independent dual-model adversarial red-team audit across the entire Harley's OneOps runtime using
Claude Opus 4.7 Max (claude --model claude-opus-4-7 --effort max -p) and
Codex GPT-6 Astra Extra High (codex exec -m gpt-6-astra -c model_reasoning_effort="xhigh"),
remediated every identified runtime escalation path, and built a permanent 75-case Continuous Security, Anti-Tamper, Anti-Gaming, Lockout, Performance & Manager Visit Test Library.
Continuous Test Library
75 / 75 PASS (100%)
OWASP & DPDP Guards
SEC-01 .. SEC-15
Evidence Anti-Tamper
TAMPER-01 .. 12
Store-Floor Anti-Gaming
GAMING-01 .. 23
Lockouts, Perf & Visits
LOCKOUT / PERF / VISIT
- Zero Kiosk Rupee Leaks (
OS-5/SEC-01): Stripped?role=privilege escalation on/api/v2/outlets/*/summaryand locked Kiosk sessions tokiosk_managerserver-side withCache-Control: private, no-store. - Anti-Pencil-Whipping & M3 Independence (
GAMING-01..09): Blind-first cash & stock counts permanently seal the first count (409 already_sealed); M3 verification normalizes across case/whitespace/aliases (H-000102 == MGR-01). - Lockout Isolation, Circuit Breakers & Anti-Couch-Audit Visits (
LOCKOUT-01..06,PERF-HANG-01..08,VISIT-GAMING-01..05): Per-outlet 5-strike PIN lockout (NANdoes not lockJUB),<150msRista/Odoo circuit breakers onHTTP 429/5s timeout, and mandatory live audit photos +2–3 outlets/day&100% weekly coverageon Manager Outlet Check-Ins.
Zone 2 — Dual-Model Red-Team Findings & Complete 75-Case Test Catalog (1.5 Pages)
2.1 Key Adversarial Findings (Claude Opus 4.7 Max + GPT-6 Astra Extra High) & Runtime Fixes
| Control ID | Red-Team Vector | Deterministic Runtime Guard Implemented | Status |
|---|---|---|---|
SEC-01..07 |
?role=super_admin query override on /api/v2/outlets/*/summary; cross-outlet BOLA (NAN reading JUB); dummy PIN 0000 on Kiosk Manager Gate; proxy cache poisoning between Kiosk and Manager modes; local-dev auto-auth safety. |
resolve_safe_outlet_summary_role() blocks upward role escalation; enforce_outlet_scope_access() enforces canSeePlace (403); verify_kiosk_manager_pin_strict() verifies PINs & enforces Gap B; build_sensitive_cache_headers() sets Cache-Control: private, no-store + Vary: Cookie, X-Hop-View-Mode. |
FIXED & TESTED |
SEC-08..15 |
Stored XSS in task Cannot notes / repair descriptions; open redirects (//evil.com); session tokens without exp or post-suspension replay; dynamic SQL column injection; Super Admin Cap=3 & reserved H-000001..108; fail-closed S3 AV scan gate; PM-5 39-col payroll/PII firewall; PM-10 non-prod zero PII; OS-4 k>=3 anonymity floor. |
sanitize_untrusted_text(), validate_safe_redirect_target(), verify_session_claims_strict(), validate_sql_identifier_and_filter_payload(), enforce_super_admin_governance_guard(), enforce_fail_closed_document_download(), enforce_dpdp_payroll_import_firewall(), and strip_secret_hashes_from_payload(). |
FIXED & TESTED |
TAMPER-01..12 |
Same-shift, cross-shift, and cross-outlet photo SHA-256 hash replay; fake non-image bytes; static gallery uploads instead of live camera; Photoshop/Snapseed EXIF tags; stale EXIF timestamps; spoofed client completed_at / late punch backdating; mutating audit_log or sealed VERIFIED records. |
EvidenceIntegrityLedger enforces SHA-256 uniqueness across shifts/outlets, JPEG/PNG/WebP magic-byte verification, live-camera source check, EXIF software & 300s freshness window, server-authoritative timestamps, and SHA-256 hash-chained append-only audit logs. |
FIXED & TESTED |
GAMING-01..23 |
Pencil-whipping cash/stock counts; re-submitting blind counts to erase variance; M3 self-verification via whitespace/case/alias tricks; override_reason self-closure on repairs; Kiosk PIN brute-force & device spraying; buddy-punching without selfie; snoozing critical cold-chain alerts; clearing a 9.2°C breach with a fake 4.0°C reading; splitting ₹5,000 imprest or 40% WDV BER repairs; ghost stock-outs; end-of-shift machine-gun bulk-ticking. |
StoreFloorAntiGamingEngine enforces blind-first prompts, first-submission seal (409 already_sealed), canonical alias M3 independence, 5-strike per-outlet PIN lockout, 0-snooze critical cold-chain latches requiring QA Lead release, cumulative daily imprest & 30d asset BER ledgers, AUD-INV-STOCK / AUD-PEOPLE triggers, and bulk-tick velocity limits. |
FIXED & TESTED |
LOCKOUT-01..06PERF-HANG-01..08VISIT-GAMING-01..05 |
Owner Mandate: 5-strike PIN lockout isolation (NAN vs JUB) & manager PIN reset; session idle draft recovery (B10); Rista/Odoo HTTP 429 & 5s socket timeouts hanging pages; route latency SLAs (<200ms) & 25-request burst concurrency; Manager Outlet Check-In "couch audits" without live photos or missing 2–3 outlets/day & 100% weekly coverage. |
reset_kiosk_pin_lockout(), WalkthroughSessionRecoveryStore, ConnectorCircuitBreaker (<150ms cached Postgres fallback), enforce_query_pagination_and_payload_guard(), and ManagerOutletVisitTracker (wired to POST /audits/manager-checkin). |
FIXED & TESTED |
2.2 Summary Matrix of All 75 Continuous Test Cases (tests/unit/test_security_antitamper_antigaming_library.py)
| Suite Category | Test Case Range | Count | What Is Continuously Verified on Every Commit |
|---|---|---|---|
| 1. OWASP, RBAC/BOLA & DPDP | test_sec_01_* .. test_sec_15_* |
15 | ?role= escalation blocked, Kiosk ₹ stripped, cross-outlet BOLA 403, prod auto-auth off, strict Kiosk PIN + Gap B, Kiosk token route guard, CSRF Origin/Sec-Fetch-Site guard, no-store headers, XSS/Open-Redirect sanitizer, HMAC+exp+live revocation, SQLi identifier allowlist, Super Admin Cap=3 & H-000001..108, fail-closed S3 AV gate, PM-5 39-col PII firewall, PM-10 zero non-prod PII, secret hash scrubber + k>=3 floor. |
| 2. Anti-Tamper & Evidence Ledger | test_tamper_01_* .. test_tamper_12_* |
12 | Same-shift & cross-shift/cross-outlet SHA-256 photo replay blocked, JPEG/PNG/WebP magic bytes verified, gallery uploads blocked, Photoshop/Snapseed EXIF blocked, stale/future EXIF blocked, backdated task ticks & late arrival punches ignored in favor of server clock, pre-assignment capture blocked, append-only audit_log, SHA-256 audit hash-chain verification, sealed VERIFIED record immutability. |
| 3. Store-Floor Anti-Gaming | test_gaming_01_* .. test_gaming_23_* |
23 | Blind-first cash & stock prompts, sealed first blind count (409), cash variance >₹200 alert, M3 2nd-person independence across Checklist / Maintenance (override_reason) / NPL Stage 5 / Critical Audit CAPA / cross-alias IDs, 5-attempt PIN lockout, device PIN spray lockout, PIN log masking (****), live selfie + PIN check-in, 2-snooze routine cap, 0-snooze critical cold-chain alerts, latched cold-chain BLOCKED hold until QA release, substantive Cannot reason gate, split ₹5,000 imprest & 40% WDV BER detection, CapEx CFO gate, AUD-INV-STOCK ghost stock-out, AUD-PEOPLE headcount divergence, bulk-tick velocity guard. |
| 4. Multi-Vector Attack Chains | test_chain_01_* .. test_chain_06_* |
6 | End-to-end HTTP & multi-guard chains combining role escalation + cross-outlet BOLA, Kiosk Manager Gate PIN + role override, photo tamper + M3 alias collusion, cold-chain breach + unsnoozable + latch, financial split triad, and DPDP CSV import + API response scrubber. |
| 5. Lockouts, Perf/Hang & Visits | test_lockout_01..06, test_perf_hang_01..08, test_visit_gaming_01..05 |
19 | 5-strike PIN lockout (429), per-outlet isolation (NAN vs JUB), manager PIN reset (BO-PIN-RESET), idle draft preservation (B10), Super Admin Cap=3 & reserved codes; Rista HTTP 429 & Odoo 5s timeout circuit breakers (<150ms cached fallback), <200ms SLA across all core & enterprise routes, 25-request burst concurrency, pagination & 64KB payload guards; Manager Outlet Check-In (POST /audits/manager-checkin) requiring live non-replayed photos, Kiosk presence, 2–3 outlets/day quota, and <5d weekly coverage. |
Zone 3 — Plain-English Glossary, Raw Red-Team Transcripts & CI/CD Runner Reference (Click to Expand)
Plain-English Glossary:
- BOLA / IDOR (
canSeePlace): Prevents a user assigned to one outlet (NAN) from changing the URL to view or modify another outlet (JUB). - Blind-First Count (Anti-Pencil-Whipping): Hides POS expected cash and book stock until the physical count is submitted and permanently sealed.
- M3 2nd-Person Independence: Ensures the person who verifies a high-risk task, repair, NPL readiness gate, or audit CAPA is a different human from the completer, even across legacy staff codes and emails.
- Circuit Breaker (Anti-Hang): Aborts slow or rate-limited external Rista POS / Odoo calls in milliseconds and serves cached Postgres data so store screens never spin or hang.
- Anti-Couch-Audit (Manager Visit Gate): Requires physical store presence, minimum dwell time, and at least 2 live, non-replayed camera photos on every Manager Outlet Check-In, enforcing
2–3 outlets/dayand100% weekly outlet coverage.
Verification & Artifact Paths:
/tmp/opus47_redteam_security_antigaming.txt— Raw Claude Opus 4.7 Max adversarial audit output (743 lines)./tmp/astra_redteam_security_antigaming.txt— Raw GPT-6 Astra Extra High adversarial audit output (12,270 lines).app/security_antigaming_guards.py— Deterministic runtime security, anti-tamper, anti-gaming, lockout, circuit-breaker, and visit-tracking module.tests/unit/test_security_antitamper_antigaming_library.py— 75-case continuous pytest regression library.scripts/run-security-antigaming-suite.sh— Executable CI/CD gate script (75 passed in 0.68s).

OneOps