CodeFrog
Code Analysis Tools and Features
← Back to CodeFrog

Code Analysis

CodeFrog’s Code Analysis feature provides comprehensive code quality and security analysis for your codebase. It combines static analysis, line counting, secrets detection, and dependency vulnerability scanning to give you a complete picture of your code’s health.

Overview

Code Analysis helps you:

Accessing Code Analysis

Access: Navigation → Analyze (requires open project)

Code Analysis requires an open project in CodeFrog. You can analyze both local projects and remote projects (via SSH), though local projects provide the best performance and most complete results.

Features

Line Counting

CodeFrog provides intelligent line counting with automatic exclusions for build artifacts and generated files:

Static Analysis

CodeFrog integrates with industry-standard static analysis tools to find code quality issues and security vulnerabilities:

What Static Analysis Finds

Secrets Detection

CodeFrog uses Gitleaks to scan your codebase for accidentally committed secrets:

See Secrets Detection for detailed information on secrets scanning.

OSV Integration

CodeFrog integrates with the Open Source Vulnerabilities (OSV) database to scan your dependencies:

See OSV / Supply Chain Security for detailed information on vulnerability scanning.

Running Code Analysis

Basic Analysis

  1. Open Your Project: Ensure a project is open in CodeFrog
  2. Navigate to Analyze: Click Analyze in the navigation menu
  3. Select Analysis Type: Choose which analyses to run:
    • Line Counting
    • Static Analysis (Semgrep)
    • Secrets Detection (Gitleaks)
    • OSV Vulnerability Scanning
  4. Run Analysis: Click the run button to start analysis
  5. Review Results: View findings organized by severity and type

Analysis Options

You can run individual analyses or combine them:

Interpreting Results

Severity Levels

Findings are categorized by severity:

Result Categories

Line Counting Results

Static Analysis Results

Each finding includes:

Secrets Detection Results

Each secret finding includes:

OSV Vulnerability Results

Each vulnerability includes:

Best Practices

Regular Analysis

Addressing Findings

  1. Prioritize by Severity: Fix critical and high-severity issues first
  2. Review Context: Understand why a finding was flagged before fixing
  3. Test After Fixes: Verify that fixes don’t introduce new issues
  4. Update Dependencies: Keep dependencies updated to avoid vulnerabilities

False Positives

Some findings may be false positives:

Mark false positives to exclude them from future scans.

Integration with Mega Report

Code Analysis is integrated into CodeFrog’s Mega Report, which combines:

Running a Mega Report gives you a comprehensive view of both your web application and codebase health in a single report with an overall A-F health grade.

See Mega Report for more information.

Export and Reporting

Code Analysis results can be exported for:

Limitations

Project Requirements

Analysis Scope

Troubleshooting

Analysis Not Running

Missing Results

Slow Performance