DOC CLI changes software on your computer, so it is built to be predictable and conservative.
- No unrestricted shell. Subprocesses use an executable and an argument array. There is no string concatenation into shell commands.
- Allowlisted executables. The process runner refuses names it does not know.
- Validated input. Package identifiers, search queries, URLs, file names, and plugin names are validated before use.
- Plans before changes. Installs, upgrades, removals, cleanups, backups, restores, downloads, plugin changes, configuration changes, and self updates all show a plan first.
- Explicit approval. In a terminal DOC CLI asks. Without a terminal it refuses unless you pass
--yes. Steps that need administrator rights also need--allow-elevation. - No silent elevation. When a step needs
sudo, the plan says so and shows the exact command. - Verified downloads. Downloads accept https only, enforce a size limit, and compare SHA 256 checksums when you provide one. Self updates always verify the checksum before replacing anything.
- Safe file handling. Backups and restores reject path traversal, skip symbolic links, and verify checksums. Restores refuse to overwrite files unless you pass
--overwrite. - Secret protection. History, logs, and audit records redact secret flags, assignments, and common token shapes. Environment values whose names look secret are hidden.
- Untrusted inputs. Package manager output, release metadata, plugin manifests, and AI replies are parsed and validated.
- Release signature verification. Updates verify a SHA 256 checksum from the same release. A separate signature check is planned but not implemented.
- OS credential storage for AI keys. DOC CLI reads the key from an environment variable you name and never stores it.
- Plugin sandboxing. Plugins run as normal programs with your rights, with a reduced environment. A plugin manifest lists requested permissions, but they are informational. Only install plugins you trust.
- Standalone binary signing. No standalone binaries are produced yet.
Report security problems privately to the maintainers of the repository that publishes your copy of DOC CLI. Do not open a public issue for an unfixed vulnerability.