glab dependency-firewall job-proxy
Run one Dependency Firewall proxy for a whole CI/CD job. (EXPERIMENTAL)
Synopsis
Run a single Dependency Firewall inspection proxy for the length of a CI/CD job and route every tool in the job through it, instead of wrapping each package-manager command with glab dependency-firewall npm and the like.
Start it once at the beginning of the job, in before_script, and evaluate its output with eval. The output sets the environment variables that route the job’s package managers through the proxy and make them trust its certificate.
The proxy checks each package the job downloads or publishes against the policy for the current project, refuses blocked packages, and records blocked and flagged packages in .gitlab/df/ci-log.json. Run glab dependency-firewall ci-summary as the last command in script, not in after_script, to fail the job when a package was blocked. GitLab ignores the exit code of after_script.
Unlike the per-command wrappers, the job-level proxy also covers tools that are not package managers (for example a raw curl of a tarball), because the whole job’s HTTP and HTTPS traffic is routed through it. Traffic that isn’t a package download, such as a call to a service container, is forwarded unchanged.
The command preserves your existing configuration. It keeps your NO_PROXY and, when a corporate egress proxy is configured through HTTPS_PROXY, chains to it. It adds the proxy certificate to your trust rather than replacing it: it installs the certificate into the system trust store and, for tools that read a CA bundle instead, writes a bundle that is your existing trust plus the proxy certificate.
This feature is an experiment and is not ready for production use. It might be unstable or removed at any time. For more information, see https://docs.gitlab.com/policy/development_stages_support/.
Aliases
sessionOptions inherited from parent commands
-h, --help Show help for this command.