Skip to content

Commit

Permalink
Rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
FayeSGW authored Nov 2, 2023
1 parent e7e412b commit 12f2d6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions snyk_scan_live_artifacts_and_report_to_kosli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export KOSLI_HOST="${2:-https://app.kosli.com}"
FLOW= # eg differ
GIT_COMMIT= # eg 44e6c271b46a56acd07f3b426c6cbca393442bb4
FINGERPRINT= # eg c6cd1a5b122d88aaeb41c1fdd015ad88c2bea95ae85f63eb5544fb707254847e
IMAGE_NAME= # eg 274425519734.dkr.ecr.eu-central-1.amazonaws.com/differ:44e6c27
ARTIFACT_NAME= # eg 274425519734.dkr.ecr.eu-central-1.amazonaws.com/differ:44e6c27

snyk_scan_live_artifacts_and_report_any_new_vulnerabilities_to_kosli()
{
Expand All @@ -30,7 +30,7 @@ snyk_scan_live_artifacts_and_report_any_new_vulnerabilities_to_kosli()
FLOW=$(jq -r ".artifacts[$i].flow_name" ${snapshot_json_filename})
GIT_COMMIT=$(jq -r ".artifacts[$i].git_commit" ${snapshot_json_filename})
FINGERPRINT=$(jq -r ".artifacts[$i].fingerprint" ${snapshot_json_filename})
IMAGE_NAME=$(jq -r ".artifacts[$i].name" ${snapshot_json_filename})
ARTIFACT_NAME=$(jq -r ".artifacts[$i].name" ${snapshot_json_filename})
report_any_new_snyk_vulnerability_to_kosli
fi
done
Expand All @@ -57,7 +57,7 @@ run_snyk_scan()
{
local -r snyk_output_json_filename="${1}"
# Use fingerprint in image name for absolute certainty of image's identity.
local -r image_name="${IMAGE_NAME}@sha256:${FINGERPRINT}"
local -r image_name="${ARTIFACT_NAME}@sha256:${FINGERPRINT}"
local -r snyk_policy_filename=.snyk

# All cyber-dojo microservice repos hold a .snyk policy file.
Expand Down

0 comments on commit 12f2d6b

Please sign in to comment.