Skip to content

Sonatype Nexus IQ Server Executor

Category: Software Composition Analysis Script: sonatype_nexus_iq.py Integration: REST API Faraday Plugin: Raw JSON Website: https://www.sonatype.com/products/open-source-security-dependency-management

Description

Imports the vulnerable open-source components found by Sonatype Nexus IQ Server in one application into Faraday. The executor reads the application's policy report for a given stage and creates one [SCA] vulnerability per security issue of each component.

Prerequisites

  • A Sonatype Nexus IQ Server reachable from the agent
  • A Nexus IQ user (local, SAML-mapped, or a user token) with permission to view the application's reports
  • The public ID of the application, with at least one evaluated report for the stage you want

Configuration

Environment Variables (Setup)

Variable Required Description
NEXUS_IQ_HOST Yes Base URL of your Nexus IQ Server (e.g., https://nexus-iq.example.com or https://nexus-iq.example.com:8070). If you omit the scheme, https:// is used.
NEXUS_IQ_USER Yes Nexus IQ user name or user token ID
NEXUS_IQ_PASSWORD Yes Password or user token code

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

Execution Arguments

Parameter Type Mandatory Description
NEXUS_IQ_PUBLIC_ID string Yes Public ID of the application, as shown in the Nexus IQ UI (not the internal UUID)
NEXUS_IQ_STAGE string Yes Stage of the report to import: build, stage-release, release or operate. The synonyms stage_release, stage, production and prod are also accepted. Any other value stops the run.

YAML Configuration Example

executors:
  sonatype_nexus_iq:
    repo_executor: sonatype_nexus_iq.py
    max_size: 65536
    varenvs:
      NEXUS_IQ_HOST: "https://nexus-iq.example.com:8070"
      NEXUS_IQ_USER: "<nexus_iq_user>"
      NEXUS_IQ_PASSWORD: "<nexus_iq_password>"
    params:
      NEXUS_IQ_PUBLIC_ID:
        mandatory: true
        type: string
        base: string
      NEXUS_IQ_STAGE:
        mandatory: true
        type: string
        base: string

How It Works

  1. Authenticates with HTTP Basic, using NEXUS_IQ_USER and NEXUS_IQ_PASSWORD
  2. Looks up the application with GET /api/v2/applications?publicId=<id> to get its name and organization
  3. Reads the policy report with GET /api/v2/applications/{publicId}/reports/{stage}/policy
  4. Creates one Faraday vulnerability for each security issue of each component:
    • Name: [SCA] followed by the issue reference (for example a CVE) and the component
    • Severity: Nexus IQ's threat category (critical, severe, moderate, low), or the CVSS score
    • Status: open by default. Waived, not applicable and false-positive issues become risk-accepted, and fixed issues become closed.
    • Details: component format, file name and hash, CVEs, CVSS data and references
  5. Groups the vulnerabilities under one host for the application

Notes

  • The host uses IP 0.0.0.0 and the hostname <application name>@<public id>, because SCA findings belong to dependencies and not to IP addresses.
  • If the report has no security issues, nothing is imported.
  • TLS certificate verification is disabled for requests to the server.
  • The shared agent parameters (AGENT_CONFIG_* tags and severity filters) are not applied by this executor.