Skip to main content

Automated Code Review in pipelines

Enable automatic quality and security scanning on Pull Requests in your pipeline.

Ian Webster avatar
Written by Ian Webster
Updated this week

Automated Code Review helps you identify, block and fix security and quality issues across code and configuration in Pull Requests (PRs) in your pipeline. It does this with a configurable ruleset, aligned to Salesforce's Well-Architected framework and OWASP top 10 vulnerabilities.

Getting setup with Automated Code Reviews

To make use of this feature you’ll need to have:

  • A Github repository connected to Gearset.

  • A working team-shared pipeline setup.

  • Note: we're initially supporting this for Github. Other VCS providers will follow shortly.

To enable Automatic Code Review, go to your Pipeline and open an existing PR. Open see the Automated Code Review section and click Get Started. This will create your Code Reviews workspace and kick off a one-time baseline scan of your repository.

One-time baseline scan: Code Reviews needs to do a single baseline scan before it can start giving you feedback on PRs. This initial scan will start automatically and might take a while depending on how big your repository is. We'll send an email and an in-product notification when it's done and ready to go, so you don't need to wait for this to complete.

How it works

Once the baseline scan has finished, Code Reviews will automatically scan any new PRs - or any new commits to PRs - that you promote to your chosen pipelines environment. When it's done, you'll see a summary of any issues found.

Automated Code Review

You'll see a quick overview of the scan on the pipelines environment screen. This shows you the total number of issues found in each PR, broken down by Critical, Error, and Warning.

Want to see more details? Just click the View report button. That'll take you to a new screen with a full list of everything the scan found.

A closer look at the scan

This new screen in pipelines gives you a list of every issue found in the PR, grouped by the rules they relate to. You can expand a rule to see the individual issues, and clicking on an issue shows you a preview of where it is in the code.

To narrow down the list, use the filters on the left side of the screen. You can filter by severity level to show just the issues that matter most to you.

Need to see even more? You can always visit the main Code Reviews app for the full picture. Just click More details to open that in a new tab.

For further reading on understanding scan results in the Code Reviews app read this guide.

Did this answer your question?