From 4e8042c9a8c9794b0b10cc04e42d85251aeac5a9 Mon Sep 17 00:00:00 2001 From: Akash Jain <15995028+akash-jain-10@users.noreply.github.com> Date: Fri, 19 Jan 2024 12:38:02 +0530 Subject: [PATCH] fix(CI): Enable Security Scan Reports for ingestion base slim docker image (#14788) --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 9c16def705e..4738889a102 100644 --- a/Makefile +++ b/Makefile @@ -102,12 +102,19 @@ snyk-dependencies-report: ## Uses Snyk CLI to validate the project dependencies snyk container test postgres:latest $(SNYK_ARGS) --json > security-report/postgres-scan.json | true; snyk container test docker.elastic.co/elasticsearch/elasticsearch:7.10.2 $(SNYK_ARGS) --json > security-report/es-scan.json | true; +.PHONY: snyk-ingestion-base-slim-report +snyk-ingestion-base-slim-report: + @echo "Validating Ingestion Slim Container" + docker build -t openmetadata-ingestion-base-slim:scan -f ingestion/operators/docker/Dockerfile --build-arg INGESTION_DEPENDENCY=slim . + snyk container test openmetadata-ingestion-base-slim:scan --file=ingestion/operators/docker/Dockerfile $(SNYK_ARGS) --json > security-report/ingestion-docker-base-slim-scan.json | true; + .PHONY: snyk-report snyk-report: ## Uses Snyk CLI to run a security scan of the different pieces of the code @echo "To run this locally, make sure to install and authenticate using the Snyk CLI: https://docs.snyk.io/snyk-cli/install-the-snyk-cli" rm -rf security-report mkdir -p security-report $(MAKE) snyk-ingestion-report + $(MAKE) snyk-ingestion-base-slim-report $(MAKE) snyk-airflow-apis-report $(MAKE) snyk-server-report $(MAKE) snyk-ui-report