Skip to content

Remove obsolete launcher tables and fix Mach-O parsing #5233

Remove obsolete launcher tables and fix Mach-O parsing

Remove obsolete launcher tables and fix Mach-O parsing #5233

Workflow file for this run

name: lint
on:
push:
branches: [main, master]
pull_request:
branches: '**'
merge_group:
types: [checks_requested]
permissions:
contents: read
jobs:
golangci:
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
name: lint
runs-on: ${{ matrix.os }}
steps:
- name: Harden runner
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit # Audit network and disk activity
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: './go.mod'
check-latest: true
cache: false
- run: make deps
- name: golangci-lint
uses: step-security/golangci-lint-action@ce3368d2f0a15c79206a120861e3f847c8beb466 # v9.2.1
with:
skip-save-cache: true
# Run again as a workaround for https://github.com/golangci/golangci-lint-action/issues/362
- name: golangci-lint
if: ${{ always() }}
run: golangci-lint run
govulncheck:
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
name: govulncheck
runs-on: ${{ matrix.os }}
steps:
- name: Harden runner
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit # Audit network and disk activity
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: './go.mod'
check-latest: true
cache: false
- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@3e6f44f962742443c11ae2261f02e0c917aeb2bc # v1.5.0
shell: bash
# For false positives, filtering out in jq by `select(.osv != "GO-2024-3166")`
# and exiting 0 early allows ignoring specific vulns.
- id: govulncheck
shell: bash
run: |
if govulncheck -C . ./...; then
echo "govulncheck exited zero"
exit 0
fi
echo "govulncheck exited non-zero, capturing output"
govulncheck -C . -format json ./... > govulncheck.json
findingCount=$(jq -r '.finding | select ( . != null ) | .osv' govulncheck.json | wc -l)
findingCount=$((findingCount + 0))
printf "govulncheck reports %d findings" "$findingCount"
jq -r '.finding | select ( . != null )' govulncheck.json
exit 1
table_specs:
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
name: table specs
runs-on: ${{ matrix.os }}
steps:
- name: Harden runner
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit # Audit network and disk activity
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: './go.mod'
check-latest: true
cache: false
- run: make deps
- name: Build launcher
run: go build -o ./build/launcher ./cmd/launcher
- name: Check table specs
run: ./build/launcher specs --required description --required name --quiet
# This job is here as a github status check -- it allows us to move
# the merge dependency from being on all the jobs to this single
# one.
lint_mergeable:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: Harden runner
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit # Audit network and disk activity
- run: true
needs:
- golangci
- govulncheck
- table_specs