Skip to content

Commit 207cd40

Browse files
Fix docker host bug (#329)
* Update entrypoint.sh should be a value not boolean * Update action.yaml add example * Update README.md
1 parent 840deb4 commit 207cd40

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,7 @@ Following inputs can be used as `step.with` keys:
590590
| `trivy-config` | String | | Path to trivy.yaml config |
591591
| `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 |
592592
| `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** |
593+
| `docker-host` | String | | By default it is set to `unix://var/run/docker.sock`, but can be updated to help with containerized infrastructure values |
593594

594595
### Environment variables
595596
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`).

action.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ inputs:
9595
description: 'limit severities for SARIF format'
9696
required: false
9797
docker-host:
98-
description: 'unix domain socket path to use for docker scanning'
98+
description: 'unix domain socket path to use for docker scanning, ex. unix:///var/run/docker.sock'
9999
required: false
100100

101101
runs:
@@ -126,4 +126,4 @@ runs:
126126
- '-v ${{ inputs.trivy-config }}'
127127
- '-x ${{ inputs.tf-vars }}'
128128
- '-z ${{ inputs.limit-severities-for-sarif }}'
129-
- '-y ${{ inputs.docker-host }}'
129+
- '-y ${{ inputs.docker-host }}'

entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ if [ "$hideProgress" == "true" ];then
168168
ARGS="$ARGS --quiet"
169169
SARIF_ARGS="$SARIF_ARGS --quiet"
170170
fi
171-
if [ "$dockerHost" == "true" ];then
171+
if [ $dockerHost ];then
172172
ARGS="$ARGS --docker-host $dockerHost"
173173
fi
174174

0 commit comments

Comments
 (0)