Skip to content

Red Hat Advanced Cluster Security (StackRox) Executor

Category: IaC, Containers and Kubernetes Script: rhacs.py Integration: REST API Faraday Plugin: Raw JSON Website: https://www.redhat.com/en/technologies/cloud-computing/openshift/advanced-cluster-security-kubernetes

Description

Imports policy violations and container image vulnerabilities from Red Hat Advanced Cluster Security for Kubernetes (RHACS, formerly StackRox) into Faraday. Each deployment with policy violations and each scanned image becomes a Faraday host with [CNAPP] vulnerabilities.

Prerequisites

  • A RHACS Central console reachable from the agent
  • A RHACS API token with read access to alerts and images, created under Integrations > Authentication Tokens

Configuration

Environment Variables (Setup)

Variable Required Description
RHACS_HOST Yes URL of the RHACS Central console (e.g., https://central.apps.cluster.example.com). If you omit the scheme, https:// is used.
RHACS_TOKEN Yes RHACS API token, sent as a Bearer token

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

Execution Arguments

Parameter Type Mandatory Description
RHACS_CLUSTER string No Name of a cluster to import. If empty, all clusters visible to the token are included.
RHACS_NAMESPACE string No Name of a namespace to import. Can be combined with RHACS_CLUSTER. If empty, all namespaces are included.
RHACS_MIN_SEVERITY string No Minimum severity to import: LOW_SEVERITY, MEDIUM_SEVERITY, HIGH_SEVERITY or CRITICAL_SEVERITY. The short forms LOW, MEDIUM, HIGH and CRITICAL are accepted. Default: LOW_SEVERITY.

YAML Configuration Example

executors:
  rhacs:
    repo_executor: rhacs.py
    max_size: 65536
    varenvs:
      RHACS_HOST: "https://central.apps.cluster.example.com"
      RHACS_TOKEN: "<rhacs_token>"
    params:
      RHACS_CLUSTER:
        mandatory: false
        type: string
        base: string
      RHACS_NAMESPACE:
        mandatory: false
        type: string
        base: string
      RHACS_MIN_SEVERITY:
        mandatory: false
        type: string
        base: string

How It Works

  1. Authenticates with Authorization: Bearer <RHACS_TOKEN>
  2. Lists the policy violations with GET /v1/alerts, 100 per page, filtered by cluster, namespace and minimum severity, and loads each alert's details with GET /v1/alerts/{id}
  3. Lists the images with GET /v1/images, filtered by cluster and namespace, and loads each image's scan results with GET /v1/images/{id}
  4. Maps each alert and each image vulnerability to a Faraday vulnerability:
    • Name: [CNAPP] followed by the policy name, or by the CVE, the component and the image
    • Severity: RHACS's severity, or the CVSS score when the severity is missing
    • Status: active alerts and observed vulnerabilities are open, resolved ones are closed, snoozed, deferred or false-positive ones are risk-accepted
    • Details: violation messages, policy details, CVEs, CVSS data, the fixed version and references
  5. Drops image vulnerabilities below RHACS_MIN_SEVERITY and groups the rest into hosts

Notes

  • Hosts use IP 0.0.0.0, because Kubernetes workloads and images do not have a stable IP. Alerts are grouped into one host per deployment, named <cluster>/<namespace>/<deployment>. Images are grouped into one host per image, named <registry>/<repo>:<tag>@<image id>.
  • The severity filter for image vulnerabilities is applied by the executor after the images are loaded, so RHACS_MIN_SEVERITY does not reduce the number of images requested.
  • An unrecognized RHACS_MIN_SEVERITY falls back to LOW_SEVERITY.
  • TLS certificate verification is disabled for requests to Central.
  • The shared agent parameters (AGENT_CONFIG_* tags and severity filters) are not applied by this executor. Use RHACS_MIN_SEVERITY to filter by severity.