Guides

Security Tools

Built-in security scanning for secrets, dependencies, code vulnerabilities, and infrastructure-as-code.

Secret Scanning

QCoder includes a built-in secret scanner that detects leaked credentials in your codebase. The scanner checks for 16 common secret patterns:

PatternExample
------
AWS Access KeyAKIA...
AWS Secret Key40-character base64 string
GitHub Tokenghp_..., gho_..., ghs_...
GitHub Fine-Grained Tokengithub_pat_...
Slack Tokenxoxb-..., xoxp-...
Slack Webhookhttps://hooks.slack.com/services/...
Stripe Secret Keysk_live_..., sk_test_...
Stripe Publishable Keypk_live_..., pk_test_...
JWT TokeneyJ... (base64-encoded JSON)
Generic API Keyapi_key=..., apikey=...
Generic Secretsecret=..., password=...
Private Key-----BEGIN RSA PRIVATE KEY-----
Google API KeyAIza...
Azure Connection StringDefaultEndpointsProtocol=...
Database URLpostgresql://..., mysql://... with password
SSH Private Key-----BEGIN OPENSSH PRIVATE KEY-----

The scanner runs on-demand via the scan_secrets tool or can be triggered from the Command Palette with QCoder: Scan for Secrets.

Dependency Scanning

QCoder uses [Grype](https://github.com/anchore/grype) to scan your project's dependencies for known vulnerabilities.

How it works: 1. The AI calls the scan_dependencies tool (or you run it from the Command Palette). 2. QCoder parses your lock files (package-lock.json, yarn.lock, Pipfile.lock, Cargo.lock, etc.). 3. Dependencies are checked against vulnerability databases (NVD, GitHub Advisories, OSV). 4. Results are reported with severity levels (Critical, High, Medium, Low) and CVE identifiers.

Findings appear in the VS Code Problems panel and are formatted using SARIF (Static Analysis Results Interchange Format) for easy integration with CI/CD pipelines.

Code Security Scanning (SAST)

Static Application Security Testing identifies common vulnerability patterns in your source code:

  • SQL injection
  • Cross-site scripting (XSS)
  • Path traversal
  • Command injection
  • Insecure deserialization
  • Hardcoded credentials
  • Weak cryptographic usage

The scanner uses pattern matching and data-flow analysis to detect potential issues. Results include the file location, a description of the vulnerability, and suggested remediation steps.

Infrastructure-as-Code Scanning

The scan_iac tool checks your infrastructure configuration files for security misconfigurations:

  • Terraform -- Checks for public S3 buckets, open security groups, missing encryption.
  • Docker -- Checks for running as root, exposed ports, secrets in build args.
  • Kubernetes -- Checks for privileged containers, missing resource limits, default service accounts.
  • CloudFormation -- Checks for insecure resource configurations.

This helps catch security issues before they make it to production.

Security Dashboard

All security findings from all scanners are aggregated and reported through:

  1. VS Code Problems Panel -- Findings appear as warnings or errors with file locations. Click to navigate directly to the issue.
  2. SARIF Output -- Machine-readable output compatible with GitHub Code Scanning, Azure DevOps, and other CI/CD tools.
  3. Chat Summary -- When the AI runs security tools, it provides a summary of findings with severity counts and recommended actions.

You can configure scan exclusions (e.g., test files, vendor directories) in your project's .qcoderrules file.