Code scanning
Scan branches and pull requests, then review findings before release.
Connect a repository
Open Integrations and connect GitHub. Install the GitHub App only on repositories you need to inspect. Code scanning can run without an SDK; source-aware production analysis also needs the application's repository and deployed commit.
Run a branch scan or comparison
Open Code Analysis and choose Start a scan for a full ref, or Compare branches for a base/head comparison.
Select the repository and branches or refs to inspect.
Choose checks that fit your project. Configure build and lint commands and add a test command when needed.
Start the run and inspect its check status before reviewing findings by severity, file, and location.
What the checks cover
| Check | Purpose |
|---|---|
| OpenGrep | Rule-based detection of unsafe code patterns. |
| Trivy | Known dependency vulnerabilities, exposed secrets, infrastructure configuration, and license risks. |
| Build, lint, and tests | Run the project commands you configure; a missing or failed stage needs review. |
| Optional AI review | Review code for logic and correctness issues requiring additional interpretation. |
Keep checks running
Use branch and pull-request monitors for repeated review of a configured change path. Check the Monitors view for the selected repository and comparison. Review completed, failed, and partial results; a finished run is not the same as every check passing.
Understand coverage
Findings depend on supported languages, rule coverage, dependencies, scanner configuration, and the code available to inspect. Confirm a finding in context before fixing it. A scan with no findings is not a guarantee that the branch is safe.