Aqua Security’s image scanning feature acts as your vigilant gatekeeper, preventing compromised containers from ever reaching your production environment.

Let’s see it in action. Imagine you’ve just pulled down a popular open-source web server image, but unbeknownst to you, a malicious actor has injected a backdoor into a recent build.

# First, ensure Aqua CLI is installed and logged in to your Aqua CSP account
# aqua login --host <your-aqua-csp-host> --username <your-user> --password <your-password>

# Now, scan the image directly from your local Docker daemon
aqua image scan --image docker.io/library/nginx:latest --host <your-aqua-csp-host>

The output might look something like this, highlighting a critical vulnerability:

Image: docker.io/library/nginx:latest
Registry: docker.io
Scan ID: a1b2c3d4-e5f6-7890-1234-abcdef123456
Status: COMPROMISED
Vulnerabilities:
  Critical: 1
  High: 5
  Medium: 20
  Low: 50
Malware:
  Found: 1
  Details:
    - Path: /usr/local/bin/backdoor.sh
      Severity: CRITICAL
      Description: Suspicious shell script found, potential remote access backdoor.
      CVEs: []

Aqua Security works by integrating deeply into your container lifecycle. When you scan an image, Aqua pulls that image from your registry (or local daemon), unpacks its layers, and meticulously inspects every file. It compares the contents against a vast, continuously updated database of known vulnerabilities (CVEs) and malware signatures. This isn’t just about package versions; Aqua can detect malicious code embedded directly within binaries, scripts, and even configuration files.

The core of Aqua’s scanning lies in its multi-layered approach:

  • Vulnerability Scanning: This is the bread and butter. Aqua identifies known Common Vulnerabilities and Exposures (CVEs) within the installed software packages (OS packages, application dependencies). It understands the context of your image’s operating system and package manager to provide accurate results.
  • Malware Detection: This goes beyond CVEs. Aqua employs static analysis and signature-based detection to find malicious code, backdoors, crypto-miners, and other unwanted software that might not have a CVE associated with it.
  • Secret Detection: Aqua can identify hardcoded secrets like API keys, passwords, and private keys within your image, preventing accidental exposure.
  • Configuration Auditing: It checks for misconfigurations in common container artifacts like Dockerfiles, Kubernetes manifests, and cloud provider configurations, aligning them with security best practices.

The "levers" you control are primarily through Aqua’s configuration and integration points. You can define scan policies that dictate what constitutes an acceptable risk level for your environment. For instance, you might set a policy that blocks any image with critical vulnerabilities or malware from being deployed. You can integrate Aqua into your CI/CD pipeline (Jenkins, GitLab CI, GitHub Actions, etc.) to automatically scan images as they are built, failing the build if policy violations are found. You can also configure Aqua to scan images already present in your container registries, providing visibility into your existing image inventory.

What most people don’t realize is that Aqua’s malware detection can often identify threats that traditional vulnerability scanners miss because it’s not solely reliant on CVE databases. It uses behavioral analysis heuristics and a dynamic signature engine that can detect novel or custom-written malware by looking for suspicious patterns, API calls, and file characteristics, even if that specific piece of malware has never been seen before and thus has no CVE. This proactive detection is crucial for zero-day threats.

Once you’ve addressed the immediate threat, your next step is to ensure your scanning policies are correctly configured to prevent similar issues from slipping through in the future.

Want structured learning?

Take the full Aqua course →