A Singapore Government Agency Website

Nexus IQ policies

Nexus IQ policies define rules used to evaluate open-source components during scans. These policies help identify security vulnerabilities, malicious code, licence risks, and suspicious packages.

During a Nexus IQ scan, dependencies are evaluated against these policies and any violations appear in the evaluation report.

SHIP-HATS uses Sonatype Nexus Firewall and additional security policies to detect malicious or suspicious packages downloaded through Nexus Repository proxies. Firewall configuration is managed centrally and cannot be modified by users.

Default policy

A default policy is automatically applied when Nexus IQ is set up.

This policy evaluates components for:

  • Known security vulnerabilities
  • Licence compliance risks
  • Suspicious or malicious dependencies

For more information about policy configuration, refer to the Sonatype documentation:
https://help.sonatype.com/iqserver/reporting/dashboard

Add a policy

You can create additional policies in the Nexus IQ portal.

Steps

  1. Log in to Nexus IQ.
  2. Click IQ Server Dashboard.
  3. In the left navigation, go to Orgs and Policies → Organizations → App.
![add-policy](https://docs.developer.tech.gov.sg/docs/ship-hats-docs/tools/nexus-iq/../../snippets/./images/nexus-iq-add-policy.png)
  1. Click Add a Policy.

    add-policy

  2. Configure the policy conditions according to your requirements.

    You can also configure email notifications to receive alerts when:

    • a build fails

    • a security vulnerability is detected

      policy-summary

  3. Click Create.

    create-policy

Additional SHIP-HATS policies

SHIP-HATS includes several additional security policies to detect malicious or suspicious packages. These policies are preconfigured and cannot be modified.

Policy Purpose
Security-Critical Detect components with critical vulnerabilities
FW-Malicious Code – Severe Detect packages containing malicious code
Integrity-Rating Suspicious Detect suspicious packages
FW-Security Namespaces Conflict Detect namespace impersonation attacks

Impact of additional policies

When these policies detect suspicious or malicious packages, Nexus IQ may generate warnings during scans.

These warnings appear when packages are downloaded through SHIP-HATS Nexus Repository proxies (for example npm-proxy).

Currently:

  • Violations appear as warnings
  • Builds are not blocked

However, malicious or suspicious packages may be blocked from passing through Nexus Repository proxies to improve security.

If a package is blocked:

  1. Review the dependency source.
  2. Verify whether the package is legitimate.
  3. Replace the dependency with a trusted version if necessary.

Security-Critical

Policy to monitor critical severity vulnerabilities.

security-critical


FW-Malicious Code – Severe

Policy to detect packages containing known malicious code.

malicious-code


Integrity-Rating Suspicious

Policy to monitor packages with suspicious integrity ratings.

integrity-suspicious


FW-Security Namespaces Conflict

Policy to detect packages that impersonate legitimate libraries.

namespace-conflict



Additional resources

Best practices

Additional SHIP-HATS policies

SHIP-HATS includes additional security policies that help detect malicious or suspicious packages.

These policies are preconfigured and cannot be modified.

Policy Purpose
Security-Critical Detect components with critical security vulnerabilities
FW-Malicious Code – Severe Detect packages containing known malicious code
Integrity-Rating Suspicious Detect suspicious packages based on integrity rating
FW-Security Namespaces Conflict Detect packages impersonating legitimate libraries

Impact of policies

When these policies detect suspicious or malicious packages, Nexus IQ may generate warnings during scans.

These warnings appear when packages are downloaded through Nexus Repository proxies (for example npm-proxy).

Depending on the policy configuration:

  • A warning may appear in the scan report.
  • A build may fail if the violation severity exceeds the allowed threshold.
  • A package may be blocked from passing through Nexus Repository proxies.

If a package is blocked, review the dependency and replace it with a trusted version.

Chat with me!
Bot Launcher