Skip to content

Add flags to allow air-gapped (offline) usage

Adam Cohen requested to merge support-airgapped-scanning into master

What does this MR do?

This MR adds the following two flags for allowing the retire.js analyzer to run in an air-gapped (offline) environment:

  • --js-advisory-db (Env var: RETIREJS_JS_ADVISORY_DB)
  • --node-advisory-db (Env var: RETIREJS_NODE_ADVISORY_DB)

In order to run the GitLab Retire.js analyzer in an air-gapped environment, follow these steps:

  1. Download and host the following Retire.js vulnerability data files on an accessible HTTP endpoint:
  1. Run the analyzer and reference the above files:

    go run . a --js-advisory-db http://localhost:9292/jsrepository.json \
      --node-advisory-db http://localhost:9292/npmrepository.json  \
      /path/to/yarn/project

The complete docs for setting up air-gapped usage will be implemented as part of gitlab-org/gitlab#208254 (closed)

What are the relevant issue numbers?

gitlab-org/gitlab#33719 (closed)

Does this MR meet the acceptance criteria?

Edited by Adam Cohen

Merge request reports