Skip to content

Update github/codeql-action action to v3.26.11 #395

Update github/codeql-action action to v3.26.11

Update github/codeql-action action to v3.26.11 #395

name: build
on: [pull_request]
permissions:
contents: read
jobs:
build:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
id: setup-go
with:
go-version-file: "go.mod"
- name: Build
run: go build -v ./...
- name: Checkout And Build
run: docker compose up -d postgres
- name: Test
run: go test -v ./...
- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@d9cd5b1c23aaf8cb31bb09141028215828364bbb # master
with:
image-ref: ''
scan-type: 'fs'
ignore-unfixed: true
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@6db8d6351fd0be61f9ed8ebd12ccd35dcec51fea # v3.26.11
with:
sarif_file: 'trivy-results.sarif'