qonto-assistant/tests
tegwick 3faf1fed71 Add SecurityPractice.md, Security Genome record, and deny-escalation lockout
Design doc for hardening qonto-assistant before deployment to
railiance01: this is the first fleet service that must be
internet-reachable (external harness clients, not just in-cluster
jobs) while holding a real bank credential. Covers identity (key-cape
in place of the interim bearer token), authorization (finance.qonto.read
in flex-auth + tenant-engine capability roles instead of the
hardcoded default_tenant_id), network exposure (facade-only internet
address), isolation profile, and a Kings Guard mapping (the existing
audit stream is already Immune-Observation-shaped; nothing to rebuild
later).

Ships one concrete, dependency-free piece of that design now:
DenyEscalationTracker locks out an actor who repeatedly triggers
arg_constraint/credential_exfil denies within a short window, closing
the gap where a probing client could retry indefinitely at whatever
rate the existing rate limiter otherwise allows. Wired through
CapabilityService, on by default, configurable via
QONTO_DENY_ESCALATION_* env vars. Ordinary denies (authz_denied,
tenant_scope) never count toward it.

Also adds specs/security-genome.yaml (kings-guard's genome-record
shape, populated now so no rework is needed once a consumer exists).

Verified: pytest -> 39 passed (8 new); REST and MCP smoke scripts both
pass against fixtures; compileall clean.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 22:59:06 +02:00
..
fixtures/qonto Complete Phase 1: policy kernel, REST service, and local smoke tooling 2026-07-22 21:21:05 +02:00
test_api.py Add SecurityPractice.md, Security Genome record, and deny-escalation lockout 2026-07-23 22:59:06 +02:00
test_audit.py Complete Phase 1: policy kernel, REST service, and local smoke tooling 2026-07-22 21:21:05 +02:00
test_audit_parity.py QONTO-WP-0003-T05: pin REST/MCP audit-schema parity with a test 2026-07-23 11:01:16 +02:00
test_deny_escalation.py Add SecurityPractice.md, Security Genome record, and deny-escalation lockout 2026-07-23 22:59:06 +02:00
test_fixture_client.py Complete Phase 1: policy kernel, REST service, and local smoke tooling 2026-07-22 21:21:05 +02:00
test_mcp_auth.py QONTO-WP-0003-T03: MCP client auth + shared multi-harness config snippet 2026-07-23 09:41:25 +02:00
test_mcp_server.py QONTO-WP-0003-T02: MCP tool catalog on the shared capability core 2026-07-22 21:48:09 +02:00
test_policy.py QONTO-WP-0003-T01: MCP adapter skeleton on shared capability core 2026-07-22 21:41:24 +02:00
test_qonto_client.py Complete Phase 1: policy kernel, REST service, and local smoke tooling 2026-07-22 21:21:05 +02:00
test_snapshot_semantics.py Complete Phase 1: policy kernel, REST service, and local smoke tooling 2026-07-22 21:21:05 +02:00