Update README with some instruction how to run gosec as a GitHub action

Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>
This commit is contained in:
Cosmin Cojocar 2020-04-06 18:13:28 +02:00 committed by Cosmin Cojocar
parent 08202fee80
commit 3b6c3f13f1

View file

@ -47,6 +47,32 @@ echo "<check sum from the check sum file> gosec_vX.Y.Z_OS.tar.gz" | sha256sum -
gosec --help gosec --help
``` ```
### GitHub Action
You can run `gosec` as a GitHub action as follows:
```yaml
name: Run Gosec
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
tests:
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Checkout Source
uses: actions/checkout@v2
- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
args: ./...
```
### Local Installation ### Local Installation