Skip to content

CRAVEX-integration: Integration with package repositories: Artifactory #1725

Closed

Description

@pombredanne

We should integrate with Artifactory. The main scenario we care for is to scan "artifacts" stored in Artifactory.

There are two ways to get to these:

  1. using the artifactory API which is not specific to any package type, just for a download
  2. using the ecosystem-native API for a given package, where for instance Artifactory emulates PyPI or Maven

Then we care for authentication as Artifactory repos are often private.

So to recap we should implement 1) since 2) is already mostly taken care of in PurlDB/MineCode, with auth support using our existing support for .netrc, and having some minimal doc for that.

Activity

  1. self-assigned this
    on Aug 29, 2025
  2. self-assigned this
    on Nov 4, 2025
  3. moved this from Needs prep to In progress in 00-AboutCodePlanneron Nov 27, 2025
  4. tdruez commented on Dec 1, 2025

    @tdruez
    Contributor

    Released as https://github.com/aboutcode-org/scancode.io/releases/tag/v35.5.0

    New documentation available at https://scancodeio.readthedocs.io/en/latest/inputs.html#jfrog-artifactory and https://scancodeio.readthedocs.io/en/latest/inputs.html#sonatype-nexus


    JFrog Artifactory
    -----------------
    
    ScanCode.io can fetch artifacts from **JFrog Artifactory** repositories using
    standard download URLs.
    
    The URL format follows Artifactory's REST API pattern::
    
        https://<artifactory-host>/artifactory/<repo-key>/<artifact-path>
    
    Example::
    
        https://mycompany.jfrog.io/artifactory/libs-release/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar
    
    For **authentication**, configure credentials in your ``.env`` file using one of
    these methods:
    
    Using Basic Authentication::
    
        SCANCODEIO_FETCH_BASIC_AUTH="mycompany.jfrog.io=username,password"
    
    Using API Key (via headers)::
    
        SCANCODEIO_FETCH_HEADERS="mycompany.jfrog.io=X-JFrog-Art-Api=<YOUR_API_KEY>"
    
    Using Access Token::
    
        SCANCODEIO_FETCH_HEADERS="mycompany.jfrog.io=Authorization=Bearer <YOUR_TOKEN>"
    
    .. tip::
        You can also use a :ref:`.netrc file <scancodeio_settings_netrc_location>` for
        authentication if your organization already maintains one.
    
    .. _inputs_nexus:
    
    Sonatype Nexus
    --------------
    
    ScanCode.io can fetch artifacts from **Sonatype Nexus Repository** (versions 2 and 3)
    using standard download URLs.
    
    For **Nexus 3**, the URL format follows the repository path pattern::
    
        https://<nexus-host>/repository/<repo-name>/<path-to-artifact>
    
    Example for a Maven artifact::
    
        https://nexus.mycompany.com/repository/maven-central/ch/qos/logback/logback-core/1.4.0/logback-core-1.4.0.jar
    
    Example for a PyPI package::
    
        https://nexus.mycompany.com/repository/pypi-proxy/packages/urllib3/1.26.7/urllib3-1.26.7-py2.py3-none-any.whl
    
    Example for an npm package::
    
        https://nexus.mycompany.com/repository/npm-proxy/redis/-/redis-2.8.0.tgz
    
    For **authentication**, configure credentials in your ``.env`` file:
    
    Using Basic Authentication::
    
        SCANCODEIO_FETCH_BASIC_AUTH="nexus.mycompany.com=username,password"
    
    Using a Bearer Token::
    
        SCANCODEIO_FETCH_HEADERS="nexus.mycompany.com=Authorization=Bearer <YOUR_TOKEN>"
    
    .. tip::
        You can also use a :ref:`.netrc file <scancodeio_settings_netrc_location>` for
        authentication if your organization already maintains one.
    
  5. moved this from In progress to Done in 00-AboutCodePlanneron Dec 1, 2025
  6. moved this from Done to In validation in 00-AboutCodePlanneron Dec 2, 2025
  7. moved this from In validation to Validated in 00-AboutCodePlanneron Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions