-
Notifications
You must be signed in to change notification settings - Fork 0
Vulnerability Scanning
Comprehensive guide to scanning, triaging, and remediating container vulnerabilities.
- How Scanning Works
- Running Scans
- Understanding Results
- Vulnerability Triage
- KEV Tracking
- Remediation
- Scan History
VulnForge uses Trivy (Aqua Security) for vulnerability scanning:
- Image Analysis: Trivy examines container images layer-by-layer
- Package Detection: Identifies OS packages and language dependencies
- Database Matching: Compares against vulnerability databases
- CVSS Scoring: Assigns severity based on Common Vulnerability Scoring System
- KEV Matching: Checks against CISA Known Exploited Vulnerabilities
Operating System Packages:
- Alpine APK packages
- Debian/Ubuntu APT packages
- Red Hat/CentOS RPM packages
- Amazon Linux packages
Language Dependencies:
- Node.js (
package.json,package-lock.json) - Python (
requirements.txt,Pipfile,poetry.lock) - Go (
go.mod,go.sum) - Rust (
Cargo.toml,Cargo.lock) - PHP (
composer.json,composer.lock) - Ruby (
Gemfile,Gemfile.lock) - Java (
pom.xml,build.gradle)
Secret Detection (if enabled):
- API keys
- Passwords
- Tokens
- Private keys
- AWS credentials
- Database connection strings
- Navigate to Containers page
- Click "Scan All" button
- Monitor progress in Scans page
# Via API
curl -X POST http://localhost:8787/api/scan/all- Navigate to Containers page
- Find container in list
- Click "Scan" button
# Via API
curl -X POST http://localhost:8787/api/scan/container/123Configure automatic scanning in Settings → Scan Settings:
Scan Schedule: Cron expression
-
0 2 * * *- Daily at 2 AM -
0 2 * * 0- Weekly on Sunday at 2 AM -
0 2 1 * *- Monthly on 1st at 2 AM
Scan Parameters:
- Scan Timeout: Maximum time per container (default: 300s)
- Parallel Scans: Concurrent scans (default: 3)
Monitor scans via Server-Sent Events (SSE):
Navigate to Scans page to see:
- Current scan status (queued, running, completed, failed)
- Progress percentage
- Vulnerabilities discovered
- Scan duration
- Real-time updates (no refresh needed)
Each vulnerability includes:
| Field | Description |
|---|---|
| CVE ID | Common Vulnerabilities and Exposures identifier |
| Severity | Critical, High, Medium, Low (CVSS-based) |
| CVSS Score | Numeric score (0.0-10.0) |
| Package Name | Affected package or library |
| Installed Version | Current version in container |
| Fixed Version | Version with patch (if available) |
| Is Fixable | Whether patch exists |
| Title | Brief vulnerability description |
| KEV | CISA Known Exploited Vulnerability indicator |
Critical (CVSS 9.0-10.0):
- Remote code execution
- Privilege escalation
- Authentication bypass
- Action: Patch immediately
High (CVSS 7.0-8.9):
- SQL injection
- Cross-site scripting (XSS)
- Denial of service (DoS)
- Action: Patch within days
Medium (CVSS 4.0-6.9):
- Information disclosure
- Partial DoS
- Low-impact XSS
- Action: Plan remediation
Low (CVSS 0.1-3.9):
- Minor information leaks
- Unlikely attack vectors
- Action: Monitor and review
View per-container metrics:
- Total vulnerabilities
- Fixable count
- Severity distribution (Critical, High, Medium, Low)
- Last scan timestamp
- KEV matches
- Review - Assess vulnerability impact
- Classify - Determine actual risk to your environment
- Mark Status - Apply triage label
- Document - Add notes for future reference
Open (default):
- Newly discovered vulnerability
- Requires review
Accepted:
- Risk acknowledged
- Remediation planned or in progress
- Not a false positive
False Positive:
- Vulnerability doesn't apply to your environment
- Scanner incorrectly identified issue
- Package not actually used
Ignored:
- Low priority or low impact
- Accepted risk (documented reason)
- Won't fix (end-of-life software)
- Navigate to Vulnerabilities page
- Click on vulnerability to view details
- Select triage status dropdown
- Choose status:
Open,Accepted,False Positive,Ignored - Add notes (optional but recommended)
- Save
Bulk Triage:
- Select multiple vulnerabilities
- Apply same status to all selected
- Useful for false positive patterns
What is KEV?
- Catalog maintained by CISA (Cybersecurity and Infrastructure Security Agency)
- Lists CVEs with confirmed active exploitation
- Highest priority for remediation
Navigate to Settings → KEV Settings:
- KEV Checking Enabled: Toggle on
- KEV Cache Hours: How long to cache KEV data (default: 12 hours)
🚨 KEV Badge appears on:
- Dashboard metrics
- Vulnerability lists
- Container summaries
- Scan results
Configure in Settings → Notifications:
- Alert immediately when KEV detected
- Higher priority than severity thresholds
Most effective approach:
# Before
FROM node:18-alpine
# After (patch CVE-2024-12345)
FROM node:18.20.1-alpineSteps:
- Check for newer image version
- Update Dockerfile
- Rebuild image
- Test thoroughly
- Deploy updated container
- Re-scan to verify
For language dependencies:
// Before (package.json)
{
"dependencies": {
"axios": "0.21.0" // CVE-2021-3749
}
}
// After
{
"dependencies": {
"axios": "0.21.2" // Patched version
}
}Steps:
- Identify fixed version from vulnerability details
- Update package manifest
- Rebuild image
- Test compatibility
- Deploy and re-scan
For OS packages (Alpine example):
# Before
RUN apk add --no-cache curl
# After (pin to patched version)
RUN apk add --no-cache curl=8.5.0-r0When patch doesn't exist:
- Isolate: Network segmentation
- Monitor: Enhanced logging
- Compensate: WAF rules or runtime protection
- Accept Risk: Document decision
- Mark as Accepted in VulnForge
VulnForge groups vulnerabilities by package for efficient remediation:
Example:
Package: openssl
Installed: 1.1.1k
Fixed: 1.1.1w
Vulnerabilities Fixed (12):
- CVE-2024-0001 (Critical)
- CVE-2024-0002 (High)
- CVE-2024-0003 (High)
...
Action: Update openssl to 1.1.1w
Single package update resolves multiple CVEs.
Navigate to Scans page:
- All historical scans
- Filter by container
- Filter by date range
- Filter by status (completed, failed)
Click on scan to view:
- Scan ID
- Container name
- Start/finish timestamp
- Duration
- Total vulnerabilities found
- Severity breakdown
- Scan logs (if failed)
Compare two scans to see:
- New vulnerabilities discovered
- Vulnerabilities remediated
- Net change in security posture
Configure in Settings → Data Retention:
- Keep Scan History Days: How long to retain scan records (default: 90 days)
Older scans are automatically purged to save disk space.
Create regex patterns to auto-mark false positives:
Navigate to Settings → Advanced → False Positive Patterns:
Example:
CVE Pattern: CVE-2024-.*
Package: libfoo
Reason: Package not exposed to network
Future scans automatically apply this pattern.
Handle network outages gracefully:
Settings → Scanner Offline Resilience:
- Scanner DB Max Age: Max hours before forcing update (default: 24)
- Allow Stale DB: Continue scanning with outdated database
- Stale DB Warning: Hours before warning (default: 72)
Ensures scans continue even if Trivy DB update fails.
Automate vulnerability scanning:
# Scan all containers
curl -X POST http://localhost:8787/api/scan/all
# Scan specific container
curl -X POST http://localhost:8787/api/scan/container/123
# Get vulnerabilities
curl http://localhost:8787/api/vulnerabilities
# Filter by severity
curl "http://localhost:8787/api/vulnerabilities?severity=critical"
# Filter by container
curl "http://localhost:8787/api/vulnerabilities?container_id=123"See API Reference for complete documentation.
- Scan frequently: Daily or after every deployment
- Prioritize: Focus on running containers first
- Automate: Use scheduled scans
- Monitor: Set up notifications for critical findings
- Review new vulnerabilities within 24 hours
- Document decisions with notes
- Revisit ignored vulnerabilities quarterly
- Update patterns for recurring false positives
- Critical/High KEVs: Immediate action (hours)
- Critical non-KEVs: Within 1 week
- High: Within 2 weeks
- Medium: Within 30 days
- Low: Quarterly review
Check Trivy logs:
docker logs trivyCommon issues:
- Trivy DB update failed (network issue)
- Scanner timeout (increase
SCAN_TIMEOUT) - Image not pullable (credentials required)
- Disk space exhausted
- Image may be truly clean (rare)
- Trivy DB may be outdated
- Scanner may not support image OS
- Create false positive patterns
- Check Trivy version (newer is better)
- Review scanner configuration
- Compliance Monitoring - VulnForge Checker and Dive scans
- Secret Detection - Find exposed credentials
- Advanced Configuration - Fine-tune scanning behavior
- Notifications - Get alerted to critical findings