Add new rule G407 to detect hard-coded nonce and initialization vectors in crypto algorithms #1342
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
strategy: | |
matrix: | |
version: [{go: '1.22.6', golangci: 'latest'}, {go: '1.23.0', golangci: 'latest'}] | |
runs-on: ubuntu-latest | |
env: | |
GO111MODULE: on | |
steps: | |
- name: Setup go ${{ matrix.version.go }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.version.go }} | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: ${{ matrix.version.golangci }} | |
- name: Run Gosec Security Scanner | |
uses: securego/gosec@master | |
with: | |
args: ./... | |
- name: Run Tests | |
run: make test | |
- name: Perf Diff | |
run: make perf-diff | |
coverage: | |
needs: [test] | |
runs-on: ubuntu-latest | |
env: | |
GO111MODULE: on | |
steps: | |
- name: Setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23.0' | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Create Test Coverage | |
run: make test-coverage | |
- name: Upload Test Coverage | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true |