Security fixes go into the latest minor release (see Releases). Upgrade to it to get them; older releases are not patched.
All fixed in 0.6.0; versions before 0.6.0 are affected.
| Advisory | Severity | Summary |
|---|---|---|
| GHSA-cvff-22gv-8fvr | High | Prompt injection can make the bot run GitLab quick actions (/approve, /merge, /close) as its user |
| GHSA-jjwx-c8c6-f7pq | Medium | Any MR participant can forge the bot's state comment to block reviews, skip them, or hide findings |
| GHSA-j7gf-g74c-wjq4 | Medium | An earlier bot approval stays when a later review can't decide |
| GHSA-5554-qjg2-rm4f | Medium | Files the review skips don't stop --approve |
| GHSA-jr6c-wqc7-cvjq | Low | Code host tokens could be sent to a host taken from the PR URL, or along a cross-host redirect |
Please do not open a public issue. Report privately:
- Email
[email protected], or - open a private advisory at github.com/divmora/code-review-bot/security/advisories/new.
Include a description, impact, reproduction steps and any suggested fix. We acknowledge within 48 hours, triage within 5 business days, and coordinate disclosure with you.
- What leaves your network: changed files, their diffs and (for files up to
full_file_max_lines) their full content are sent to the configured model provider. Pick a provider and data-retention terms that fit your code's sensitivity, or run a local model (Ollama, vLLM). - Least-privilege tokens:
- GitHub token in Actions:
contents: read,pull-requests: write. - GitLab: a dedicated bot user or project/group access token with
apiscope, Developer role. - Bitbucket Cloud: a repository access token with Pull requests: Write and Repositories: Read (add Pipelines/build status write for
--commit-status).
- GitHub token in Actions:
- Untrusted PRs: PR content is passed to the model as data, and repo review rules are read from the base commit. Treat model output as advisory: the CLI comments, and never merges or pushes. It approves only when you pass
--approveor setreview.approve.enabledin the operator config, under the rule inreview.approve(block,min_score); a repository's.codereview.yamlcan't turn approvals on. Don't let the bot's approval alone satisfy required approvals on sensitive branches, and give its token no more rights than approving needs. - State key: set
CODEREVIEW_STATE_KEY(a long random secret, the same on every run; the console sets one per code host) so the bot signs what it posts and still recognises its own comments after the token changes to another user. Without it, only the token user's comments count. - Tokens stay on their host:
GITLAB_TOKENis sent only toGITLAB_URL,CI_SERVER_URLor gitlab.com andGITHUB_TOKENonly toGITHUB_API_URL; configure every other host explicitly. - Forks: don't expose provider keys to workflows triggered by forked PRs (
pull_request_targetwith checkout of fork code is unsafe). The example workflow skips forks. - TLS:
skip_tls_verifyexists only for self-managed GitLab with private CAs; prefer adding the CA to the image trust store. - Secrets in config: use
${ENV_VAR}references orapi_key_envinstead of literal keys, and keepcodereview.yamlout of git (it is in.gitignore).