Static scanning
gate scan is static analysis of configuration. It reads files, classifies what it finds, and stops.
What happens
- Discover. Every adapter that detects its ecosystem reads its configuration files.
- Normalise. Raw config becomes
GateServerstructures. This is the redaction boundary: credentials are detected, classified and replaced with placeholders here, so nothing downstream ever holds a raw value. - Classify. Each tool and standing grant is mapped to capabilities.
- Run rules. Every rule runs against the normalised model. A rule that throws is reported as a warning and skipped: one broken check must never take down the other twenty-one.
- Score. The blast radius is computed from the facts.
- Diff. If a baseline exists, findings are marked new, unchanged or resolved.
A scan of a typical repository takes well under a second.
What Gate reads
Configuration files only, inside the repository you pointed it at. Discovery
walks the tree with node_modules, .git, dist, .next and similar
directories skipped, and opens only files whose names suggest agent
configuration.
Symbolic links are not followed. A symlink inside a scanned repository is a config-controlled path out of the root, and following one would let a repository decide what Gate reads.
What it never does
- Never spawns a process from scanned configuration.
- Never opens a network connection to a configured server.
- Never reads outside the repository root, even when a path in the
configuration points there. Gate classifies
~/.sshas a grant; it does not go and look. - Never writes, except to
.gate/baseline.jsonwhen you explicitly ask.
Connecting to servers requires deep inspection, which is opt-in.
Limits
Static analysis cannot see tools a server has but never declared in configuration. For a server Gate recognises exactly, the tool list is known. For one it does not, the finding records a capability posture and is labelled as inferred.
Hard caps keep a hostile or enormous repository from turning a scan into a denial of service:
gate.config.ts
export default defineConfig({
limits: {
maxFiles: 2000,
maxFileSizeBytes: 2_000_000,
},
})
Hitting a cap produces a warning, so a partial answer never looks like a complete one.