Skip to content

JFrog Artifactory Executor

Category: Software Composition Analysis Script: jfrog_artifactory.py Integration: REST API (HTTP Basic) Faraday Plugin: Raw JSON Website: https://jfrog.com/artifactory/

Description

Imports the Xray security findings of one artifact stored in a JFrog Artifactory repository into Faraday. The artifact becomes a host and each issue becomes a vulnerability.

Prerequisites

  • A JFrog platform with Artifactory and Xray enabled
  • An Artifactory user and API key (or identity token or password) with read access to the repository
  • The repository must be indexed by Xray; otherwise no findings are returned

Configuration

Environment Variables (Setup)

Variable Required Description
ARTIFACTORY_HOST Yes JFrog platform URL (e.g., https://yourco.jfrog.io). /artifactory is added if missing.
ARTIFACTORY_USER Yes Artifactory username
ARTIFACTORY_API_KEY Yes API key, identity token or password of the user. A value starting with Bearer is sent as-is as the Authorization header.

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

Execution Arguments

Parameter Type Mandatory Description
ARTIFACTORY_REPO string Yes Repository key (e.g., libs-release-local, docker-prod)
ARTIFACTORY_PATH string Yes Path of the artifact inside the repository (e.g., org/example/lib/1.0/lib-1.0.jar)
ARTIFACTORY_MIN_SEVERITY string No Minimum severity to import: info, low, medium, high or critical (default: info)

YAML Configuration Example

executors:
  jfrog_artifactory:
    repo_executor: jfrog_artifactory.py
    max_size: 65536
    varenvs:
      ARTIFACTORY_HOST: "https://yourco.jfrog.io"
      ARTIFACTORY_USER: "<artifactory_user>"
      ARTIFACTORY_API_KEY: "<artifactory_api_key>"
    params:
      ARTIFACTORY_REPO:
        mandatory: true
        type: string
        base: string
      ARTIFACTORY_PATH:
        mandatory: true
        type: string
        base: string
      ARTIFACTORY_MIN_SEVERITY:
        mandatory: false
        type: string
        base: string

How It Works

  1. Authenticates with HTTP Basic using ARTIFACTORY_USER and ARTIFACTORY_API_KEY
  2. Reads GET /api/repositories to find ARTIFACTORY_REPO and add its package type, repository type and URL to the host description
  3. Reads the issues of the artifact from GET /api/security/vulnerabilities (filtered by repository and path), page by page. If that endpoint returns 404, it runs POST /api/xray/scanArtifact instead.
  4. Maps each issue to a Faraday vulnerability:
    • Severity: the Xray severity, or the CVSS score when the severity is missing; issues below ARTIFACTORY_MIN_SEVERITY are dropped
    • Status: ignored, false-positive, muted and not-applicable issues become risk-accepted; fixed or resolved issues become closed; everything else is open
    • References: CVEs, CWEs and links from the issue

Notes

  • The executor creates one host per run, with IP 0.0.0.0 and hostname <repo>/<path>, because SCA findings belong to artifacts rather than IP addresses. No host is created when there are no findings.
  • Only one artifact is scanned per run. Run the executor again for other paths.
  • TLS certificates are not verified.
  • The setup variables can also be passed as execution arguments.
  • The shared agent parameters (AGENT_CONFIG_* tags and severity filters) are not applied by this executor. Use ARTIFACTORY_MIN_SEVERITY to filter by severity.