Security fixes go into the latest release. Please update before reporting: CommitGen version shows what you have.
Please don't open a public issue for security problems.
Report it privately on GitHub: open the repository's Security tab and click Report a vulnerability. Include:
- what the problem is and what an attacker could do with it,
- steps to reproduce (a small repo or diff helps),
- your OS,
CommitGen versionand the provider you use.
You'll get a reply within a week. Once a fix is released, the advisory is published and you're credited unless you'd rather not be.
- Secrets are masked before anything leaves your machine. API keys, tokens, private keys, passwords in URLs and
password = "..."-style values in the diff are replaced with[REDACTED]before the diff goes to an AI provider.CommitGen --dry-runshows exactly what would be sent. - Commits with real-looking keys are stopped. If the staged changes contain a known key format (GitHub, AWS, Google, OpenAI, Anthropic, Stripe live, Slack, Groq, GitLab, Hugging Face, SendGrid, private keys), automatic commits (
-c -y,--each) refuse to run and the git hook adds a warning to the message editor. Masking only protects what the AI sees: git would still store the key. Use--allow-secretsfor fake keys in tests. - Offline mode sends nothing anywhere.
--offline(orprovider = "offline") works without network access. - Local models stay local. Ollama, LM Studio and llama.cpp run on your machine.
- Keys are never printed.
CommitGen config showandCommitGen providerssay whether a key is set, never what it is. The config file is created with0600permissions. - The cache stores messages, not code. Messages for diffs you already generated are saved in your user cache folder (
CommitGen cache path) for 7 days.CommitGen cache clearremoves them;cache = falseturns the cache off. - No third-party Go dependencies, so there is no dependency supply chain to compromise. CI runs
govulncheckand CodeQL on every push.
Masking and the guard reduce the risk, but they can't catch everything. If a real key reached a commit:
- Revoke or rotate the key first. Assume it's compromised once it's pushed.
- Remove it from history (for example with
git filter-repo) before pushing, or as soon as possible after. - Move the key to an environment variable or a secret manager.