Aegis Policy ScannerAegis Policy Scanner is a VS Code extension that scans your workspace files for policy violations using the Aegis policy engine by Pegasys.ai. Features
🚀 GitHub Copilot IntegrationAegis Scanner integrates with GitHub Copilot through Language Model Tools (MCP) and a dedicated @aegis Chat Participant. Quick Start
Two Ways to Interact🎯 Method 1:
|
| Tool | Purpose | Auto-Invoked When |
|---|---|---|
aegis_get_violations |
Get violations (optional file filter) | Asking about issues/violations |
aegis_get_scan_summary |
Get scan statistics | Asking about results/summary |
aegis_get_configuration |
Get scanner config | Asking about policies/settings |
aegis_generate_file_fixes |
Generate file fixes | Asking to fix specific files |
Note: You don't invoke these tools directly. Copilot and @aegis select them automatically.
Requirements
- An Aegis API token from Pegasys.ai
- A
.aegis.yamlconfiguration file in your workspace root - (Optional) GitHub Copilot for AI-powered fix suggestions
.aegis.yaml Configuration
Create a .aegis.yaml file in your workspace root:
aegis_host: platform.aegis.pegasys.cloud
policies:
- name: security_policy
file_patterns:
- "**/*.json"
- "**/*.yaml"
- "**/*.tf"
api_config:
# DO NOT CHANGE THIS LINE - it is required for proper functioning
endpoint: "https://{{aegis_host}}/api/eval/policies/{{policy_name}}"
labels:
environment: production
team: platform-security
project: your-project-name
region: us-west-2
compliance_level: high
proxy:
http_proxy: http://proxy.company.com:8080
https_proxy: http://proxy.company.com:8080
no_proxy: localhost,127.0.0.1,.local
Proxy Configuration
The extension supports HTTP and HTTPS proxy configuration through the .aegis.yaml file:
http_proxy: URL for HTTP proxy (e.g.,http://proxy.company.com:8080)https_proxy: URL for HTTPS proxy (e.g.,http://proxy.company.com:8080)no_proxy: Comma-separated list of hosts to bypass proxy (e.g.,localhost,127.0.0.1,.local)
Proxy URLs can include authentication credentials:
proxy:
http_proxy: http://username:password@proxy.company.com:8080
https_proxy: http://username:password@proxy.company.com:8080
Labels Configuration
The labels field allows you to add custom key-value pairs that will be included in API calls for enhanced metadata and filtering:
labels:
environment: production
team: platform-security
project: your-project-name
region: us-west-2
compliance_level: high
business_unit: engineering
cost_center: "12345"
Labels are optional and can contain any string values. Label keys must contain only alphanumeric characters, hyphens, and underscores.
Use Cases for Labels
Labels can be used for:
- Environment Identification:
environment: production,environment: staging - Team Attribution:
team: platform-security,team: devops - Project Tracking:
project: my-app,project_id: PROJ-123 - Compliance Levels:
compliance_level: high,compliance_level: pci-dss - Geographic Information:
region: us-west-2,datacenter: aws - Business Context:
business_unit: engineering,cost_center: "12345"
Label Validation Rules
- Keys: Must contain only letters, numbers, hyphens (
-), and underscores (_) - Values: Can be any string (including numbers, special characters)
- Optional: Labels section is completely optional
- Security: Keys are validated to prevent injection attacks
Example with various label types:
labels:
simple_label: value
numeric_value: "12345"
hyphenated-key: allowed
underscore_key: also_allowed
complex_value: "Special chars: @#$%^&*()"
Extension Settings
This extension contributes the following settings:
aegisScanner.allowSelfSignedCerts: Allow self-signed SSL certificates (NOT RECOMMENDED for production, default:false)
Security
This extension implements comprehensive security measures including SSL/TLS enforcement, input validation, SSRF protection, and secure API token storage. For detailed security information, see SECURITY.md.
Usage
- Set your API token: Run command
Aegis: Set API Token - Create a
.aegis.yamlconfiguration file in your workspace - Run command
Aegis: Scan Workspaceor click the Aegis icon in the status bar - View results in the Output panel and Problems panel
Enjoy scanning with Aegis!
Copyright © 2025 Pegasys.ai (www.pegasys.ai). All rights reserved.