Overview
CPLN Trivy automates vulnerability scanning for every image in your Control Plane image registry. A scheduled daemon queries the registry for unscanned images, runs Trivy against each one, and stores an HTML report in S3 or an Azure File Share. After each scan, the image is tagged with a direct link to its report — visible in the Control Plane console.Architecture
- daemon (cron workload) — Runs on a configurable schedule, queries the registry for images that do not yet have a
cpln/trivy-scantag, and orchestrates scanning. Includes a trivy-api sidecar that wraps the Trivy CLI and returns HTML vulnerability reports. - web-server (serverless workload) — Receives scan reports from the daemon, stores them in the configured storage backend, and serves them publicly via URL.
| Tag | Value |
|---|---|
cpln/trivy-scan | URL to the HTML vulnerability report |
cpln/trivy-scan-time | Timestamp of the scan |
cpln/trivy-scan tag are scanned. To re-scan an image, remove that tag first.
What Gets Created
- Cron Daemon Workload — Trivy daemon with trivy-api sidecar, runs on a cron schedule.
- Serverless Web-Server Workload — Report storage and serving, autoscales from 1–3 replicas.
- Identity & Policy — Identity bound to each workload with access to the configured storage cloud account and the service account secret.
- Secret — Opaque secret storing the service account key used to authenticate Trivy against the Control Plane image registry.
This template does not create a GVC. You must deploy it into an existing GVC.
Prerequisites
Service Account
Trivy authenticates against the Control Plane image registry using a service account key.Create or select a service account
Create a Control Plane service account (or use an existing one) that has read access to images in your org. Set
serviceAccountName in values.yaml to its name.Storage
- AWS S3
Create an S3 bucket
Create an S3 bucket in your AWS account to store scan reports. Set
storage.s3.bucket and storage.s3.region.Register a Cloud Account
If you do not have one, create an AWS Cloud Account in Control Plane with
AmazonS3FullAccess permissions. Set storage.s3.cloudAccountName to its name.UI
Browse, install, and manage templates visually
CLI
Manage templates from your terminal
Terraform
Declare templates in your Terraform configurations
Pulumi
Declare templates in your Pulumi programs
Configuration
The defaultvalues.yaml for this template:
Configuration Reference
| Parameter | Default | Description |
|---|---|---|
storage.type | s3 | Storage backend for reports. Options: s3, azureFileshare |
storage.s3.cloudAccountName | — | AWS Cloud Account name registered in Control Plane |
storage.s3.bucket | — | S3 bucket name |
storage.s3.region | — | AWS region (e.g. us-east-1) |
storage.azureFileshare.cloudAccountName | — | Azure Cloud Account name registered in Control Plane |
storage.azureFileshare.accountName | — | Azure storage account name |
storage.azureFileshare.fileShare | — | Azure file share name |
storage.azureFileshare.scope | — | Full Azure resource scope for role assignment |
postToken | changeme | Shared bearer token between daemon and web-server |
trivyPassword | — | Service account key for Trivy registry authentication |
trivyPasswordSecretName | trivy-password | Name of the Control Plane secret storing the key |
serviceAccountName | cpln-trivy-service-account | Service account Trivy uses to pull images |
schedule | */59 * * * * | Cron schedule for the scanning daemon |
daemon.resources.cpu | 1 | CPU for the daemon container |
daemon.resources.memory | 1Gi | Memory for the daemon container |
trivyApi.resources.cpu | 2 | CPU for the trivy-api sidecar |
trivyApi.resources.memory | 4Gi | Memory for the trivy-api sidecar |
webServer.autoscaling.minScale | 1 | Minimum web-server replicas |
webServer.autoscaling.maxScale | 3 | Maximum web-server replicas |
Viewing Reports
Once the daemon has run, navigate to any scanned image in the Control Plane console. Thecpln/trivy-scan tag on the image contains a direct URL to the HTML vulnerability report. Opening that URL serves the report from the web-server.
To list all scanned images via CLI:
Maintenance
Force a Full Re-Scan
To reset all scan tags and trigger a full re-scan on the next daemon run:Re-Scan a Single Image
To re-scan one image, remove its scan tags:External References
Trivy Documentation
Official Trivy vulnerability scanner documentation
Create a Cloud Account
Set up AWS or Azure cloud accounts for storage access