Home
Cognium
Open-source semantic SAST engine

Find real vulnerabilities in AI-written code.

Local, deterministic, MCP-native. Trace tainted data across functions, files, and frameworks — from your terminal, your CI, your product, or Claude's tools. No server, no phone-home, no LLM tokens burned per scan.

$ npm install -g cognium-dev
AuthController.java
String id = req.getParameter("id");
source: HTTP parameter
String q = "SELECT * WHERE id=" + id;
taint: full propagation
stmt.execute(q);
sink: SQL execution
CWE-89 SQL Injection Critical - line 25

100 %

OWASP · Synthetic

13

Upstream fixes shipped

8

Languages

19

CWE types

Analysis model

Built around data flow, not pattern matching.

Traditional scanners match dangerous text. Cognium builds a flow graph, follows values through the program, and only reports when tainted input reaches a sensitive sink without a sanitizer.

01 · Source detection

HTTP parameters, headers, cookies, file uploads, environment variables, CLI args, and framework-specific request objects.

02 · Inter-procedural tracking

Flows are followed across function calls, return values, object fields, map keys, array indexes, conditionals, and common framework abstractions.

03 · Sanitizer aware

Prepared statements, HTML escaping, URL validation, framework encoders, and custom YAML definitions reduce noise without hiding risk.

Published evidence

Benchmarks with artifacts you can inspect.

The figures below are from the April 22, 2026 static-only snapshot. Machine-readable results are published for independent review; the static engine runs without an LLM.

OWASP Benchmark v1.2 · synthetic
100%
Juliet Test Suite · synthetic
156/156
SecuriBench Micro · real-world
97.7%
CWE-Bench-Java · real-world
50.8%
CWE-Bench-Java · static-only detection real-world
Cognium (static)     50.8%   61 / 120 CVEs
IRIS + GPT-4         45.8%   55 / 120 CVEs
CodeQL               22.5%   27 / 120 CVEs

Dated static-only snapshot; public result artifacts available.
gradient
Coverage

Framework-aware rules across the stack.

Cognium ships with source, sink, and sanitizer definitions for popular server frameworks, plus YAML configuration for teams adding their own architecture patterns.

Java

Spring, JAX-RS, Servlet

JavaScript

Express, Fastify, Koa

TypeScript

Express, Fastify, Koa

Python

Flask, Django, FastAPI

Go

net/http, Gin, Echo

Rust

Actix-web, Rocket, Axum

Bash

Shell scripts

HTML

Security attributes

CWE classes

The high-risk paths AI agents keep getting wrong.

SQL injection, command injection, XSS, path traversal, SSRF, deserialization, XXE, LDAP injection, NoSQL injection, response splitting, weak randomness, weak crypto, and more.

CWE-89 · SQL Injection

Tainted data flowing into SQL queries without parameterization.

CWE-78 · Command Injection

Unsanitized user input passed to OS command executors.

CWE-79 · Cross-Site Scripting

Reflected or stored tainted content rendered in browsers without escaping.

CWE-22 · Path Traversal

User-controlled paths reaching file system operations without normalization.

CWE-918 · SSRF

Server-side request forgery from tainted URLs in HTTP client calls.

CWE-502 · Deserialization

Untrusted data passed to object deserialization sinks.

Where to use it

One engine. Every surface a developer works on.

The cogniumhq/cognium-dev monorepo ships three npm packages — a CLI, a Node/browser library, and an MCP server — so the same deterministic engine runs from your terminal, inside your product, or as a tool your AI agent can call.

MCP server

SAST as a first-class AI-agent tool.

@cognium/mcp-server exposes the deterministic cognium-dev pipeline as ten Model Context Protocol tools — scan, taint paths, entry points, sink descriptions, sanitizer checks. The LLM never guesses the engine's state; it calls a tool and gets a grounded answer.

scan Full polyglot SAST on a file or directory. Returns findings, taint flows, cross-file paths.
taint_paths Cross-file taint flows, filterable by source, sink, or sink type.
explain_finding CWE metadata, remediation, severity, sanitizer suggestions for one finding.
list_entry_points Every attacker-reachable handler grouped by framework.
list_reachable_sinks Sinks of a category that have a real taint flow reaching them.
attack_surface_summary Roll-up: entry points × sinks × cross-file paths + top files by finding count.
check_sanitizer Deterministic yes/no on whether a function sanitizes for a given sink category.
describe_sink CWE, remediation, severity, and sanitizer list for a sink category.
describe_source Framework API patterns treated as a source of a category.
find_similar Given a finding id, return other findings sharing the same rule.
~/.config/claude/mcp.json
{
  "mcpServers": {
    "cognium": {
      "command": "npx",
      "args": ["-y", "@cognium/mcp-server"]
    }
  }
}
Get started

Install once. Scan anywhere.

Local, in pre-commit hooks, or in CI. SARIF output plugs into GitHub code scanning and every review workflow that already reads the format.

terminal
$ npm install -g cognium-dev
$ cognium-dev scan ./src --format sarif -o results.sarif

src/controllers/AuthController.java
  [critical] sql_injection CWE-89
  tainted data flows from line 12 to line 45
  fix: use PreparedStatement with parameters

Found 1 vulnerability in 1 file.
Product family

Same substrate. Two upgrade paths.

The engine you install with npm is the same one that powers the grounded pipeline on cognium.net. Start OSS — and if you later need higher recall on messy real-world code, the same substrate plus a grounded LLM verdict layer is cognium-ai.

MIT · OSS

cognium-dev

The SAST substrate — deterministic and local.

  • SAST engine, CLI, and MCP server in one monorepo
  • Runs on your machine, in CI, in the browser, or inside your product
  • 50.8% on CWE-Bench-Java (static-only, real-world)
  • No phone-home, no LLM tokens per scan, no server
Commercial · cognium.net

cognium-ai

Substrate + grounded LLM verdict layer.

  • Same cognium-dev substrate underneath
  • Adds a grounded verdict layer for context-specific triage
  • 86.7% on CWE-Bench-Java (grounded pipeline)
  • Managed hosting, enterprise memory, private evaluation
Open source · MIT licensed

Help make AI-generated code trustworthy.

Contribute framework definitions, benchmark cases, editor integrations, and CI examples. MIT licensed and built in the open — jump into the community hub or head straight to Discussions.