Skip to main content

AI security review

AI security review reads each new pull request in a repository and looks for security weaknesses that the change adds. It posts what it finds as one review with comments on the added lines, at most 10 per pull request, each marked as AI-generated. It never blocks a pull request: the review is a comment, never an approval or a request for changes, its commit status is success or a warning, never a failure, and a person decides what to do with each comment.

It complements the scanners rather than replacing them. SAST, secret scanning and the other checks still decide whether a pull request passes; the review points at weaknesses that no rule describes, such as a missing authorisation check or a value that reaches a query unchecked.

Your own provider, one repository at a time

  • Bring your own key. The review uses your organisation’s own model provider under AI integrations, billed to you and under your contract with that vendor, as AI PR review and AI fix do. fremforge holds no AI key of its own.
  • Switched on per repository only. Add a per-repo override for the repository with the feature pr-security-review switched on, in the console or with PUT /_app/api/v1/orgs/{org}/ai/repo-overrides (policy:write). The organisation default does nothing for this feature: a repository without an override is never reviewed.

What is sent to the model

  • the pull request’s diff, at most 48 KB;
  • the SAST findings for the pull request’s changed files, as context.

Credentials are masked in both, line by line, with the push-protection rules, before anything leaves fremforge. If a credential cannot be masked, or the secret scan cannot run, nothing is sent and the status says why. Nothing else from the repository is sent: no other files, issues, commit messages or pull request discussion. The code is sent as untrusted data, with an instruction that it carries no instructions.

The prompt, the diff and the answer exist only in memory for the call and are not stored by fremforge; the comments exist only in the pull request. The audit log keeps ids and counts, never content.

The comments

  • Posted on added lines only, never on unchanged or removed code. Anything the model reports elsewhere, or in any other form, is dropped.
  • At most 10 per pull request, each with a CWE, a severity, why it matters and a suggestion.
  • Each says that it is AI-generated and names your provider and model, with a machine-readable disclosure marker (EU AI Act Art. 50).
  • One review per pushed commit. Resolve or reply to the comments like any review comment.

Limits

At most 50 reviews per organisation in any 24 hours, plus your AI gateway’s own monthly cap. Your provider bills the tokens to your organisation.

See also

  • AI integrations: your provider, the feature defaults and the per-repo overrides.
  • AI fix: a fix pull request for one SAST finding, also on your own provider.
  • SAST: the rule-based findings the review builds on.