Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>CodeQlAINew to Visual Studio Code? Get it now.
CodeQlAI

CodeQlAI

CodeQLPC

|
1 install
| (0) | Free
Fix CodeQL issues
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CQL Agent - AI-Powered Security Fix Engine

A VS Code extension that automatically detects and fixes security vulnerabilities in your code using advanced machine learning. It analyzes CodeQL SARIF files and applies intelligent fixes with cross-file change detection.

CQL Agent Banner

Key Features

  • One-Click Security Fixes - Fix vulnerabilities automatically with ML-powered analysis
  • Smart Cross-File Detection - Identifies and fixes related changes across multiple files
  • Confidence Scoring - Shows how reliable each fix is with clear metrics
  • Comprehensive Reporting - Get detailed summaries of fixed and manual review issues
  • Bulk Fix Operations - Fix multiple issues at once with consistent behavior

Quick Start

  1. Install the extension from VS Code marketplace
  2. Import a SARIF file using ADO Bug ID or repository name
  3. Analyze vulnerabilities with a single click
  4. Apply automatic fixes for high-confidence issues
  5. Review suggested changes for lower-confidence issues

Prerequisites

  • VS Code 1.85.0+
  • Python 3.x (for ADO integration)
  • Active workspace folder

Usage

Get a SARIF File

@cql-agent

Then choose:

  • Enter ADO Bug ID - For Azure DevOps bugs
  • Enter Repository Name - For CodeQL Portal downloads

Fix Security Issues

  1. After importing a SARIF file, click Analyze & Fix Issues
  2. For individual issues, click Fix This Issue
  3. For all issues, click Fix All Issues
  4. Review results and apply any suggested cross-file changes

Key Commands

  • @cql-agent - Show main menu
  • @cql-agent /get-sarif <id> - Download SARIF by ID
  • @cql-agent /cql-fix - Analyze and fix issues
  • @cql-agent /fix-all-issues - Fix all analyzable issues
  • @cql-agent /ml-stats - View ML performance stats

How It Works

Confidence-Based Fix System

The extension uses ML to determine how reliably it can fix each issue:

  • High Confidence (≥65%): Automatically applied
  • Medium Confidence (40-65%): Manual review suggested
  • Low Confidence (<40%): Marked for developer review

Cross-File Change Detection

When a fix affects multiple files:

  1. The primary fix is applied first
  2. Related file changes are detected and listed
  3. A button appears to apply all related changes
  4. One click updates all affected files

Supported Vulnerability Types

Automatically Fixed Requires Manual Review
Input validation Complex architectural issues
Buffer overflows Business logic vulnerabilities
Null pointers Domain-specific issues
Unsafe function calls Multi-approach cases
Memory leaks Low-confidence fixes

Troubleshooting

  • SARIF file not found: Ensure file is in Downloads and monitoring is enabled
  • Fix failed: Some complex issues need manual review - check confidence scores
  • No issues found: Verify SARIF file contains valid analysis results
  • Cross-file changes not applying: Check file paths and permissions

Performance Metrics

The ML system continuously improves by learning from:

  • Successful and failed fix attempts
  • Pattern recognition across vulnerabilities
  • Context-aware fix strategy selection

View detailed stats with @cql-agent /ml-stats

Release Notes

1.2.0 (Current)

  • NEW: Cross-file change detection and application
  • NEW: One-click related file updates
  • IMPROVED: Dependency tracking and resolution
  • FIXED: Consistent behavior between individual and bulk fixes

1.1.0

  • ML-enhanced fix confidence scoring
  • Intelligent fix strategies
  • Learning system improvements

Support

If you encounter issues:

  1. Check the "CQL Fix Results" output channel
  2. Review fix confidence scores and decisions
  3. Ensure your workspace has the correct repository

Enjoy secure coding with CQL Agent!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft