Guardian now includes a comprehensive suppression and audit tracking system for managing false positives with full compliance and record-keeping capabilities.
- Location:
.vscode/guardian-suppressions.json(workspace local, gitignored) - Purpose: Working suppression rules for current development session
- Contains: File path, line number, pattern, reason, timestamp, username, review status
Format:
[
{
"id": "path/to/file.js:45:password",
"filePath": "path/to/file.js",
"lineNumber": 45,
"pattern": "password",
"reason": "Mock data for testing",
"timestamp": 1708123456789,
"severity": "high",
"suppressedBy": "maneesh_thakur",
"reviewStatus": "pending",
"expiryDate": null
}
]- Location:
SUPPRESSIONS_AUDIT.md(can be committed to git) - Purpose: Historical record of ALL suppression actions (suppress/unsuppress/review)
- Format: Markdown for easy reading and git tracking
Example Audit Log:
# Guardian Suppressions Audit Log
This file tracks all finding suppressions for security and compliance purposes.
- **SUPPRESS** | path/to/file.js:45 | 2026-02-17T10:30:00Z | User: maneesh_thakur | Reason: Mock data for testing
- **SUPPRESS** | config/db.js:12 | 2026-02-17T10:31:15Z | User: john_doe | Reason: Localhost dev credentials
- **UNSUPPRESS** | path/to/file.js:45 | 2026-02-17T11:00:00Z | User: maneesh_thakur | Comment: Fixed in code review
- **REVIEW** | config/db.js:12 | 2026-02-17T15:30:00Z | User: security_reviewer | Comment: Approved for dev environmentVia Tree View (Recommended):
- Right-click finding in Guardian Security sidebar
- Click "Suppress Finding (Mark as False Positive)"
- Enter reason:
"Mock data for auth tests" - ✅ Stored with:
- Your username (auto-detected from
$env:USERNAME) - Current timestamp
- Review status:
pending
- Your username (auto-detected from
Via Command Palette:
Ctrl+Shift+P→Guardian: Suppress Finding
When you suppress, the system:
- ✅ Saves to
.vscode/guardian-suppressions.json(working file) - ✅ Appends to
SUPPRESSIONS_AUDIT.md(permanent record) - Tracks: username, timestamp, file, reason, action type
All Suppressions:
Ctrl+Shift+P→Guardian: View Suppressed Findings- Shows: pattern, file, reason
- Options: View File, Unsuppress
Suppression Report:
Ctrl+Shift+P→Guardian: View Suppression Report- Shows: Statistics by severity, by user, by file
- Use for compliance/auditing
Pending Review (30+ days):
Ctrl+Shift+P→Guardian: Review Pending Suppressions- Alerts if any suppressions older than 30 days need review
- Check
SUPPRESSIONS_AUDIT.mdfor historical record
Each suppression has a status:
- ✅ pending - Newly suppressed, awaiting review
- ✅ reviewed - Verified by team/security
- ✅ expired - Scheduled for removal
{
id: string; // Unique identifier: file:line:pattern
filePath: string; // Path to file with false positive
lineNumber: number; // Line number of finding
pattern: string; // Security pattern matched
reason: string; // Why it's suppressed (user provided)
timestamp: number; // When suppressed (milliseconds)
severity: string; // critical, high, medium, low
suppressedBy: string; // Username who suppressed it
reviewStatus: string; // pending, reviewed, expired
expiryDate?: number; // Optional expiration date
}When you suppress a finding:
✓ Action: SUPPRESS
├─ File: src/auth/oauth.js
├─ Line: 23
├─ Pattern: api_key
├─ Reason: "Mock OAuth key for tests"
├─ Timestamp: 2026-02-17T10:30:45Z
├─ User: maneesh_thakur
├─ Severity: critical
└─ Review Status: pending → [30 days] → needs review
- ❌ Bad: "test data"
- ✅ Good: "Mock AWS key used in unit tests - not production"
- Long-lived suppressions > 30 days trigger alerts
- Use
Guardian: Review Pending Suppressionscommand - Update review status in audit log
- ✅ DO commit
SUPPRESSIONS_AUDIT.mdto git - ✅ Shows team what was suppressed and why
- ❌ DON'T commit
.vscode/guardian-suppressions.json(it's gitignored)
- Regularly unsuppress findings that were fixed in code
- This keeps the audit log clean
- When unsuppressing, add comment:
"Fixed in PR #123"
- Team members see suppression history in git
- Suppressions tied to username automatically
- Enables accountability and security reviews
| Command | Purpose | Output |
|---|---|---|
| Guardian: Suppress Finding | Suppress single finding | Stores in JSON + Audit Log |
| Guardian: View Suppressed Findings | List all suppressions | Quick pick interface |
| Guardian: View Suppression Report | Statistics dashboard | Markdown report |
| Guardian: Review Pending Suppressions | Check 30+ day old suppressions | Alert message |
- Check
SUPPRESSIONS_AUDIT.mdin git history - Verify all suppressions have clear reasons
- Review who suppressed what and when
- Identify suppressions needing re-evaluation
- Generate suppression report:
Guardian: View Suppression Report - Ensure critical/high suppressions are reviewed
- Document in release notes any active suppressions
- Archive audit log for compliance
File: test/fixtures/oauth-keys.json
Reason: "Mock keys for integration tests - not production use"
Status: pending → reviewed after security check
Audit: Shows suppression date and reviewer
File: .env.development
Reason: "Local dev environment on 127.0.0.1 - no external access"
Status: pending → reviewed by DevOps team
Audit: Documents team review and approval
File: legacy/config.js
Reason: "Scheduled for refactoring in Q2 - ticket #456"
Status: pending → needs review after 30 days
Audit: Tracks when refactoring deadline should be checked
- Automatically reads from
$env:USERNAME(Windows) - Falls back to
$env:USER(Linux/Mac) - Enables personal accountability for suppressions
- Stored as milliseconds since epoch
- Displayed as ISO 8601 in audit log
- Enables 30-day review tracking
- Never overwrites, only appends
- Preserves complete history
- Each action is immutable record
- Perfect for compliance audits
| Issue | Solution |
|---|---|
| Audit log not created | Check write permissions in project root |
| Suppressions not persisting | Verify .vscode/ directory exists and is writable |
| Username showing as "unknown" | Check $env:USERNAME environment variable |
| Can't find SUPPRESSIONS_AUDIT.md | Generate it by suppressing first finding |
- Start suppressing false positives using the tree view
- Monitor the audit log file for compliance
- Review pending suppressions at 30-day intervals
- Commit audit log to preserve team history
- Audit regularly for security best practices