Add gosec version as an input parameter to GitHub action (#927)

* Add gosec version as a paramter to the Github action

* Run gosec as a github action as part of CI
This commit is contained in:
Cosmin Cojocar 2023-02-08 10:40:36 +01:00 committed by GitHub
parent 2d6b0a5b0f
commit d22a7b6ede
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 2 deletions

View file

@ -31,6 +31,11 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
version: ${{ matrix.version.golangci }}
- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
version: '2.15.0'
args: ./...
- name: Run Tests
run: make test
coverage:

View file

@ -72,6 +72,7 @@ jobs:
- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
version: 'latest'
args: ./...
```

View file

@ -3,6 +3,10 @@ description: 'Runs the gosec security checker'
author: '@ccojocar'
inputs:
version:
description: 'Version of gosec to use (e.g. 2.15.0)'
required: false
default: 'latest'
args:
description: 'Arguments for gosec'
required: true
@ -10,7 +14,7 @@ inputs:
runs:
using: 'docker'
image: 'docker://securego/gosec'
image: 'docker://securego/gosec:${{inputs.version}}'
args:
- ${{ inputs.args }}