Skip to content

Bump golang from c03b757 to 198bbce #1752

Bump golang from c03b757 to 198bbce

Bump golang from c03b757 to 198bbce #1752

Workflow file for this run

name: "Security"
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '30 12 * * 3'
jobs:
gosec:
name: gosec check
runs-on: ubuntu-latest
# Skip any created PR or push by dependabot to avoid permission issues
if: github.actor != 'dependabot[bot]'
env:
GO111MODULE: on
steps:
- name: Checkout Source
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
- name: Run gosec security scanner
uses: securego/gosec@424fc4cd9c82ea0fd6bee9cd49c2db2c3cc0c93f # v2.22.11
with:
# with '-no-fail' we let the report trigger content trigger a failure using the GitHub Security features.
args: "-no-fail -fmt sarif -out gosec.sarif ./..."
- name: Upload SARIF file for GitHub Advanced Security Dashboard
uses: github/codeql-action/upload-sarif@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v3
with:
sarif_file: gosec.sarif
semgrep:
name: semgrep scan
runs-on: ubuntu-latest
# Skip any created PR or push by dependabot to avoid permission issues
if: github.actor != 'dependabot[bot]'
container:
image: returntocorp/semgrep:latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
# we let the report trigger content trigger a failure using the GitHub Security features.
# see https://semgrep.dev/docs/cli-usage/#exit-codes for more details.
- name: Run semgrep security scanner
run: |
cat << 'EOF' | bash
semgrep ci --config="auto" --config="r/default" --config="r/go" --config="r/dgryski" \
--config="r/trailofbits" --config="r/dockerfile" --config="r/bash" \
--config="r/problem-based-packs" --config="r/generic" --config="r/yaml" --config="r/json" \
--config="./.semgrep/rules" --sarif --dataflow-traces --output=semgrep.sarif --max-target-bytes=2MB
EXIT_CODE=$?
if [ "$EXIT_CODE" = "0" ] || [ "$EXIT_CODE" = "1" ]
then
exit 0
else
exit $EXIT_CODE
fi
EOF
- name: Upload SARIF file for GitHub Advanced Security Dashboard
uses: github/codeql-action/upload-sarif@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v3
with:
sarif_file: semgrep.sarif
vuln-scan:
name: Vulnerability scanner
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: 1.25.x
check-latest: true
cache: true
- name: Run go list
run: go list -json -deps ./... > go.list
- name: Nancy
if: (github.repository == 'wavesplatform/nodemon' && github.event.pull_request.head.repo.fork != true)
uses: sonatype-nexus-community/nancy-github-action@726e338312e68ecdd4b4195765f174d3b3ce1533 # v1.0.3
with:
nancyVersion: latest
goListFile: go.list
nancyCommand: sleuth --username ${{ vars.OSSINDEX_USER }} --token ${{ secrets.OSSINDEX_TOKEN }}
- name: govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest && govulncheck ./...