Skip to content

Added more unit tests and fixed some issues revealed by the unit tests #7

Added more unit tests and fixed some issues revealed by the unit tests

Added more unit tests and fixed some issues revealed by the unit tests #7

Workflow file for this run

name: Go-VulnCheck
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
osv-scanner:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Go 1.22
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version: '1.22'
- name: Clean Go environment and install dependencies
run: |
go clean -cache -modcache -i -r
go mod download
go mod tidy
- name: Build the project
run: |
go build ./...
go test ./...
- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Download OSV-Scanner
run: |
wget https://github.com/google/osv-scanner/releases/download/v1.8.1/osv-scanner_linux_amd64 -O osv-scanner
chmod +x osv-scanner
#- name: Run OSV-Scanner
# run: ./osv-scanner --recursive .
- name: Run govulncheck
run: govulncheck ./...