Keman is a self-hosted proxy. It is not a hosted service, and it does not phone home.
Open a private security advisory on the GitHub repository, or contact the maintainers out of band if an advisory is not available. Please include a way to reproduce the issue and the version (keman version).
| Version | Status |
|---|---|
| 0.1.0-beta | Current beta. |
- The master key.
initstores it inmaster.key(mode 0600) next to the config and setsmaster_key_file, unless that field is already set. Anyone with the master key and the database can unwrap credential secrets. By default both files are in the same directory, so a copy of that directory (a backup, a shared volume) carries everything needed. For production, setmaster_key_fileto a path outside the data directory or a secrets mount, or supplyKEMAN_MASTER_KEYfrom a secrets manager, and keep the directory mode 0700. - The admin token. It is shown once by
initand byadmin-token rotate. The admin listener must stay on localhost or a Unix socket. The terminal UI keeps a typed token only in its own memory and never writes it to disk.KEMAN_ADMIN_TOKENis readable by the same user through the process environment.scripts/quickstart.shsaves a token to.quickstart/admin.tokenfor the demo only. - The SQLite file. It holds ciphertext, spend counters, events, and the wrapped data key.
- The process memory. Plaintext credentials are cached so the proxy can swap them onto requests. A memory dump defeats the encryption. Run the process as a non-root user, on a read-only root filesystem where you can, and with egress only to the upstream hosts you configured.
- Forward a virtual key,
Authorization,X-Api-Key,X-Forwarded-*, orForwardedto the upstream. - Honor
X-Forwarded-Forfrom a peer that is not intrusted_proxies(empty by default). - Forward a path with
.or..segments (also..;), backslashes, or control characters. The upstream could resolve it to an endpoint the path allowlist refuses, so it is answered withpath_not_allowed. - Follow a redirect whose host or port is not the configured upstream.
- Use
HTTP_PROXYfor upstream connections. - Serve the admin API or
/metricswithout the admin token.
Every release binary has a .sha256 sum, an SPDX SBOM (.spdx.json), and a keyless cosign bundle (.bundle) signed by the release workflow. scripts/install.sh always checks the sum, and checks the signature when cosign is installed. To check one by hand:
cosign verify-blob --bundle keman_linux_amd64.bundle \
--certificate-identity-regexp '^https://github.com/kirank55/keman/\.github/workflows/release\.yml@' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
keman_linux_amd64The container image ghcr.io/kirank55/keman is signed the same way: cosign verify with the same identity and issuer.
See docs/THREAT-MODEL.md and docs/ASSUMPTIONS.md.
The release workflow in .github/workflows/release.yml builds a static binary, an SPDX SBOM of that binary (Syft), a SHA-256 sum, and a keyless cosign signature, then publishes one GitHub Release. No signed release has been published yet; pushing a v* tag is what runs it.