Skip to content
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

Set up known-vulnerability scanning for container images #132

Open
ericcornelissen opened this issue Jan 9, 2024 · 0 comments
Open

Set up known-vulnerability scanning for container images #132

ericcornelissen opened this issue Jan 9, 2024 · 0 comments
Labels
help wanted Extra attention is needed security Relates to security

Comments

@ericcornelissen
Copy link
Owner

ericcornelissen commented Jan 9, 2024

Relates to #81, #119, #123

Summary

Expand auditing to cover the container images (Containerfile and Containerfile.dev) so as to stay on secure base images.

Suggestions, tips, thoughts are welcome.

Goals

The solution:

  • (must) be runnable by anyone.
  • (must) allow for ignoring specific vulnerabilities manually.
  • (ideally) allows for ignoring vulnerabilities without fixes.

Tests

I tried out Docker Scout and the following make target worked reasonably well. However, it didn't work as expected (it detected a known vulnerability in OpenSSL (correct) but it suggested downgrading the base image (from docker.io/golang:1.21.5-alpine3.19) to docker.io/golang:1.20-alpine3.19, seemingly because it's more popular, even though it achieves nothing).

.PHONY: audit-container
audit-container: container dev-img
	@echo 'Auditing production container...'
	@docker scout cves \
		--exit-code \
		--format 'only-packages' \
		--only-fixed \
		--only-package-type 'apk' \
		'ericornelissen/ades'
	@echo 'Auditing development container...'
	@docker scout cves \
		--exit-code \
		--format 'only-packages' \
		--only-fixed \
		--only-package-type 'apk' \
		'ades-dev-img'
@ericcornelissen ericcornelissen added help wanted Extra attention is needed security Relates to security labels Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed security Relates to security
Projects
None yet
Development

No branches or pull requests

1 participant