Home / Docs / Code Guardian
🛡️

Code Guardian Static Code Analyzer

Security & Code Quality ● Live in Extension

Real-time static code analysis for Apex and Lightning Web Components. Automatically detects security vulnerabilities, governor limit hazards, and architectural anti-patterns.

⚡ 1. Overview & Architecture

Real-time static code analysis for Apex and Lightning Web Components. Automatically detects security vulnerabilities, governor limit hazards, and architectural anti-patterns.

Client-Side Security & Zero Proxying: All requests made by this tool run directly against your authenticated Salesforce organization using the current session. No credentials, schema data, or record contents ever leave your browser.

🧭 2. Step-by-Step Workflow

Follow these steps to get maximum velocity with Code Guardian:

1

Select Component

Choose an Apex class or trigger to scan, or paste code directly into the editor.

2

Run Analysis

Click Run Scan to perform automated static rule evaluations.

3

Remediate Findings

Click findings in the left panel to jump to the code line and review remediation advice.

🛠️ 3. Key Capabilities & Superpowers

🛡️

Enterprise Security Rules

Detects SOQL injection, Cross-Site Scripting (XSS), missing CRUD/FLS checks, and hardcoded credentials.

🔄

Governor Limit Rules

Detects SOQL queries inside loops, DML statements in loops, and excessive heap operations.

📌

Interactive Gutter Markers

Issues are flagged directly in Monaco Editor gutters with High, Medium, and Low severity badges.

🎯

Click-to-Jump Navigation

Click any rule violation in the issue panel to jump directly to the offending line of code.

💡 4. Pro Tips & Keyboard Shortcuts

  • Filter findings by severity (High, Medium, Low) to prioritize critical security flaws first.
  • Hover over any marked line in Monaco to view the violation explanation and recommended code pattern.

Explore More SF Lens Pro Guides

Discover how other integrated studio tools can accelerate your Salesforce development and administrative workflows.

All 33 Documentation Guides 📚 Interactive Feature Explorer ⚡