mirror of
https://github.com/securego/gosec.git
synced 2024-12-25 12:05: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
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
|
@ -31,6 +31,11 @@ jobs:
|
||||||
uses: golangci/golangci-lint-action@v3
|
uses: golangci/golangci-lint-action@v3
|
||||||
with:
|
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
|
- name: Run Tests
|
||||||
run: make test
|
run: make test
|
||||||
coverage:
|
coverage:
|
||||||
|
|
|
@ -72,6 +72,7 @@ jobs:
|
||||||
- name: Run Gosec Security Scanner
|
- name: Run Gosec Security Scanner
|
||||||
uses: securego/gosec@master
|
uses: securego/gosec@master
|
||||||
with:
|
with:
|
||||||
|
version: 'latest'
|
||||||
args: ./...
|
args: ./...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,10 @@ description: 'Runs the gosec security checker'
|
||||||
author: '@ccojocar'
|
author: '@ccojocar'
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
|
version:
|
||||||
|
description: 'Version of gosec to use (e.g. 2.15.0)'
|
||||||
|
required: false
|
||||||
|
default: 'latest'
|
||||||
args:
|
args:
|
||||||
description: 'Arguments for gosec'
|
description: 'Arguments for gosec'
|
||||||
required: true
|
required: true
|
||||||
|
@ -10,7 +14,7 @@ inputs:
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'docker://securego/gosec'
|
image: 'docker://securego/gosec:${{inputs.version}}'
|
||||||
args:
|
args:
|
||||||
- ${{ inputs.args }}
|
- ${{ inputs.args }}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue