ADDITIONAL_CA_CERT_BUNDLE not being used by gemnasium maven scanner
Summary
certs from ADDITIONAL_CA_CERT_BUNDLE are not being used by the gemnasium maven scanner
Steps to reproduce
Include certs contents in ADDITIONAL_CA_CERT_BUNDLE and run gemnasium maven scanner. Observe the command
$ /opt/asdf/shims/keytool -importcert -alias custom -file /etc/ssl/certs/ca-cert-additional-gitlab-bundle.pem -trustcacerts -noprompt -storepass changeit -keystore /opt/asdf/installs/java/adoptopenjdk-11.0.7+10.1/lib/security/cacerts
As part of the build process.
Add an after_script $ /opt/asdf/shims/keytool -storepass changeit -keystore /opt/asdf/installs/java/adoptopenjdk-11.0.7+10.1/lib/security/cacerts -list -v
And check if your certs have been added.
Example Project
What is the current bug behavior?
Gemnasium is unable to build the project because maven or gradle fail with certificate errors pulling dependencies.
What is the expected correct behavior?
maven or gradle run by Maven should succeed.
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
CI_RUNNER_VERSION=13.8.0
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
Could be related to #296921 (closed)