Skip to content

Aqua SaaS (CNAPP) Executor

Category: Cloud Security Script: aqua_saas.py Integration: REST API Faraday Plugin: Raw JSON Website: https://www.aquasec.com/

Description

Imports container image vulnerabilities from Aqua Security's hosted SaaS platform into Faraday. It works like the Aqua Enterprise executor, but it connects to the Aqua SaaS endpoint of your region instead of a console URL.

Prerequisites

  • An Aqua SaaS account
  • An Aqua user with permission to read vulnerabilities and images
  • Network access to the Aqua SaaS endpoint for your region

Configuration

Environment Variables (Setup)

Variable Required Description
AQUA_USER Yes Aqua SaaS username with permission to read vulnerabilities
AQUA_PASSWORD Yes Password of the Aqua user

These variables are also accepted as execution arguments, so a single run can override them.

Execution Arguments

Parameter Type Mandatory Description
AQUA_REGION string No Aqua SaaS region: us, eu, apac or singapore (default: us). The short aliases ap and sg also work.
AQUA_REGISTRY string No Import only findings from this Aqua registry name. Default: all registries the user can see.
AQUA_REPO string No Import only findings from this image or repository name. Default: all images.
AQUA_MIN_SEVERITY string No Minimum severity to import: info, low, medium, high or critical (default: info)

YAML Configuration Example

executors:
  aqua_saas:
    repo_executor: aqua_saas.py
    max_size: 65536
    varenvs:
      AQUA_USER: "<aqua_user>"
      AQUA_PASSWORD: "<aqua_password>"
    params:
      AQUA_REGION:
        mandatory: false
        type: string
        base: string
      AQUA_REGISTRY:
        mandatory: false
        type: string
        base: string
      AQUA_REPO:
        mandatory: false
        type: string
        base: string
      AQUA_MIN_SEVERITY:
        mandatory: false
        type: string
        base: string

How It Works

  1. Picks the Aqua SaaS endpoint from AQUA_REGION: https://cloudsploit.com (US), https://eu.cloudsploit.com, https://apac.cloudsploit.com or https://singapore.cloudsploit.com
  2. Logs in with POST /api/v1/login using AQUA_USER and AQUA_PASSWORD and gets a bearer token
  3. Lists vulnerabilities from GET /api/v2/risks/vulnerabilities (100 per page), filtered by registry, image name and minimum severity, and looks up each affected image in GET /api/v2/images for extra details
  4. Groups the findings by image and maps each one to a Faraday vulnerability, using the same mapping as the Aqua Enterprise executor:
    • Name: [CNAPP], the vulnerability, the affected package and the image
    • Severity: Aqua's severity mapped to Faraday's scale (negligible becomes info), or the CVSS score when the severity is missing
    • Status: fixed or resolved findings become closed, suppressed, acknowledged or false-positive ones become risk-accepted, everything else is open

Notes

  • Each container image becomes one host with the synthetic IP 0.0.0.0. The hostname identifies the image (<registry>/<repository>:<tag>@<image id>).
  • The SaaS URL is fixed. There is no host setting, only AQUA_REGION. An unrecognized region is logged and the US endpoint is used.
  • The executor loads aqua_enterprise.py from the same directory, so both scripts must be deployed together.
  • TLS certificates are not verified.
  • The run stops if the login fails.
  • The shared agent parameters (AGENT_CONFIG_* tags and severity filters) are not applied by this executor. Use AQUA_MIN_SEVERITY to filter by severity.