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
2 changes: 1 addition & 1 deletion .circleci/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
exit 1
fi
- security/assess_image:
image: docker.io/security-sample:v1
image: ${IMAGE_TO_USE}
severity: critical
report_path: /tmp/sample-vuln-report.json
- run:
Expand Down
1 change: 1 addition & 0 deletions src/commands/assess_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ parameters:
The Docker image to scan. Support following schemes
(1) 'repo-name/image-name:tag' (2) '/path/to/image.tar'. Bases on provided scheme
it will either use local Docker daemon or tarball archive from disk as a source.
Performs environment variable substitution before using the value of this parameter.
scanners:
type: string
default: vuln secret
Expand Down
4 changes: 3 additions & 1 deletion src/examples/image_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ usage:
vuln-and-secrets:
machine:
image: ubuntu-2204:current
environment:
TARGET_IMAGE: studiondev/node-security:lts
steps:
- checkout
- security/assess_image:
image: studiondev/node-security:lts
image: ${TARGET_IMAGE}
severity: medium
ignore-fix-status: not-fixed,wont-fix
exclude: /usr /var/**/*.log
Expand Down
1 change: 1 addition & 0 deletions src/scripts/assess-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ if [[ -z "${PARAM_STR_IMAGE}" ]]; then
exit 1
fi

PARAM_STR_IMAGE=$(circleci env subst "${PARAM_STR_IMAGE}")

function scan_secrets () {
local args=(image "--scanners=secret" "--image-config-scanners=secret")
Expand Down