Check Financial Services Security Decisions in Code AI Agents Write
Banks, insurers and payments teams already make security architecture decisions about their code. Three shipped Mneme rule kinds can check some of those decisions when a coding agent writes the change. Each has limits, listed below.
An agent writes the line the security architecture forbids.
Security architects in financial services make decisions about how code handles data. Card numbers never reach a log line, and payment code calls the processor through one approved client library. Session tokens expire within an hour. Some of these decisions answer to frameworks such as the Payment Card Industry Data Security Standard (PCI DSS) or the EU Digital Operational Resilience Act (DORA). Mneme does not satisfy those frameworks.
A coding agent asked to fix a failing payment test works from the code and the prompt in front of it. It does not read the security architecture record. If it adds a debug line that logs the card number, only a reviewer who spots that line in the diff stops it.
Three rule kinds apply, each with limits.
A security architect writes the decision as an Architecture Decision Record (ADR): a Markdown file with a Constraints section. mneme adr import compiles the constraints into rules stored in a memory file, .mneme/project_memory.json. mneme check then evaluates code changes against those rules in two places: the Claude Code hook, which runs before Claude Code’s Edit, Write and MultiEdit tools change a file, and CI. Each check returns PASS, WARN or FAIL. Strict mode exits non-zero on WARN or FAIL. Warn mode exits 0 on all three, and exits 2 only on an error or when a rule could not be evaluated (INCOMPLETE).
The examples below are illustrative. Tested runs with real output are on the Architectural Security Governance use case, with the full table of what Mneme checks and does not check. To try it yourself, start with the quickstart.
| Rule kind (mneme-hq 0.11.0) | Example decision | Verdict and limits |
|---|---|---|
FORBID_LITERAL with include_paths |
Forbid logger.info(card_number) in src/payments/**. |
FAIL, in the Claude Code hook and in CI. Exact, case-sensitive text, so a renamed variable or extra spaces pass. The rule skips files outside the listed paths. |
| FORBID_NUMERIC_ABOVE | TOKEN_TTL_SECONDS must not exceed 3600 in Python files under src/**. |
FAIL, in CI only, on Python files checked with --source-file. The Claude Code hook does not evaluate it. In 0.11.0, once a numeric rule is in the memory file, every check that uses --input returns INCOMPLETE (exit 2), even in warn mode and for Python files. |
| FORBID_DEPENDENCY | Flag requests where the team mandates an internal HTTP client for calls to the payment processor. |
WARN only, never FAIL, and no path scope. It matches any single word of the name anywhere in the file, so a comment that mentions requests also warns. A one-word name like this one is checked on every file. |
No case study yet.
There is no case study for financial services yet. This page describes what the shipped rule kinds can express. It does not report results from any bank, insurer or payments team. We will add one when a team agrees to publish theirs.
What Mneme does not do here.
- It does not certify compliance. Mneme does not make a codebase or a team compliant with PCI DSS, the Sarbanes-Oxley Act (SOX), DORA or any other framework, and a passing
mneme checkis not evidence of compliance. - It does not detect card numbers or other personal data by meaning. A FORBID_LITERAL rule matches the exact text you name, so the same value logged through a renamed variable passes.
- It does not find vulnerabilities or check dependencies against known-vulnerability (CVE) or licence data. Keep static application security testing (SAST), software composition analysis (SCA) and code review.
- It does not enforce infrastructure, network or cloud policy, and it does not govern what an agent does at runtime. It checks code changes.
- It keeps no audit log.
mneme checkprints a verdict and exits with a code. Keep its--jsonoutput from CI if you need a record.