Red Hat Satellite Executor¶
Category: Patch Management
Script: redhat_satellite.py
Integration: REST API
Faraday Plugin: Raw JSON
Website: https://www.redhat.com/en/technologies/management/satellite
Description¶
Imports the hosts managed by a Red Hat Satellite server and their applicable errata (RHSA, RHBA and RHEA advisories) into Faraday. Each managed host becomes a Faraday host and each pending erratum becomes a vulnerability.
Prerequisites¶
- A Red Hat Satellite (Foreman/Katello) server reachable from the agent
- A Satellite user with permission to view hosts and errata (e.g.,
view_hostsandview_errata) requestsavailable in the agent's Python environment (checked withpython3 -c 'import requests')
Configuration¶
Environment Variables (Setup)¶
| Variable | Required | Description |
|---|---|---|
SATELLITE_HOST |
Yes | Base URL of the Satellite server in the form https://host[:port] (e.g., https://satellite.example.com). No path is allowed. |
SATELLITE_USER |
Yes | Satellite user name |
SATELLITE_PASSWORD |
Yes | Password of the Satellite user |
These variables are also accepted as execution arguments, so a single run can override them.
Execution Arguments¶
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
SATELLITE_ORG_ID |
string | No | ID of the organization whose hosts are imported (e.g., 1). Letters, digits and ._- only, up to 64 characters. If empty, all hosts visible to the user are imported. |
SATELLITE_HOST_COLLECTION |
string | No | Name of a host collection to import (e.g., Production Servers). Letters, digits, spaces and ._- only, up to 128 characters. If empty, hosts are not filtered by collection. |
SATELLITE_MIN_SEVERITY |
string | No | Minimum severity of errata to import: info, low, medium, high or critical. Red Hat names such as important and moderate are also accepted (default: info). |
YAML Configuration Example¶
executors:
redhat_satellite:
repo_executor: redhat_satellite.py
max_size: 65536
varenvs:
SATELLITE_HOST: "https://satellite.example.com"
SATELLITE_USER: "<satellite_user>"
SATELLITE_PASSWORD: "<satellite_password>"
params:
SATELLITE_ORG_ID:
mandatory: false
type: string
base: string
SATELLITE_HOST_COLLECTION:
mandatory: false
type: string
base: string
SATELLITE_MIN_SEVERITY:
mandatory: false
type: string
base: string
How It Works¶
- Authenticates with HTTP Basic using
SATELLITE_USERandSATELLITE_PASSWORD - Lists the managed hosts with
GET /api/hosts, 100 per page, filtered bySATELLITE_ORG_IDandSATELLITE_HOST_COLLECTIONwhen set - For each host, lists its applicable errata with
GET /api/hosts/{id}/errata - Maps each erratum to a Faraday vulnerability:
- Name:
[PATCH-MGMT]followed by the advisory ID and title - Severity: Red Hat's severity (
Critical,Important,Moderate,Low). Security advisories without a severity becomemedium, and bugfix or enhancement advisories becomeinfo. - Status: open for applicable errata
- Details: CVEs, affected packages, bugzilla references, the Red Hat advisory link and the advisory's solution (or generic instructions to apply it)
- Name:
- Drops errata below
SATELLITE_MIN_SEVERITY
Notes¶
- Each Satellite host is created with its own IP, MAC address and operating system. If Satellite has no IP for a host,
0.0.0.0is used. - Hosts without applicable errata are still imported. If no hosts are returned, a single placeholder host is created so the run is recorded.
- Invalid values for
SATELLITE_HOST,SATELLITE_ORG_IDorSATELLITE_HOST_COLLECTIONstop the run. An unrecognizedSATELLITE_MIN_SEVERITYfalls back toinfo. - The shared agent parameters (
AGENT_CONFIG_*tags and severity filters) are not applied by this executor. UseSATELLITE_MIN_SEVERITYto filter by severity.