diff --git a/README.md b/README.md index 0f88ecc..83450c5 100644 --- a/README.md +++ b/README.md @@ -64,13 +64,16 @@ govulncheck GitHub Action accepts several other optional inputs: work-dir: directory in which to run govulncheck, default '.' repo-checkout: checkout the repository, default true check-latest: check for the latest Go version, default false +cache: specify if caching is needed, default true +cache-dependency-path: specify path to go.sum file (for monorepos), default '' go-version-file: go.mod or go.work file specifying Go version, default '' output-format: the format of govulncheck output ('text', 'json', or 'sarif'), default 'text' output-file: the file to which the output is redirected, default '' (no redirection) ``` -The precedence for inputs `go-version-input`, `go-version-file`, and `check-latest` -specifying Go version is inherited from [actions/setup-go](https://github.com/actions/setup-go). +The precedence for inputs `go-version-input`, `go-version-file`, `check-latest`, +`cache`, and `cache-dependency-path` specifying Go version and caches is inherited +from [actions/setup-go](https://github.com/actions/setup-go). The govulncheck-action follows the exit codes of govulncheck command. Specifying the output format 'json' or 'sarif' will return success even if diff --git a/action.yml b/action.yml index 3115899..612cd3b 100644 --- a/action.yml +++ b/action.yml @@ -13,6 +13,10 @@ inputs: description: 'Used to specify whether Go caching is needed. Set to true, if you would like to enable caching.' required: false default: true + cache-dependency-path: + description: 'Used to specify the path to a dependency file (for monorepos) - go.sum' + required: false + default: '' go-package: description: 'Go Package to scan with govulncheck' required: false @@ -47,6 +51,7 @@ runs: check-latest: ${{ inputs.check-latest }} go-version-file: ${{ inputs.go-version-file }} cache: ${{ inputs.cache }} + cache-dependency-path: ${{ inputs.cache-dependency-path }} - name: Install govulncheck run: go install golang.org/x/vuln/cmd/govulncheck@latest shell: bash