Lattice
Lattice scans the whole repository in the background and reads each pull request against that context. It traces candidate vulnerabilities through the codebase and recommends fixes that follow nearby patterns.
Validated vulnerabilities in MLflow, AutoGPT, authentik, and more.
PR #1842 · tenant file downloads
apps/api/src/FileController.ts
Missing tenant isolation
Broken access control · IDOR
downloadFile resolves fileId from the query string and returns the file without checking ownership. Any authenticated user can request another tenant's file by guessing its id.
Suggested fix
Verify file.tenantId === tenantId before returning the path.
Scrutinizes every assumption
Comments, names, and labels tell you what code is supposed to do. Lattice checks what it actually does, tracing each path to see whether the assumption holds. Where reality and the label disagree is where the vulnerabilities live.
Request middleware
app/middleware.py
Debug auth mounted in production
Broken access control
DebugAuth is test-only and never mounted in production. It sits in the MIDDLEWARE list applied to every request, so anyone who sends X-Debug-User is authenticated as that user.Suggested fix
DebugAuth only behind a local/CI environment guard.192 bugs, 1 confirmed RCE
Most of what a scan turns up is individually harmless — a loose unzip here, a trusting template loader there. Lattice chains them, runs the chain in a sandbox, and reports the one that actually detonates. What reaches your queue is a proven exploit, not four rules that matched near each other.
api/imports.py:extract_bundlealone: Mediumapi/imports.py:validate_manifestalone: innocuousConfirmed · RCE on api-worker
Exploit reproduced end-to-end in a sandbox ✓
The findings that actually matter
Every codebase has bugs — that's reality, and most scanners bury you in hundreds of them until it's all noise. Lattice ranks each one by what it can actually reach and wreck in your system, so the same sink can be a P0 in one file and a P3 in another. Only the findings that can take the account rise to the top.
Signup avatar import
api/signup.py
- Reachability
- pre-auth via
/signup/avatar - Exposure
- public internet
- Auth
- none
- Blast radius
- api pod holds
s3:GetObjectandsts:AssumeRole; a redirect to IMDS lifts cloud credentials
Link-preview worker
worker/link_preview.py
- Reachability
- admin-curated allowlist, not attacker-controlled
- Exposure
- internal only
- Auth
- internal service
- Blast radius
- no instance role; egress firewall blocks the metadata range regardless
One branch from failing closed
Beyond bugs, Lattice flags cheap hardening. This rate limiter returns true when Redis is unreachable, so throttling silently stops on login and password reset. Nothing is broken today, so it is informational. But a single branch keeps it failing closed, and an outage no longer opens the door to credential stuffing.
Gateway rate limiter
gateway/ratelimit.py
Rate limiter fails open
Defense in depth
allow_request returns true, so throttling drops on /login and /password-reset.Recommendation
Cheaper the more it knows
The first scan maps your whole repository — data flows, auth model, trust boundaries. That one is expensive. Every scan after reuses the map and pays only for the diff, so routine reviews cost a fraction of the first.
The first scan reads your whole repository. Every one after pays only for the diff.
An AppSec review on every pull request
Lattice reads each change against a standing map of the repository, validates what it finds, and ranks it by the blast radius it would carry in your deployment.