Skip to content

Commit f72b7e8

Browse files
authored
Make 'hide-progress' input working again (#323)
* Make hide-progress input working again * Unify 'hide-progress' default value
1 parent d710430 commit f72b7e8

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
run: |
116116
docker pull <your-docker-image>
117117
docker save -o vuln-image.tar <your-docker-image>
118-
118+
119119
- name: Run Trivy vulnerability scanner in tarball mode
120120
uses: aquasecurity/trivy-action@master
121121
with:
@@ -287,7 +287,7 @@ jobs:
287287
uses: aquasecurity/trivy-action@master
288288
with:
289289
scan-type: 'config'
290-
hide-progress: false
290+
hide-progress: true
291291
format: 'sarif'
292292
output: 'trivy-results.sarif'
293293
exit-code: '1'
@@ -303,7 +303,7 @@ jobs:
303303
### Using Trivy to generate SBOM
304304
It's possible for Trivy to generate an [SBOM](https://www.aquasec.com/cloud-native-academy/supply-chain-security/sbom/) of your dependencies and submit them to a consumer like [GitHub Dependency Graph](https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph).
305305

306-
The [sending of an SBOM to GitHub](https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/using-the-dependency-submission-api) feature is only available if you currently have GitHub Dependency Graph [enabled in your repo](https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-graph#enabling-and-disabling-the-dependency-graph-for-a-private-repository).
306+
The [sending of an SBOM to GitHub](https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/using-the-dependency-submission-api) feature is only available if you currently have GitHub Dependency Graph [enabled in your repo](https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-graph#enabling-and-disabling-the-dependency-graph-for-a-private-repository).
307307

308308
In order to send results to GitHub Dependency Graph, you will need to create a [GitHub PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) or use the [GitHub installation access token](https://docs.github.com/en/actions/security-guides/automatic-token-authentication) (also known as `GITHUB_TOKEN`):
309309

@@ -554,7 +554,7 @@ Following inputs can be used as `step.with` keys:
554554
| `cache-dir` | String | | Cache directory |
555555
| `timeout` | String | `5m0s` | Scan timeout duration |
556556
| `ignore-policy` | String | | Filter vulnerabilities with OPA rego language |
557-
| `hide-progress` | String | `true` | Suppress progress bar |
557+
| `hide-progress` | String | `false` | Suppress progress bar and log output |
558558
| `list-all-pkgs` | String | | Output all packages regardless of vulnerability |
559559
| `scanners` | String | `vuln,secret` | comma-separated list of what security issues to detect (`vuln`,`secret`,`config`) |
560560
| `trivyignores` | String | | comma-separated list of relative paths in repository to one or more `.trivyignore` files |
@@ -575,4 +575,4 @@ When using the `trivy-config` [Input](#inputs), you can set options using the [T
575575
[license]: https://github.com/aquasecurity/trivy-action/blob/master/LICENSE
576576
[license-img]: https://img.shields.io/github/license/aquasecurity/trivy-action
577577
[trivy-env]: https://aquasecurity.github.io/trivy/latest/docs/configuration/#environment-variables
578-
[trivy-config]: https://aquasecurity.github.io/trivy/latest/docs/references/configuration/config-file/
578+
[trivy-config]: https://aquasecurity.github.io/trivy/latest/docs/references/configuration/config-file/

action.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ inputs:
6565
required: false
6666
default: ''
6767
hide-progress:
68-
description: 'hide progress output'
68+
description: 'suppress progress bar and log output'
6969
required: false
7070
list-all-pkgs:
7171
description: 'output all packages regardless of vulnerability'
@@ -123,4 +123,3 @@ runs:
123123
- '-v ${{ inputs.trivy-config }}'
124124
- '-x ${{ inputs.tf-vars }}'
125125
- '-z ${{ inputs.limit-severities-for-sarif }}'
126-

entrypoint.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ if [ $skipDirs ];then
137137
fi
138138
if [ $tfVars ] && [ "$scanType" == "config" ];then
139139
ARGS="$ARGS --tf-vars $tfVars"
140-
fi
140+
fi
141141

142142
if [ $trivyIgnores ];then
143143
for f in $(echo $trivyIgnores | tr "," "\n")
@@ -162,8 +162,8 @@ if [ $ignorePolicy ];then
162162
SARIF_ARGS="$SARIF_ARGS --ignore-policy $ignorePolicy"
163163
fi
164164
if [ "$hideProgress" == "true" ];then
165-
ARGS="$ARGS --no-progress"
166-
SARIF_ARGS="$SARIF_ARGS --no-progress"
165+
ARGS="$ARGS --quiet"
166+
SARIF_ARGS="$SARIF_ARGS --quiet"
167167
fi
168168

169169
listAllPkgs=$(echo $listAllPkgs | tr -d '\r')

0 commit comments

Comments
 (0)