Add flags to allow air-gapped (offline) usage
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:
- Download and host the following Retire.js vulnerability data files on an accessible HTTP endpoint:
-
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?
-
Changelog entry added -
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer
Edited by Adam Cohen