Skip to content

Go Security Checker

Go Security Checker #5

Workflow file for this run

name: "Code scanning"

Check failure on line 1 in .github/workflows/code-scan.yml

View workflow run for this annotation

GitHub Actions / Code scanning

Invalid workflow file

The workflow is not valid. .github/workflows/code-scan.yml: (Line: 34, Col: 13, Idx: 955) - (Line: 34, Col: 14, Idx: 956): While parsing a tag, did not find expected tag URI.
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
- cron: "26 14 * * 2"
workflow_call:
inputs:
gosec-args:
description: "Arguments passed to 'gosec' - see: https://github.com/securego/gosec/blob/HEAD/README.md#usage"
required: true
default: "-no-fail -show-ignored -fmt sarif -out results.sarif ./..."
type: string
jobs:
gosec:
name: Go Security Checker
runs-on: large_runner
permissions:
# Required to upload SARIF files
security-events: write
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run Gosec Security Scanner
if: inputs.gosec-args
uses: securego/gosec@e0cca6fe95306b7e7790d6f1bf6a7bec6d622459 # v2.22.0
with:
args: "${{ inputs.gosec-args }}"
- name: Run Gosec Security Scanner
if: ! inputs.gosec-args
uses: securego/gosec@e0cca6fe95306b7e7790d6f1bf6a7bec6d622459 # v2.22.0
with:
args: "-no-fail -show-ignored -fmt sarif -out results.sarif ./..."
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@17a820bf2e43b47be2c72b39cc905417bc1ab6d0 # v3.28.6
with:
sarif_file: results.sarif