Security Agent is a stand-alone product and is not part of CodeRabbit’s Pro, Pro+, or Enterprise plans.
Security Agent findings are separate from Pull Requests > PR Findings. PR Findings come from security issues raised during pull request review comments, while Agent Findings come from full-codebase scans.
How Security Agent works
Security Agent runs a multi-stage pipeline rather than matching fixed rules against a single file or diff:- Map — CodeRabbit builds a model of the repository so it can reason across files and services, not just within one file.
- Investigate — Agents examine likely vulnerable code paths and infrastructure misconfigurations, then trace how data flows through the codebase.
- Verify — A separate verification step reopens the cited code paths and infrastructure evidence, then rejects speculative, test-only, dead-code, and unreachable cases before a finding is surfaced.
What Security Agent scans for
Security Agent looks for practical code-level vulnerabilities across the selected repository. Findings can include issues such as injection, authorization bypass, IDOR, broken authentication, CSRF, sensitive data exposure, information disclosure, XSS, SSRF, open redirects, insecure deserialization, CORS issues, security misconfiguration, path traversal, weak cryptography, denial of service, LLM security risks, and other code security problems. LLM and AI application risks include prompt injection, improper output handling, and excessive agency. Full-codebase scans also cover infrastructure-as-code misconfigurations in Terraform, OpenTofu, Kubernetes, Helm, Dockerfile, Containerfile, Bicep, CloudFormation, ARM templates, and Compose files. This coverage runs automatically without customer configuration. Repositories composed only of infrastructure files enter the same Map, Investigate, and Verify pipeline. Each accepted finding is grounded in code evidence. When available, CodeRabbit shows:- Category and severity
- Repository, file path, and line range
- CWE
- Description and recommendation
- Reachability: External, Internal, Unreachable, or Unknown
- Reachability call stack when CodeRabbit can trace a path from an entry point to the risky code
- Inline code context or a permalink to the scanned commit
- Status and fix status
Run a scan
You can start a Security Agent scan from the Security area in CodeRabbit.1
Open Security
In the CodeRabbit app, go to Security.
2
Start a scan
Click Scan repositories.
3
Choose repositories
Select one or more supported repositories.
4
Choose Code findings
Select Code findings to run Security Agent. You can select other scan types in the same dialog when you also want dependencies, SBOM, or secrets scans.
5
Review the estimate
If code-scan credits apply, review the estimated total and per-repository credits before starting. Estimates are based on the effective scan branch and configured code path exclusions. For cap authorization behavior, see Availability and limits.
6
Start the scan
Click Start. Each selected scan type runs for every selected repository.
Scan status and activity
Each scan target moves through pending, running, completed, and failed states. A scan that runs for too long is marked failed with a message telling you it timed out or was interrupted, so you can run it again.completed describes the execution envelope only. A completed Deep Scan full-codebase scan can still show partial coverage and follow-up work when repository traversal or the coverage analysis reaches a file cap.
The activity log records each run’s target, scan ID, status, duration, repository, who triggered it, and when. Completed and failed activity entries link to the matching repository scan tab: completed runs open that scan’s results, while failed runs open the failed scan’s status.
Configure repository scan settings
Repository security settings control which branch Security Agent scans, which code paths it skips, and whether scans run on a schedule.Scan branch
For GitHub repositories, choose the branch CodeRabbit should scan. Provider default follows the repository default branch. Selecting the default branch clears the custom branch setting. If a configured branch is deleted, CodeRabbit warns that future scans will fail until you select another branch or return to the provider default.Path exclusions
Use Path Exclude filters to skip code paths that should not count toward Security Agent scans.- Add one repository-relative path or glob per line.
- You can add up to 100 excluded paths per repository.
- Each excluded path can be up to 512 characters.
- Absolute paths, Windows absolute paths, parent traversal, and control characters are rejected.
- Backslashes are normalized to
/, leading./is removed, and duplicate entries are ignored.
Repository context
Repository context is optional architecture and business-domain background that helps Security Agent interpret the repository during full-codebase scans. From Security, select Repositories, open the repository’s settings, and enter up to 4,000 characters in the Context field under AI Deep Scan. The saved context applies to every subsequent scan for that repository across the Map, Investigate, and Verify phases. Repository context is available for supported repositories to users who can edit Security Agent repository settings. Leaving the field empty removes the stored context. Edits are saved and reset alongside the repository’s other security settings. Context informs how Security Agent interprets the code, but it cannot override scan instructions. Security-relevant claims are still validated against the code before findings are reported.Recurring schedules
Set a recurring full scan schedule per repository when you want CodeRabbit to scan on specific days and times. Schedules use 24-hour time, an IANA timezone, selectable days of the week, and selectable scan types: Code, Dependencies, SBOM, and Secrets. Each scheduled scan target dispatches independently. If one target is already active, CodeRabbit skips that target while other runnable targets can still start. Automatically dispatched full scans follow the same authorization and charging behavior described in Availability and limits. A scheduled full scan does not run if its estimated code-scan credit charge exceeds the remaining monthly allowance or cap.Security repository Learnings
The Learnings tab in a repository’s Security settings lists saved accepted-risk guidance for Security Agent scans. Each entry shows its guidance text, file scope, and last-updated time. Repository-wide guidance displays All files as its scope. You can view, edit, and delete saved entries. The tab shows up to 100 of the newest entries for each repository. These Security repository Learnings are separate from the Learnings used in pull request reviews.Viewing saved guidance requires Security read access. Editing guidance requires Security write access, and deleting guidance requires Security delete access.
Scan Git History for secrets
Scan Git History is available under the Secrets Scanner repository settings at Security > Repositories > repository settings. It applies to secrets scans and is disabled by default. When enabled, Secrets Scanner inspects commits reachable from the configured scan branch and surfaces credentials that existed in earlier commits but are absent from the latest code. Enabling it can materially increase scan duration. Historical secret findings show the source commit where the secret was detected. Code context loads from that commit rather than the latest scan state.The Security area
The Security section in the CodeRabbit sidebar organizes the Security Suite into these pages:- Overview — a dashboard of your latest security posture.
- Repositories — repository scan settings, including branch, path exclusions, and schedules.
- Learnings — saved accepted-risk guidance for Security Agent scans in each repository.
- Agent Findings — code vulnerability findings from Security Agent.
- Dependencies — vulnerable dependency findings.
- SBOM — resolved component inventory and license visibility.
- Secrets Detection — leaked secrets and hardcoded credential findings.
- PR Findings — security issues raised during pull request reviews.
- Activity Log — a record of scan runs.
- Summary cards with finding counts, affected repository count, and critical/high totals for each scan type.
- A Security Trend chart of findings by severity over time, filterable by repository and finding type across 30-, 90-, and 180-day ranges.
- Latest Findings, the most recent critical and high Agent Findings with severity, category, repository, and file location.
- Highest-Risk Repositories, ranked by critical and high findings.
Work with Agent Findings
The Agent Findings page gives you a triage surface for code findings from completed scans. You can:- Filter by repository, severity, category, and search text
- Open a finding drawer with evidence, recommendation, reachability, code context, and available actions
- Open Share, then choose For humans to copy the existing direct link to the finding to your clipboard, or For agents to copy self-contained, agent-ready Markdown to your clipboard
- Ignore a vulnerability warning with an optional accepted-risk note and scope
- Export findings as CSV, JSON, or SARIF
- Start Fix with AI for supported vulnerability findings
- View a generated fix pull request when one exists
- Retry failed fixes
Related Security scans
The Security area also includes other committed-codebase scan targets. You can start them from the same run dialog, but each has its own source and findings surface.Secrets verification status
Secrets Detection assigns a verification status to help you prioritize credentials confirmed to be live while keeping unverified findings visible.- Verified Active The scan confirmed that the credential is currently live.
- Verified Inactive The credential is invalid or has been revoked.
- Unknown Verification data is missing, unrecognized, or inconclusive. Existing findings without verification data also appear as Unknown.
Availability and limits
Security Agent is available for GitHub (including GitHub Enterprise), GitLab (including self-hosted GitLab), Azure DevOps, and Bitbucket Cloud repositories. Repository security settings, code context links, and Fix with AI are available on these supported providers. Bitbucket Data Center is not currently supported. Some capabilities remain GitHub-only: selecting a custom scan branch, scheduling full scans, and scanning Git history for secrets. New workspaces include a free trial with 10 code scans. Before a full code scan (Deep Scan) subject to usage billing runs, CodeRabbit authorizes it by checking the estimated code-scan credit charge against the remaining monthly allowance or cap. Pending and running full scans reserve their estimated code-scan credit charge against the remaining monthly allowance or cap, so a new scan does not run if completed charges plus those reservations plus its estimate would exceed that limit. If the estimate exceeds the remaining allowance or cap, the scan does not run and a message indicates that the estimated Deep Scan charge is too high. Code-scan credits are charged only after the scan completes successfully. Security Agent does not prove that a repository has no vulnerabilities. It reports findings that CodeRabbit can support with code evidence, and it preserves Unknown reachability when CodeRabbit cannot determine a path confidently enough. Code-scan credit estimates are estimates. They account for the effective scan branch and configured code path exclusions, but they should not be treated as a final invoice.What’s next
Repository settings
Configure repository-level settings that control how CodeRabbit analyzes each repository.
Linters and security analysis tools
Browse the static analysis and security tools CodeRabbit can run during pull request reviews.
OSV-Scanner
See how CodeRabbit uses OSV-Scanner for dependency vulnerability analysis in code reviews.