Overview
Perform security vulnerability scans on Docker images using integrated scanners (Grype or Trivy). Results are saved to the database and can be retrieved for historical analysis.Endpoint
Query Parameters
integer
Environment ID containing the image to scan. Optional for local environments.
Request Body
string
required
Image name or ID to scan:
nginx:latestubuntu:22.04sha256:abc123...
string
Force specific scanner:
grype or trivy. If not specified, uses environment scanner settings.Authentication
Requiresimages:inspect permission for the specified environment.
Response Format
Returns job ID for progress tracking:Accept: application/json, returns scan results directly.
Progress Events
Scanning Stage
Analyzing Stage
Processing Stage
Complete
Error
Scan Result Schema
string
Image identifier (SHA256 hash)
string
Human-readable image name with tag
string
Scanner used:
grype or trivystring
ISO 8601 timestamp when scan completed
integer
Scan duration in milliseconds
object
Vulnerability count by severity:
critical: Critical severity (CVSS 9.0-10.0)high: High severity (CVSS 7.0-8.9)medium: Medium severity (CVSS 4.0-6.9)low: Low severity (CVSS 0.1-3.9)negligible: Negligible/informationalunknown: Unknown severity
array
Array of vulnerability objects
Vulnerability Object
string
CVE identifier or vendor-specific ID
string
Severity level:
critical, high, medium, low, negligible, unknownstring
Affected package name
string
Installed package version
string
Version containing the fix (if available)
string
Vulnerability description
string[]
Reference URLs for more information
Implementation
Retrieve Cached Results
Get the latest scan results for an image without running a new scan:Query Parameters
string
required
Image name or ID
integer
Environment ID
string
Filter by scanner:
grype or trivyResponse
Usage Examples
Scan with Default Scanner
Force Specific Scanner
Get Cached Results
Stream Progress (JavaScript)
Filter Critical Vulnerabilities
Supported Scanners
Grype
Fast, accurate vulnerability scanner by Anchore:- Language-specific package scanning
- OS package scanning
- Database automatically updated
- Supports offline scanning
Trivy
Comprehensive security scanner by Aqua Security:- Vulnerability scanning
- Misconfiguration detection
- Secret detection
- License scanning
Error Responses
object
Missing required parameter
object
Permission denied
object
Scan failed
Scan-on-Pull Integration
Scans are automatically triggered when pulling images (if configured):Related Operations
- Pull Image - Automatic scan-on-pull
- List Images - View available images
- Scanner Configuration - Configure scanner settings
Notes
- Results are automatically saved to database
- Multiple scanners can be configured simultaneously
- Scan duration typically ranges from 5-30 seconds depending on image size
- Progress events provide real-time feedback
- Cached results can be retrieved without re-scanning
- Scanner selection follows environment configuration
- Scan-on-pull integration is automatic when scanner is configured
