From 67c22f3e88a66e7c39d17846067f93c03d853333 Mon Sep 17 00:00:00 2001 From: Lukas Gravley Date: Thu, 4 Apr 2024 09:08:18 -0500 Subject: [PATCH 1/3] Update entrypoint.sh should be a value not boolean --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 6e8f71f..79fd708 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -168,7 +168,7 @@ if [ "$hideProgress" == "true" ];then ARGS="$ARGS --quiet" SARIF_ARGS="$SARIF_ARGS --quiet" fi -if [ "$dockerHost" == "true" ];then +if [ $dockerHost ];then ARGS="$ARGS --docker-host $dockerHost" fi From 29f88e685a08e75d51345027ab75380566114303 Mon Sep 17 00:00:00 2001 From: Lukas Gravley Date: Thu, 4 Apr 2024 09:08:47 -0500 Subject: [PATCH 2/3] Update action.yaml add example --- action.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yaml b/action.yaml index 9b49414..f13a5aa 100644 --- a/action.yaml +++ b/action.yaml @@ -95,7 +95,7 @@ inputs: description: 'limit severities for SARIF format' required: false docker-host: - description: 'unix domain socket path to use for docker scanning' + description: 'unix domain socket path to use for docker scanning, ex. unix:///var/run/docker.sock' required: false runs: @@ -126,4 +126,4 @@ runs: - '-v ${{ inputs.trivy-config }}' - '-x ${{ inputs.tf-vars }}' - '-z ${{ inputs.limit-severities-for-sarif }}' - - '-y ${{ inputs.docker-host }}' \ No newline at end of file + - '-y ${{ inputs.docker-host }}' From a7d40d18f5e4937d36a261a43acf4a5a02e25276 Mon Sep 17 00:00:00 2001 From: Lukas Gravley Date: Thu, 4 Apr 2024 09:10:31 -0500 Subject: [PATCH 3/3] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 648d08c..f84b80f 100644 --- a/README.md +++ b/README.md @@ -561,6 +561,7 @@ Following inputs can be used as `step.with` keys: | `trivy-config` | String | | Path to trivy.yaml config | | `github-pat` | String | | Authentication token to enable sending SBOM scan results to GitHub Dependency Graph. Can be either a GitHub Personal Access Token (PAT) or GITHUB_TOKEN | | `limit-severities-for-sarif` | Boolean | false | By default *SARIF* format enforces output of all vulnerabilities regardless of configured severities. To override this behavior set this parameter to **true** | +| `docker-host` | String | | By default it is set to `unix://var/run/docker.sock`, but can be updated to help with containerized infrastructure values | ### Environment variables You can use [Trivy environment variables][trivy-env] to set the necessary options (including flags that are not supported by [Inputs](#inputs), such as `--secret-config`).