Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ unit-test-java:

common-docker-build:
@echo ".: ⚙️ Build '$(name)' $(module) with BASE_IMG_TAG: '$(BASE_IMG_TAG)'."
docker build --build-arg=scannerVersion=$(shell yq e .appVersion ./Chart.yaml) --build-arg=baseImageTag=$(BASE_IMG_TAG) --build-arg=namespace=$(IMG_NS) -t $(IMG_NS)/$(module)-$(name):$(IMG_TAG) -f ./$(module)/Dockerfile ./$(module)
docker build \
--build-arg=scannerVersion=$(shell yq e .appVersion ./Chart.yaml) \
--build-arg=baseImageTag=$(BASE_IMG_TAG) \
--build-arg=namespace=$(IMG_NS) \
-t $(IMG_NS)/$(module)-$(name):$(IMG_TAG) \
-f ./$(module)/Dockerfile \
./$(module)

common-docker-export:
@echo ".: ⚙️ Saving new docker image archive to '$(module)-$(name).tar'."
Expand Down Expand Up @@ -125,6 +131,10 @@ deploy-test-dep-old-wordpress:
# Install old-wordpress app
helm -n demo-targets upgrade --install old-wordpress ../../demo-targets/old-wordpress/ --set="fullnameOverride=old-wordpress" --wait

deploy-test-dep-old-typo3:
# Install old-typo3 app
helm -n demo-targets upgrade --install old-typo3 ../../demo-targets/old-typo3/ --set="fullnameOverride=old-typo3" --wait

deploy-test-dep-juiceshop:
# Install juiceshop app
helm -n demo-targets upgrade --install juiceshop ../../demo-targets/juice-shop/ --set="fullnameOverride=juiceshop" --wait
Expand Down
2 changes: 1 addition & 1 deletion hooks.mk
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ deploy:
integration-tests:
@echo ".: 🩺 Starting integration test in kind namespace 'integration-tests'."
kubectl -n integration-tests delete scans --all
cd ../../tests/integration/ && npm ci && npx --yes --package jest@$(JEST_VERSION) jest --verbose --ci --colors --coverage --passWithNoTests hooks/$(name)-$(hook-prefix).test.js
cd ../../tests/integration/ && npm ci && npx --yes --package jest@$(JEST_VERSION) jest --verbose --ci --colors --coverage --passWithNoTests ${hook-prefix}s/$(name).test.js
2 changes: 1 addition & 1 deletion hooks/cascading-scans/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ deploy-test-dep-sslyze:
--set="parser.env[0].name=CRASH_ON_FAILED_VALIDATION" \
--set-string="parser.env[0].value=true"

deploy-test-deps: deploy-test-dep-nmap deploy-test-dep-ncrack
deploy-test-deps: deploy-test-dep-dummy-ssh deploy-test-dep-nmap deploy-test-dep-ncrack

deploy:
@echo ".: 💾 Deploying '$(name)' $(hook-prefix) HelmChart with the docker tag '$(IMG_TAG)' into kind namespace 'cascading-scans'."
Expand Down
11 changes: 11 additions & 0 deletions hooks/finding-post-processing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,14 @@ include_guard = set
hook = finding-post-processing

include ../../hooks.mk

deploy-test-deps: deploy-test-dep-test-scan

deploy:
@echo ".: 💾 Deploying '$(name)' $(hook-prefix) HelmChart with the docker tag '$(IMG_TAG)' into kind namespace 'integration-tests'."
helm -n integration-tests upgrade --install finding-post-processing . \
--set="hook.image.repository=docker.io/$(IMG_NS)/$(hook-prefix)-$(name)" \
--set="hook.image.tag=$(IMG_TAG)" \
--set="hook.image.pullPolicy=IfNotPresent" \
--set="rules[0].matches.anyOf[0].category=Host" \
--set="rules[0].override.severity=high"
2 changes: 1 addition & 1 deletion hooks/notification/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ deploy:
--values ../../tests/integration/hooks/__testFiles__/notification-values.yaml \
--set="hook.image.repository=docker.io/$(IMG_NS)/$(hook-prefix)-$(name)" \
--set="hook.image.tag=$(IMG_TAG)" \
--set="hook.image.pullPolicy=Never"
--set="hook.image.pullPolicy=IfNotPresent"

integration-tests:
@echo ".: 🩺 Starting integration test in kind namespace 'integration-tests'."
Expand Down
2 changes: 2 additions & 0 deletions scanners/nikto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ scanner = nikto
custom_scanner = set

include ../../scanners.mk

deploy-test-deps: deploy-test-dep-bodgeit
2 changes: 2 additions & 0 deletions scanners/typo3scan/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ scanner = typo3scan
custom_scanner = set

include ../../scanners.mk

deploy-test-deps: deploy-test-dep-old-typo3
1 change: 0 additions & 1 deletion tests/integration/scanner/git-repo-scanner.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ jest.retryTimes(3);

test(
"gitleaks should find at least 1 repository in the GitHub secureCodeBox organisation",
3,
async () => {
// This integration tests runs about 30min because of the GitHub Public API call rate limit.
// If you want to speed up you need to add an valid access token like: ['--git-type', 'github', '--organization', 'secureCodeBox', '--access-token', '23476VALID2345TOKEN'],
Expand Down