GitSniff LogoGitSniffDocs
FeaturesCode Review

How It Works

Understand GitSniff's multi-step code review analysis pipeline.

GitSniff's code review follows a sophisticated multi-step pipeline designed to provide thorough, accurate feedback.

Step 1: Pre-analysis

When a PR is created or updated, a fast AI model quickly scans the changes to:

  • Assess the overall risk level of the changes
  • Identify which types of issues might be present
  • Recommend which security scanning tools should run
  • Determine the optimal model for deep analysis

This step uses a lightweight model to keep costs low and response times fast.

Step 2: Security scanning

Based on pre-analysis recommendations, GitSniff runs the appropriate security tools in parallel:

ToolWhat it scans
BearerSensitive data exposure, API keys, credentials
SemgrepCode patterns, anti-patterns, language-specific issues
TrivyDependency vulnerabilities, container security
LintCode style and formatting issues

Only relevant tools are run based on the changes in the PR, keeping scan times minimal.

Step 3: AI analysis

The selected AI model performs a comprehensive review that considers:

  • The code diff (added, modified, and removed lines)
  • Security scan results from Step 2
  • Repository context (if enabled)
  • Custom instructions (if configured)
  • The programming language and framework being used

The model produces:

  • A risk score (0-100)
  • Categorized findings (bugs, security, performance, style)
  • Suggested improvements with code examples
  • An overall assessment

Step 4: Results delivery

GitSniff delivers the results back to your pull request:

  • Inline comments on specific lines of code
  • PR summary in the pull request description
  • Status check (clean, issues, or critical)
  • Review comment with the full analysis

Model selection

GitSniff can automatically select the best model based on PR size:

PR SizeTypical model tierUse case
Small (< 100 lines)FlashQuick changes, typo fixes
Medium (100-500 lines)BalancedFeature additions, refactors
Large (500+ lines)PowerfulMajor features, architecture changes

You can override this with manual model selection or configure size-based preferences in your settings.