Security features¶
CodeNavi is built to be self-hosted in a trusted network: the whole retrieval stack runs on hardware you own, a scanner reads every chunk before it is stored or handed to a model, and the supply chain is signed so you can verify what you installed. This page catalogs the security capabilities; the Security model explains how the scanner works in depth.
Defense in depth¶
Indexed search, file reads and chat run through the same gate. The scanner sits between your code and the index, so a detected credential or injected instruction is caught before it can be embedded or returned in a search result. Exact-string grep is the exception: it returns live lines as they are, except private keys.
Your disk Your code — repositories stay on hardware you own;
nothing is uploaded to index them
|
Parse AST-aware chunking — functions and classes split on
real boundaries across 16 languages
|
Gate SECURITY SCANNER — reads every chunk before it goes
anywhere. Secrets and PII become [REDACTED:rule_id];
chunks with injected instructions are flagged.
Tag-only dry-run or hard blocking mode.
|
Local Embedder + index — the code-specialist model and your
LanceDB index, both on your disk. The embedder sees
redacted text; the index keeps the original.
|
Access MCP access gate — bearer-token auth, a startup
exposure guard, tiered /health disclosure
|
Answer Your agent — ranked chunks with file:line citations
Opt into a cloud LLM and it receives the same ranked chunks, never whole files. Zero telemetry from CodeNavi either way.
What ships¶
-
Secrets & PII redacted at chunk time
Rules span AWS, GitHub, Slack, Stripe, GCP, OpenAI, JWTs, database DSNs, PEM/private keys, Firebase, and generic credential patterns, plus PII on by default: payment cards (Luhn-validated) and IBANs (mod-97-validated), with an opt-in extended set (SSN, email, phone, public IP). A match becomes
[REDACTED:rule_id]before the chunk is embedded, and in every search result and chat context. The index keeps the original beside it, so protect it like your source; exact-stringgrep_searchreads live files and redacts them the same way. -
Prompt & prose injection scanning
Instructions hidden in code comments, string literals, or documentation, a hostile README or PDF telling an agent to exfiltrate, are matched by dedicated rules plus prose heuristics. Flagged chunks are kept out of search results. The rules are pattern-based, so a new phrasing can slip through.
-
Quarantine & allowlist
Flagged chunks are indexed and tagged, and the retrieval gate keeps them out of search results. Review each one in the Security screen, and allowlist a false positive there. With dry-run off, files with critical or high findings are quarantined and never indexed. Every allowlist entry requires a reason and is timestamped.
-
Local-first, zero telemetry
Embedding, indexing, search, and reranking all run locally in a container you host, NVIDIA or AMD, including Instinct MI300, with identical index quality on either. No usage beacon, no account. The only network calls are ones you can see and switch off: a once-a-day update check (version number and update token, never code, off with
CODENAVI_UPDATE_CHECK=off) that also fetches a renewed licence, and what you configure yourself: a cloud LLM, the crawler or webhooks. -
Signed & verifiable supply chain
Release images and update manifests are cosign-signed and verified fail-closed by the installer and updater; every release ships a CycloneDX SBOM, and models are pinned revisions with no remote model-code execution. Verify the signing-key fingerprint out of band, via codenavi.com/security, a different channel than the package, before you install. Details: Updating CodeNavi.
-
Access control at the door
The MCP server takes bearer-token auth, a startup exposure guard refuses to bind wide open by accident, and
/healthdiscloses in tiers, an unauthenticated probe learns liveness, not internals. Exposing the server beyond localhost is covered in Remote access. -
Cloud LLMs stay optional
CodeNavi works fully offline. Enable Claude, OpenAI, or another provider for chat and the model receives ranked chunks with citations, never whole source files, and the choice is per install, with an explicit warning before any code leaves the box.
-
Inspect and control it
The Security screen shows scanner status, flips dry-run to blocking, browses every flagged chunk, manages quarantine and allowlist, and runs a scan tester against arbitrary text. The policy is yours to see and set.
-
Framework fit, GDPR to FedRAMP
Self-hosted with no CodeNavi cloud in the path keeps the hard questionnaire rows short: CodeNavi adds no third-party recipient (GDPR), no code flows to the vendor (SOC 2, ISO 27001), no PHI reaches the vendor (HIPAA), no cloud service to authorize (FedRAMP). A coding agent on a hosted model is a separate recipient, so assess it separately. See the framework-by-framework mapping.
-
OWASP compliance gap analysis
The bundled Claude Code plugin adds
/codenavi:compliance: an evidence-linked review of your indexed code against OWASP ASVS 5.0 core, the OWASP Top 10 2025, or EU Cyber Resilience Act Annex I. Every verdict citesfile:line; "not applicable" and "cannot check from code" are stated honestly, audit preparation, not a certification. See Compliance gap analysis.
Verify it yourself¶
Security you can't inspect is just a claim. CodeNavi is built so you can check the work, the architecture, threat model, and disclosure policy ship as SECURITY.md in every package.
- Curl the gate: Verify the security posture turns the access-control claim into five requests and the status code each must return, including the exact header-spoofing bypass from a real 2026 MCP-server RCE.
- Read the rules: the detection ruleset is data you can open, extend, and diff, not a black box.
- Run the scan tester, paste any snippet into the Security screen and watch exactly what would be redacted or flagged.
- Check the signature: compare the shipped
cosign.pubagainst the fingerprints published at codenavi.com/security, on a separate channel, before installing. - Choose the posture: fresh installs run tag-only dry-run so you see hits without breakage; flip to blocking when you're ready.