SDK Integration Guide
Integrate AegisComply into your development workflow in minutes. Catch hardcoded secrets, unencrypted PII, and compliance violations before they reach production — directly in your IDE, CI pipeline, and code review process.
1 Overview
The AegisComply SDK is a compliance-as-code layer that runs wherever your developers write code. It ships as two components:
- IDE Plugin Real-time scanning as you type in VS Code or any JetBrains IDE.
- CLI / CI Scanner Scriptable scan command for pipelines, pre-commit hooks, and pull-request gates.
Both read from the same shared rule set, so a rule added once surfaces in every channel.
The SDK can run in local-only mode with no network calls. Set apiKey to empty to use this mode — findings are shown inline but not synced to your AegisComply dashboard.
2 Prerequisites
- 1An AegisComply account — create one free.
- 2Node.js 18+ (for the CLI scanner) or your JetBrains / VS Code IDE.
- 3An API key from your dashboard (Settings → API Keys). Required only if you want findings synced to the platform.
- 4Git installed and a project repository to scan.
3 Installation
Choose the installation path that matches your workflow:
Option A — VS Code Extension
Open the Extensions panel in VS Code, search for AegisComply Compliance Scanner, and click Install. Alternatively, run:
code --install-extension aegiscomply.compliance-scanner
Option B — JetBrains Plugin
Go to Settings → Plugins → Marketplace, search for AegisComply Compliance Scanner, and install. Restart the IDE when prompted.
Option C — CLI (npm)
Install the CLI globally or as a dev dependency in your project:
# Install as a dev dependency npm install --save-dev @aegiscomply/scanner
yarn add --dev @aegiscomply/scanner
pnpm add -D @aegiscomply/scanner
4 API Key Setup
Your API key authenticates the scanner with your AegisComply workspace and syncs findings to the dashboard.
- 1Log in to your dashboard and navigate to Settings → API Keys.
- 2Click Generate New Key, give it a descriptive name (e.g. CI Pipeline), and copy the value.
- 3Store the key as an environment variable — never commit it to source control.
AEGISCOMPLY_API_KEY=ac_live_xxxxxxxxxxxxxxxxxxxx
Never hardcode your API key in config files or source code. Use environment variables or your CI/CD secrets manager (GitHub Secrets, GitLab CI Variables, AWS SSM, etc.).
5 Configuration
Create an aegiscomply.config.json file in the root of your repository. Both the IDE plugin and the CLI scanner read from this file automatically.
{
"frameworks": ["soc2", "gdpr"],
"severityThreshold": "medium",
"apiKey": "${AEGISCOMPLY_API_KEY}",
"enableRealtime": true,
"scanOnSave": true,
"exclude": ["node_modules", "dist", "*.test.*"]
}
Use "${ENV_VAR}" syntax in the config to read values from environment variables at runtime — keeps secrets out of the file.
6 IDE Plugins
After installing the plugin and adding your config file, the scanner activates automatically. No extra setup is needed.
VS Code — extension settings
Open Settings → Extensions → AegisComply or add directly to your workspace settings:
{
"aegiscomply.frameworks": ["soc2", "gdpr"],
"aegiscomply.severityThreshold": "medium",
"aegiscomply.enableRealtime": true,
"aegiscomply.scanOnSave": true
}
JetBrains — plugin settings
Navigate to Settings → Tools → AegisComply. The plugin reads aegiscomply.config.json from the project root; individual fields can be overridden in the IDE settings panel.
Findings appear inline as squiggly underlines. Hover any underlined token for a description, the severity level, and the specific compliance control it violates (e.g. SOC 2 CC6.1 or GDPR Art. 32).
7 CI/CD Pipeline Integration
Run aegiscomply scan as a pipeline step to block PRs that introduce compliance violations above your configured threshold.
name: Compliance Scan on: [push, pull_request] jobs: scan: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: "20" - run: npm install --save-dev @aegiscomply/scanner - run: npx aegiscomply scan --fail-on high env: AEGISCOMPLY_API_KEY: ${{ secrets.AEGISCOMPLY_API_KEY }}
compliance-scan: stage: test image: node:20 script: - npm install --save-dev @aegiscomply/scanner - npx aegiscomply scan --fail-on high variables: AEGISCOMPLY_API_KEY: $AEGISCOMPLY_API_KEY
repos: - repo: local hooks: - id: aegiscomply name: AegisComply Compliance Scan entry: npx aegiscomply scan --staged language: node pass_filenames: false
CLI flags
| Flag | Description |
|---|---|
| --fail-on <severity> | Exit with code 1 if any finding meets or exceeds this severity. Values: low medium high critical |
| --staged | Scan only files staged for commit (pre-commit mode). |
| --output <format> | Output format: text (default), json, sarif (for GitHub code scanning). |
| --framework <id> | Override the frameworks to check. Comma-separated: soc2,gdpr,hipaa. |
| --no-sync | Skip syncing results to the AegisComply platform (offline mode). |
8 Supported Frameworks & Languages
The scanner works across all major languages and compliance frameworks out of the box.
Languages
Compliance Frameworks
| ID | Standard | Example Controls |
|---|---|---|
| soc2 | SOC 2 Type II | CC6.1, CC6.7, CC7.2 |
| gdpr | GDPR | Art. 5, Art. 25, Art. 32, Art. 35 |
| hipaa | HIPAA Security Rule | §164.312(a)(2)(iv), §164.312(b) |
| iso27001 | ISO/IEC 27001:2022 | A.9.4.3, A.10.1.1, A.12.4.1 |
| pci-dss | PCI DSS v4 | Req 3.4, Req 3.5, Req 10.3 |
9 How Scanning Works
The scanner runs entirely locally using a pattern-matching engine. Three categories of rules are evaluated on every file:
SECRETS — Hardcoded credentials
Detects credentials that should never appear in source code: AWS keys, GitHub tokens, Stripe keys, JWT secrets, database connection strings, private keys, and more.
PII — Personal & sensitive data
Flags PII fields (SSN, email, phone, date of birth), PHI fields (diagnosis, patient ID, prescriptions), and payment card data (card number, CVV, PAN) that are stored, transmitted, or handled without encryption or masking.
LOG — Sensitive data in logs
Catches PII, PHI, secrets, and raw request/response bodies passed to any logging function (console.log, logger.*, print, etc.).
Every finding includes a rule ID (e.g. SECRETS-002), severity, a plain-language description, and the specific compliance control IDs it violates — with a direct link to the control detail page in your dashboard.
10 Suppressing Warnings
Some findings are intentional (test fixtures, local dev passwords). Suppress them with an inline comment on the line before the flagged code.
// aegiscomply-disable-next-line LOG-001 console.log(user.email) // Suppress all rules on the next line // aegiscomply-disable-next-line all const config = loadLegacyConfig()
# aegiscomply-disable-next-line SECRETS-006 password = "dev-only-password" # aegiscomply-disable-next-line all config = load_legacy_config()
// aegiscomply-disable-next-line PII-001 String ssn = record.getSsn();
All suppressions are captured and visible in your compliance dashboard. Auditors can review suppressed findings and their justifications during a SOC 2 or ISO 27001 audit.
11 Compliance Framework Mapping
Every rule maps to one or more specific control IDs across all supported frameworks. When a finding is surfaced, the SDK includes the exact controls violated — making it directly actionable for auditors and compliance managers.
| Rule Category | SOC 2 | GDPR | HIPAA | ISO 27001 | PCI DSS |
|---|---|---|---|---|---|
| SECRETS-* | CC6.1, CC6.7 | Art. 32 | §164.312(a)(2)(iv) | A.9.4.3, A.10.1.1 | Req 3.4, 3.5 |
| PII-* | CC6.1 | Art. 5, 25, 35 | §164.312(e)(2)(ii) | A.13.2.3 | Req 3.4 |
| LOG-* | CC7.2 | Art. 5 | §164.312(b), §164.528 | A.12.4.1 | Req 10.3 |
Click any control ID in your dashboard findings to open the full control detail page, including remediation guidance and evidence requirements.
12 Configuration Reference
| Key | Type | Default | Required | Description |
|---|---|---|---|---|
| frameworks | string[] |
["soc2"] |
Optional | Compliance frameworks to check. Rules and control references are filtered to these. Values: soc2 gdpr hipaa iso27001 pci-dss |
| severityThreshold | string |
"medium" |
Optional | Minimum severity to surface. Findings below this level are suppressed. Values: low medium high critical |
| apiKey | string |
"" |
Optional | AegisComply API key. Leave empty for local-only mode (findings shown inline, not synced to platform). |
| apiEndpoint | string |
"https://api.aegiscomply.io/v1" |
Optional | API endpoint. Change only for self-hosted deployments. |
| enableRealtime | boolean |
true |
Optional | Scan as you type in the IDE (debounced at 500 ms). Has no effect in CLI mode. |
| scanOnSave | boolean |
true |
Optional | Run a full file scan automatically on each save event in the IDE. |
| exclude | string[] |
["node_modules"] |
Optional | Glob patterns for files and directories to exclude from scanning. |
13 Rule Reference
SECRETS — Hardcoded Credentials
| Rule ID | Severity | What It Catches |
|---|---|---|
| SECRETS-001 | High | High-entropy string in a secret-named variable |
| SECRETS-002 | Critical | AWS Access Key ID (AKIA...) |
| SECRETS-003 | Critical | GitHub Personal Access Token (ghp_...) |
| SECRETS-004 | Critical | Stripe Live Secret Key (sk_live_...) |
| SECRETS-005 | High | JWT secret hardcoded inline |
| SECRETS-006 | Critical | Hardcoded password / passwd / pwd |
| SECRETS-007 | Critical | Database connection string with embedded credentials |
| SECRETS-008 | Critical | PEM private key block in source file |
PII — Personal & Sensitive Data
| Rule ID | Severity | What It Catches |
|---|---|---|
| PII-001 | High | PII field (SSN, email, phone, DOB…) stored without encryption |
| PII-002 | High | PII field transmitted in an HTTP request |
| PII-003 | High | PII field written to a file without encryption |
| PII-004 | Critical | PHI field (diagnosis, patient_id, prescription…) in plain context |
| PII-005 | Critical | Payment card field (card_number, CVV, PAN…) not masked |
LOG — Sensitive Data in Logs
| Rule ID | Severity | What It Catches |
|---|---|---|
| LOG-001 | High | PII field passed to console.log / logger.* / print |
| LOG-002 | Critical | Secret or credential variable passed to any log call |
| LOG-003 | Medium | Full req.body / response.data object logged |
| LOG-004 | Critical | PHI field in any log statement |
| LOG-005 | Critical | Payment card data in any log statement |