Skip to content

Commit

Permalink
fix(sbom): Fix leading whitespaces for format var.
Browse files Browse the repository at this point in the history
Signed-off-by: Simar <simar@linux.com>
  • Loading branch information
simar7 committed Jun 20, 2022
1 parent 6f9d699 commit c0bebbf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
@@ -1,5 +1,5 @@
FROM ghcr.io/aquasecurity/trivy:0.29.0
COPY entrypoint.sh /
RUN apk --no-cache add bash
RUN apk --no-cache add bash curl
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
3 changes: 2 additions & 1 deletion entrypoint.sh
Expand Up @@ -90,6 +90,7 @@ fi

SARIF_ARGS=""
ARGS=""
format=$(echo $format | xargs)
if [ $format ];then
ARGS="$ARGS --format $format"
fi
Expand Down Expand Up @@ -177,7 +178,7 @@ fi

if [[ "${format}" == "github" ]]; then
echo "Uploading GitHub Dependency Snapshot"
curl -u "${githubPAT}" -H 'Content-Type: application/json' 'https://api.github.com/repos/'$GITHUB_REPOSITORY'/dependency-graph/snapshots' -d @./dependency-results.sbom.json
curl -u "${githubPAT}" -H 'Content-Type: application/json' 'https://api.github.com/repos/argonsecurity/package-test/dependency-graph/snapshots' -d @./${output}
fi

exit $returnCode

0 comments on commit c0bebbf

Please sign in to comment.