Skip to main content

Nexus IQ step configuration



You can scan your code repositories and ingest results from Nexus IQ.

Workflow descriptions

Orchestration/extraction workflows

This workflow applies to scanner integrations that support orchestratedScan or dataLoad scan modes.

  1. Add a Build or Security stage to your pipeline.

  2. If you're scanning a code repository, set up your codebase.

  3. Add a Custom Scan step.

  4. Review the Important notes for Custom Scan steps for additional requirements and relevant information.

    If you're setting up a scan on a Kubernetes or Docker build infrastructure, you need to add a Docker-in-Docker background step to the stage.

  5. Add the relevant key:value pairs to Settings.

Ingestion workflows

This workflow applies to scanner integrations that support Ingestion mode.

  1. Add a Build or Security stage to your pipeline.

  2. Add a Run step and set it up to save your scan results to a shared folder.

    For more information, go to Run an ingestion scan in an STO Pipeline.

  3. Add a Custom Scan step.

  4. Review the Important notes for Custom Scan steps for additional requirements and relevant information.

  5. Add the relevant key:value pairs to Settings.

Custom Scan step settings for Nexus scans

Scanner settings

These settings are required for most scanners. For more information, go to the reference for the scanner integration you're setting up.

Product name

The scanner name. This is required for all Custom Scan steps.

Key
product_name
Value
nexusiq

Scan type

The target type to scan.

Key
scan_type
Value
repository

Policy type

The scan mode to use.

Key
policy_type
Value

Must be one of the following.

orchestratedScan
dataLoad

Product config name

Key
product_config_name
Value
default

Target and variant

Every Custom Scan step needs a target and baseline.

Target name

Key
target_name
Value

A user-defined label for the code repository, container, application, or configuration to scan. Specify a unique, descriptive name. This makes it much easier to navigate your scan results in the STO UI.

Target variant

Key
target_variant
Value

A user-defined label for the branch, tag, or other target variant to scan.

Repository

These settings apply to Custom Scan steps when both of these conditions are true:

  1. The policy_type is orchestratedScan or dataLoad.
  2. The scan_type is repository.

Repository project

Key
repository_project
Value

The name of the repo to scan. To specify the repo URL, edit the Codebase Config object in the Harness pipeline.

In most cases, this should match the repo name used in your Git provider.

Repository branch

Key
repository_branch
Value

The branch that gets reported in STO for the ingested results. In most cases, this field should match the name of the Git branch that is getting scanned.

You can specify a hardcoded string or use a variable such as <+codebase.branch> to specify the branch at runtime. For more information, go to CI codebase variables reference.

Product access

These settings are available to access your NexusIQ SaaS instance when policy_type is orchestratedScan.

You should create Harness text secrets for your encrypted passwords/tokens and reference them using the format <+secrets.getValue("my-access-token")>.

Product domain

Key
product_domain
Value

The URL of your NexusIQ instance.

Product access Id

Key
product_access_id
Value

The access Id used to log in to the NexusIQ UI.

Product access token

Key
product_access_token
Value

The Harness secret for the password used to log in to the NexusIQ UI. (This is not an API access token.)

Product organization Id

Key
product_organization_id
Value

The organization defined in Nexus. You can use the Organizations API to get a list of all your organizations.

Product project name

Key
product_project_name
Value

The application ID of the Nexus application. This also corresponds to application-id used in the NexusIQ CLI.

Product lookup type

Key
product_lookup_type
Value

One of the following:

byPrivateId
byPublicId

Product lookup Id

You can use the following keys to specify the lookup Id, depending on the product lookup type:

product_private_id
product_public_id

Ingestion file

This setting applies to Custom Scan steps when the policy_type is ingestionOnly.

Key
ingestion_file
Value

The path to your scan results when running an Ingestion scan, for example /shared/scan_results/myscan.latest.sarif.

  • The data file must be in a supported format for the scanner.

  • The data file must be accessible to the scan step. It's good practice to save your scan results to a shared path in your stage. In the visual editor, go to the stage where you're running the scan. Then go to Overview > Shared Paths. You can also add the path to the YAML stage definition like this:

        - stage:
    spec:
    sharedPaths:
    - /shared/scan_results

Fail on Severity

If the scan finds any vulnerability with the specified severity level or higher, the pipeline fails automatically. NONE means do not fail on severity.

For more information, go to:

Key
fail_on_severity
Value
CRITICAL
MEDIUM
LOW
INFO
NONE