-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automate Docker images vulnerability scanning #1531
Comments
I have setup container scanning for Shaarli Docker images (only the amd64 image for now) on our gitlab mirror: https://gitlab.com/shaarli/Shaarli/-/merge_requests/1146/diffs Scans report no vulnerabilities: https://gitlab.com/shaarli/Shaarli/-/pipelines?page=1&scope=all&ref=docker-image-scan I don't remember where we discussed this in the first place, wasn't there reports that the image had some vulnerabilities? Now we need to investigate whether:
|
Hi, it was in this PR, you can still find the report there: #1505 |
Using trivy, the tool suggested by Immanuel, I still get a bunch of vulnerabilities from our
|
Mostly in order to get rid of deprecated deps, and upgrade vulnerable ones. - Upgrade webpack from 3.x to 4.x - Moved babel package to main repo - Replaced deprecated extract-text-webpack-plugin with extract-text-webpack-plugin - Replaced deprecated babel-minify-webpack-plugin with terser-webpack-plugin - Replaced deprecated node-sass with (dart) sass package - Replaced deprecated sass-lint with stylelint (the rules might be a bit different Related to shaarli#1531: trivy doesn't raise any more issue
Mostly in order to get rid of deprecated deps, and upgrade vulnerable ones. - Upgrade webpack from 3.x to 4.x - Moved babel package to main repo - Replaced deprecated extract-text-webpack-plugin with extract-text-webpack-plugin - Replaced deprecated babel-minify-webpack-plugin with terser-webpack-plugin - Replaced deprecated node-sass with (dart) sass package - Replaced deprecated sass-lint with stylelint (the rules might be a bit different Related to shaarli#1531: trivy doesn't raise any more issue
I retested the image after I've rebuilt my Docker image with plugins added over shaarli/shaarli:master and no vulnerabilities found this time. It seems #1561 fixed them all. |
Trivy runs much more extensive tests than Clair. I'll have a look at adding it to the Travis CI pipeline. |
In the mean time, should we enable it? |
It's not available in the free tier. |
- run trivy from makefile so that it can be run both locally and through github actions - usage: make test_trivy TRIVY_TARGET_DOCKER_IMAGE=regist.ry/user/image:tag - tested by downgrading the base image to alpine 3.15.7 and verifying that vulnerabilities are reported (https://github.com/nodiscc/Shaarli/actions/runs/4860040980/jobs/8663400103) - TEMP/TESTING only push image to ghcr.io, run trivy on trivy branch/docker tag as well as master - ref. shaarli#1531
PR #1980 mostly fixes this by running trivy vulnerability scanner on the Docker image built from
|
…poser.lock) - run scan on each push/pull request update - can be run locally using make test_trivy_repo - exit with error code 0/success when vulnerabilities are found, as not to make the workflow fail, a separate periodic run that exits with code 1 should be added in parallel - update trivy to v0.43.0 - https://github.com/aquasecurity/trivy/releases/tag/v0.43.0 - also consider TRIVY_EXIT_CODE when running trivy on the latest docker image - ref. shaarli#1531
…e, composer/yarn dependencies - add badge to README - any time a new vulnerability is found by this workflow, means it is probably time to update Shaarli's base docker image and perform a new release, and/or update npm dependencies (npm audit fix) or composer dependencies (composer update) - similar jobs already exist in the pipeline for master/latest docker image but will not raise an error - fixes shaarli#1531
…e, composer/yarn dependencies - add badge to README - any time a new vulnerability is found by this workflow, means it is probably time to update Shaarli's base docker image and perform a new release, and/or update npm dependencies (npm audit fix) or composer dependencies (composer update) - similar jobs already exist in the pipeline for master/latest docker image but will not raise an error - fixes shaarli#1531
|
A daily security scan is now in place, the status will be displayed in the README through this badge As expected it is currently failing, #2050 should improve this. |
The text was updated successfully, but these errors were encountered: