Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.
SecurityVulnerability ScanningAqua TrivyGrype

Security scanning

Understand how Harness Artifacts scans container images for vulnerabilities and quarantines artifacts that violate your security policies.

A container image pushed to a registry today may be perfectly safe. Three months later, a new CVE is published against a library bundled inside it. Without automated scanning, nobody knows until that image is already running in production, or worse, until a breach occurs.

Security scanning in Harness Artifacts closes this gap by making vulnerability detection a built-in part of the artifact lifecycle, not a separate step that teams have to remember to run.

What security scanning does

When you configure security scanning on a Docker or Helm registry, Harness automatically creates a pipeline called HARNESS ARTIFACT SCAN PIPELINE. This pipeline runs every time a new image is pushed to that registry.

The scan pipeline uses Aqua Trivy or Grype, selected when you configure scanning on the registry, to inspect the image's file system, operating system packages, and application dependencies for known vulnerabilities.

Results appear on the Vulnerabilities tab of the artifact detail page, categorized by severity:

  • Critical

  • High

  • Medium

  • Low

Each finding includes the CVE ID, the affected package and version, and whether a fix is available.

No separate pipeline configuration is required. Harness creates and manages the scan pipeline when you enable scanning on the registry.

How enforcement works

Scanning alone surfaces findings; it does not act on them automatically unless you add a policy set.

You can attach a Security Tests policy set to a registry. The policy set defines the conditions under which an artifact should be blocked. For example: quarantine any image with at least one Critical CVE. When the scan pipeline runs and finds a result that violates the policy, the image is automatically quarantined.

A quarantined artifact:

  • Cannot be pulled by users or pipelines.

  • Remains visible and auditable in the registry; it is not deleted.

  • Can be released from quarantine manually after review, or deleted if appropriate.

Quarantine is not a permanent verdict. It is a hold that gives a security engineer or platform team time to review findings and decide whether the image is acceptable for use.

The async scanning window

Scanning runs after a push completes. There is a brief window between the moment a push succeeds and the moment the scan result is applied. During that window, the image is technically available. If the scan finds a violation, the image is quarantined after that first window closes. Subsequent pulls are blocked, but the very first pull could succeed before quarantine is applied.

For registries where this window is unacceptable, the recommended approach is a staging-and-promotion pattern: push to a staging registry, wait for scan results, then promote clean images to a production registry. Go to Configure security scanning for setup details.

For inbound packages (dependencies fetched from public upstream sources), Dependency Firewall provides synchronous blocking before the artifact is ever cached. Go to Dependency Firewall for that use case.

Integration with STO and SCS

The scan pipeline is built on two Harness modules:

  • Harness Supply Chain Security (SCS): Generates an SBOM alongside the vulnerability scan. Go to SBOM and supply chain to understand what SBOMs enable.

  • Harness Security Testing Orchestration (STO): Orchestrates the scanner execution. With a full STO license, you can add additional scanners beyond Aqua Trivy, configure scan thresholds, and integrate scan results into your pipeline gates.

Both modules are accessible directly from the artifact detail page. You can reference an artifact stored in Harness Artifacts from an SCS or STO pipeline step without configuring an external connector.

Use cases

Block images with critical vulnerabilities before deployment

A platform team attaches a Security Tests policy set to their production Docker registry with the rule: quarantine any image with a Critical severity CVE. A developer pushes a new build that includes a vulnerable version of OpenSSL. The scan pipeline detects the finding, and Harness quarantines the image automatically. The developer receives the finding in the Vulnerabilities tab and updates the base image.

Ongoing scanning for a production registry

A security team configures scanning on a registry that holds production-grade base images. Any newly discovered CVE in a previously clean image surfaces in the Vulnerabilities tab without requiring anyone to re-push the image. The team reviews findings weekly and decides whether quarantine or remediation is warranted.

SBOM generation at push time for compliance

A team delivering software to a US federal agency must provide SBOMs that meet NTIA minimum element requirements. Every image pushed to their registry generates an SBOM automatically via the scan pipeline. The SBOM is accessible on the artifact detail page and downloadable for submission to the customer.

Next steps

Last updated

Was this helpful?