mirror of
https://github.com/securego/gosec.git
synced 2024-12-24 11:35:52 +00:00
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:
parent
2d6b0a5b0f
commit
d22a7b6ede
3 changed files with 12 additions and 2 deletions
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
|
@ -30,7 +30,12 @@ jobs:
|
|||
- name: lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: ${{ matrix.version.golangci }}
|
||||
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:
|
||||
|
|
|
@ -72,6 +72,7 @@ jobs:
|
|||
- name: Run Gosec Security Scanner
|
||||
uses: securego/gosec@master
|
||||
with:
|
||||
version: 'latest'
|
||||
args: ./...
|
||||
```
|
||||
|
||||
|
|
|
@ -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 }}
|
||||
|
||||
|
|
Loading…
Reference in a new issue