Verdict

Mneme sits beside SAST and SCA. It replaces neither. SAST analyses source code for security flaws. SCA checks the packages you depend on for known vulnerabilities and licences. Mneme, an open-source tool, compiles rules from your architecture decision records (ADRs) and enforces them on code changes: in agent hooks, such as the one for Claude Code, before a write, and in continuous integration (CI). It matches exact text and named values in code changes, and it has no vulnerability rules. Keep your scanners, and add Mneme for the decisions your team wrote down.

Two different questions

The Open Worldwide Application Security Project (OWASP) describes source code analysis tools, which it says are also known as SAST tools, as tools that analyse source code or compiled code to help find security flaws. Its page on component analysis, whose software-only subset is commonly called SCA, says it will commonly identify known vulnerabilities in components and can identify each component’s licence.

Both work from shared knowledge of what is unsafe: vulnerability classes such as injection, and advisories against published packages. A scanner finding says the code or package matches a published risk.

Mneme works from your team’s own decisions. Say an ADR states that frontend code must not log user email addresses. That decision is local to your system, and no advisory database records it. mneme adr import compiles the ADR’s Constraints section into a rule, and mneme check returns PASS, WARN or FAIL against it. A Mneme finding says the change breaks a rule compiled from a decision your team approved.

Where each layer draws the boundary

Dimension SAST and SCA Mneme HQ
Question Is this code or package known to be unsafe? Does this change break a rule compiled from the decisions we approved?
Input SAST: source code, often analysed for data flow. SCA: dependency manifests, against vulnerability and licence data The code change, plus rules compiled from ADR files in the repository
Where a rule comes from The tool’s rule sets and advisory data, plus custom rules in the tool’s own configuration The ## Constraints section of an ADR, compiled with mneme adr import
Match Vulnerability patterns, data flow, known advisories, licence identifiers Exact, case-sensitive text in named paths; words of a package name; numeric limits in Python
A finding names The weakness, advisory or rule the tool matched The ADR ID and its title

What Mneme enforces, and what it does not

This is the scope of mneme-hq 0.11.0, the current release. The same table, with the runs behind it, is on the Architectural Security Governance use case.

One detail decides which rules run. mneme adr import writes the compiled rules to a memory file, .mneme/project_memory.json. Each mneme check takes a --query that describes the change, and Mneme retrieves the decisions whose words match it. Path-scoped literal and numeric rules run whatever the query says. A dependency rule for a package name of several words runs only when retrieval selects its decision.

Concernmneme-hq 0.11.0Detail
Exact text, optionally limited to paths Enforced: FAIL FORBID_LITERAL: a case-sensitive match on a code change, limited to the paths the rule lists with include_paths, or applied to every path when it lists none. It runs whatever --query says.
Numeric upper bound in Python Enforced: FAIL FORBID_NUMERIC_ABOVE: a module-level value or direct call argument in a .py file, read with --source-file. It runs in mneme check and CI. On an ordinary edit the Claude Code hook reports it unevaluated, so enforce it in CI.
Package name Flagged: WARN FORBID_DEPENDENCY: returns WARN, never FAIL. Strict mode still exits 1 on WARN, and the strict Claude Code hook refuses the write. No path scope, and it matches any single word of the name. A name of several words runs only when the query retrieves its decision.
Where it runs mneme check, agent hooks, CI Hooks check native writes before they land: Claude Code’s Edit, Write and MultiEdit, Codex CLI’s apply_patch, and Kiro CLI 3.0’s write and append tools. The runs on this page use mneme check; the Claude Code hook is the one the security use case documents.
Vulnerabilities, taint and data flow Not checked No data-flow, call-graph or middleware analysis. Use SAST and code review.
Dependency CVEs (Common Vulnerabilities and Exposures) and licences Not checked No advisory or licence data. Use SCA.
Secrets by pattern Not checked A literal rule matches only the exact text you write into it.
Personal data or auth flow by meaning Not checked A renamed variable passes a literal rule, as the run below shows.
Infrastructure and network policy Not checked Mneme enforces rules on code changes only.
Runtime behaviour Not checked Nothing in Mneme watches running code or limits which tools an agent calls. Runtime governance is a research area.

One decision, run on mneme-hq 0.11.0

The runs below come from mneme-hq 0.11.0 in a clean virtual environment on 30 November 2026. We dropped the cd into the fixture repository, shortened the path to the mneme executable, quoted the --query value, and dropped output separators. ADR-102 forbids one exact line, and only under src/frontend/:

docs/adr/ADR-102-no-user-email-logging-in-frontend.md (Constraints section)
## Constraints
- FORBID_LITERAL:
    value: console.log(user.email)
    include_paths:
      - "src/frontend/**"
Terminal: the line inside src/frontend/ (strict mode, exit code 2)
$ mneme check --memory .mneme/project_memory.json --input src/frontend/login_bad.ts --query "frontend dashboard security data access" --mode strict
FAIL  [ADR-102] FORBID_LITERAL "console.log(user.email)" -- trigger: console.log(user.email)
      Frontend must not log user email addresses
      path: src/frontend/login_bad.ts via src/frontend/**

PATH  APPLIED  [ADR-102] src/frontend/login_bad.ts via src/frontend/** -- an include selector matched

Result: FAIL
Terminal: the same line under src/backend/ (exit code 0)
$ mneme check --memory .mneme/project_memory.json --input src/backend/login_same_pattern.ts --query "frontend dashboard security data access" --mode strict
PATH  EXCLUDED [ADR-102] src/backend/login_same_pattern.ts -- no include selector matched

Result: PASS
Terminal: src/frontend/login_nearmiss.ts holds const addr = user.email; console.log(addr); (exit code 0)
$ mneme check --memory .mneme/project_memory.json --input src/frontend/login_nearmiss.ts --query "frontend dashboard security data access" --mode strict
PATH  APPLIED  [ADR-102] src/frontend/login_nearmiss.ts via src/frontend/** -- an include selector matched

Result: PASS

The first run fails and names ADR-102. The same line under src/backend/ passes, since the rule covers only src/frontend/**. The renamed variable in login_nearmiss.ts also passes: the email still reaches the console, but the exact text never appears.

Following a value through variables is data-flow analysis, which many SAST tools offer once a rule defines the source and sink. Semgrep’s taint mode, for example, tracks data from sources you define and reports a finding when it reaches a sink. Mneme has no such rule kind.

Where custom SAST rules overlap

Some SAST tools accept custom rules, so a scanner can enforce ADR-102 too. A Semgrep rule is written in YAML, matches code with a pattern, and can be limited to files with a paths: key. You could write the ADR-102 rule there instead.

The differences are where the rule lives and when it runs. In Mneme the rule sits in the ADR, next to the reasoning, and changes through the same pull request as the decision. A violation prints the ADR’s ID and title. The Claude Code hook evaluates the rule before an Edit, Write or MultiEdit call changes a file, and in strict mode, its default, it refuses a write that produces WARN or FAIL. If your scanner already holds the rule and your team is content with that, Mneme adds little for that rule.

For dependencies, SCA does more. GitHub’s dependency review shows licence, dependents and age for changed dependencies, and its action can block a pull request on listed licences. A Mneme FORBID_DEPENDENCY rule only warns when a word of a package name appears in a file.

Examples in each category

These four tools are described from their own documentation.

Running them together

  • Keep SAST in CI for vulnerability classes and data flow. A taint rule that treats user.email as a source and console.log as a sink can follow the renamed variable above, if you write or enable one.
  • Keep SCA for advisories and licences on the packages you pull in.
  • Add Mneme for your decisions. Write each security decision as an ADR with a Constraints section, create the memory file with mneme init and import it with mneme adr import, add the Claude Code hook, and run mneme check --mode strict as a CI step. Strict mode exits 0 on PASS, 1 on WARN and 2 on FAIL. Warn mode exits 0 on any verdict, but still exits 2 on Result: INCOMPLETE or an error. The CI how-to guide has a GitHub Actions workflow.
  • Numeric rules affect other checks. In 0.11.0, once a memory file holds a numeric rule, every --input check against it exits 2 and reports the evaluation incomplete (Result: INCOMPLETE, or Result: FAIL (evaluation incomplete) when another rule fails), in warn mode too, wherever the file sits. Check Python files for numeric rules with --source-file.

Mneme has no integration with SAST or SCA tools.

LayerAnswersDoes not answer
SAST Does this code contain a known class of security flaw? Whether a change follows a decision only your team made, unless you write that rule into the tool
SCA Does this dependency carry a known vulnerability or a licence we refuse? Whether code outside the dependency manifest breaks an architecture decision
Mneme HQ Does this change contain text, a package name or a Python value that an approved ADR forbids? Whether code is vulnerable, whether a package has a CVE, or what the code means

FAQ

Does Mneme replace SAST or SCA?
No. SAST analyses code for security flaws, and SCA checks dependencies against vulnerability and licence data. Mneme does neither. It enforces rules your team compiled from its own architecture decisions, on code changes, in agent hooks such as Claude Code’s and in CI. Run it alongside both.
Can Mneme find vulnerabilities?
No. Mneme matches exact text in named paths, words of a package name, and numeric limits in Python files. It has no vulnerability rules, no advisory data and no data-flow analysis. A value logged through a renamed variable passes a literal rule.
Can a SAST tool enforce an ADR?
Yes, when you write the rule into the tool. Semgrep rules, for example, match code patterns and can be limited to paths. The rule then lives in the scanner’s configuration. In Mneme it lives in the ADR file, a violation prints the ADR’s ID and title, and the Claude Code hook evaluates it before a write.
Does Mneme check licences or CVEs?
No. A FORBID_DEPENDENCY rule warns when a word of a package name appears in a file; for a name of several words, the check’s query must also retrieve the decision. It returns WARN, never FAIL, has no path scope, and knows nothing about the package’s advisories or licence. Use an SCA tool for those.
Does Mneme scan for secrets?
No. A FORBID_LITERAL rule matches only the exact, case-sensitive text you put in it. It cannot recognise a key or token by its shape. Use a secret scanner for that.