Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/.tox
/venv*
/tmp
/whitesource/*

.*ignore
!.gitignore
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ before_install:
- echo -e "machine github.ibm.com\n login $GHE_ACCESS_TOKEN" >> ~/.netrc # Login to GitHub Enterprise
install:
- pip install "certifi>=2022.12.07" "setuptools>=65.5.1" tox pipenv
script: make setup-trivy && make setup-cosign && make trivy-scan-python-vulnerabilities && make test
script: make setup-trivy && make setup-cosign && make trivy-scan-python-vulnerabilities && make setup-mend && make mend-scan && make test
cache:
directories:
- $HOME/.cache/pre-commit
Expand Down
12 changes: 11 additions & 1 deletion Makefile.ibm
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,15 @@ COSIGN_VERSION := $(shell curl -s "https://api.github.com/repos/sigstore/cosign/

TRAVIS_COMMIT ?= head

# Mend related
MEND ?= /tmp/mend

setup-trivy:
curl -sSfL https://github.com/aquasecurity/trivy/releases/download/v$(TRIVY_VERSION)/trivy_$(TRIVY_VERSION)_$(TRIVY_OS)-$(TRIVY_ARCH)bit.tar.gz -o /tmp/trivy.tar.gz
tar zxvf /tmp/trivy.tar.gz -C $(dir $(TRIVY)) trivy

setup-cosign:
curl -sSfL https://github.com/sigstore/cosign/releases/download/v$(COSIGN_VERSION)/cosign-linux-amd64 -o $(COSIGN)
curl -sSfL https://github.com/sigstore/cosign/releases/download/v$(COSIGN_VERSION)/cosign-linux-amd64 -o $(COSIGN)
chmod +x $(COSIGN)

trivy-scan-python-vulnerabilities:
Expand All @@ -66,6 +69,13 @@ trivy-scan-python-vulnerabilities:
pipenv lock
$(TRIVY) fs --exit-code 1 --ignore-unfixed --security-checks vuln ./

setup-mend:
curl -sSfL http://pokgsa.ibm.com/gsa/pokgsa/home/t/h/thota123/whitesource/Unified%20Agent/wss-unified-agent.jar -o $(MEND)
# sudo apt install openjdk-8-jdk -y

mend-scan:
java -jar $(MEND)/wss-unified-agent.jar -d ./

docker-quality-images:
for image_name in $(DOCKER_IMAGES_TO_SCAN) ; do \
$(TRIVY) image --exit-code 1 --ignore-unfixed $(DOCKER_DOMAIN_LOCAL)/$*$${image_name}; \
Expand Down