Container and vulnerability handling¶
CodeNavi runs as one container on your host. This page says how that container is locked down, what goes into the image, how each release is checked before you can install it, and what happens when a vulnerability is found. Every setting below is in the compose file of your install package, so you can read it and check it.
How the container runs¶
The shipped compose file (Linux and Windows) starts the server with these settings:
| Setting | What it does |
|---|---|
| Your own user, not root | With Docker, the server runs with the user and group ID of the account that installed it, never as root. With rootless Podman it runs as root inside the container, and Podman maps that root to your unprivileged account on the host, so it gains no privilege. |
No Linux capabilities (cap_drop: ALL) |
The process cannot change file ownership, bind low ports, load kernel modules or use any other root-only operation. GPU access still works, because it does not depend on capabilities. |
no-new-privileges |
No program inside the container can gain more rights than the process that started it. |
| No setuid or setgid programs | The image has none. The build fails if one is found, so a release cannot ship with one. |
| Read-only root file system | The container can write only to its data folders and a small in-memory /tmp (64 MB). The program files cannot be changed while it runs. |
| Ports | Metrics (9091) are reachable from your own machine only. Search (8765) is too, on Linux without a GPU and on Windows. A Linux GPU install uses host networking and listens on every interface, with the token required: set CODENAVI_BIND=127.0.0.1 in .env to keep it local. See Network. |
| A token on every request | The installer always creates an access token. A server that can be reached from the network without a token refuses to start or shows a warning. See Verify the security posture. |
| Init process and log limits | A small init process cleans up child processes, and the logs rotate at 5 × 50 MB, so a long-running server does not fill the disk. |
What goes into the image¶
- A minimal base image, pinned by digest. The same base is used every time a release is rebuilt; an upstream change cannot slip in without a new release.
- Locked dependencies. Every Python package is installed at an exact version from a lock file, with no dependency resolution at build time.
- The models are in the image. The embedding and reranking models are included, at pinned versions, and the server runs with model downloads turned off. A compromised process or a fake model server cannot make it fetch a different model. No model runs code from a remote source.
- Nothing extra. The package cache is removed. The process cannot install software at runtime: it has no rights to do so, and the root file system is read-only.
How each release is checked¶
- Vulnerability scan. Every release image is scanned for known vulnerabilities (CVEs) before it is published. A release is refused while it has a Critical finding that has a fix available.
- Software bill of materials. Every release includes a CycloneDX SBOM (
sbom.json) that lists the components in the image, so your own tools can check them against new CVEs. From release 1.3.69 the SBOM is also published, so you can read it before you install:https://codenavi.com/security/sbom/<version>-cuda.cdx.jsonfor the NVIDIA image and<version>-rocm.cdx.jsonfor the AMD image, each with a cosign signature next to it (add.sig). To check one, runcosign verify-blob --key cosign.pub --signature 1.3.69-cuda.cdx.json.sig --insecure-ignore-tlog=true 1.3.69-cuda.cdx.json. - Signature. Release images and update manifests are signed with cosign. The installer and the updater check the signature and stop if it does not match ("fail closed"). Compare the public key's fingerprint with the one on codenavi.com/security before you install; it is published on a different channel from the package. See Updating CodeNavi.
How we handle vulnerabilities¶
- In CodeNavi's own code: report it to security@codenavi.com. We acknowledge within 48 hours and fix or mitigate Critical and High issues within 30 days. The full policy, with safe harbor for good-faith research, is in Vulnerability disclosure.
- In a component of the image (Python, a system library, a Python package): when a vulnerability affects a component that ships in the image, we update that component in a release.
- Every fix is published. Each fixed vulnerability gets an entry in Security advisories with the affected versions, the impact on CodeNavi, a CVSS severity and the action to take. For a component CVE, the advisory says whether and how CodeNavi reaches the vulnerable code, so you can judge your exposure without reading the source.
- Updating is one command (
update.sh, orupdate.ps1on Windows), and it checks the signature before it installs. An air-gapped install updates from a signed offline package. See Updating CodeNavi.
Check it yourself¶
With the server running, these commands show the settings above. Use podman in place of docker if that is your engine.
# user (0:0 is expected under rootless Podman), read-only root, dropped capabilities, no-new-privileges
docker inspect codenavi --format 'user={{.Config.User}} readonly={{.HostConfig.ReadonlyRootfs}} capdrop={{.HostConfig.CapDrop}} secopt={{.HostConfig.SecurityOpt}}'
# no setuid or setgid programs in the image (prints nothing)
docker exec codenavi find / -xdev -perm /6000 -type f
# the published ports and the address they listen on (prints nothing on a Linux GPU install: host networking)
docker port codenavi
# what listens on the host, every install
ss -tlnp | grep -E '8765|9091'
To check the image itself, compare the signature with the public key (see the setup guide) and scan sbom.json or the image with the vulnerability scanner you already use.