Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
fix vuln jobs
Antonio Ojea663b1e81a41b
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.ymldeleted file mode 100644index 1ef64bff..00000000--- a/.github/workflows/codeql.yml+++ /dev/null@@ -1,38 +0,0 @@-name: CodeQL--on:- push:- branches:- - 'main'- tags:- - 'v*'- pull_request:- branches: [ main ]- schedule:- - cron: '0 6 * * 1'--permissions:- contents: read--env:- GO_VERSION: "1.26"--jobs:- analyze:- runs-on: ubuntu-latest- permissions:- contents: read- security-events: write- steps:- - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5- with:- go-version: ${{ env.GO_VERSION }}- cache: false- - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1- with:- persist-credentials: false- - uses: github/codeql-action/init@c4dd10e44af883a891fe31ced449bcb4a6728b9b # v3.37.6- with:- languages: go- - uses: github/codeql-action/autobuild@c4dd10e44af883a891fe31ced449bcb4a6728b9b # v3.37.6- - uses: github/codeql-action/analyze@c4dd10e44af883a891fe31ced449bcb4a6728b9b # v3.37.6diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.ymlindex 08839f93..3d602668 100644--- a/.github/workflows/govulncheck.yml+++ b/.github/workflows/govulncheck.yml@@ -22,7 +22,47 @@ jobs:runs-on: ubuntu-lateststeps:- id: govulncheck+ continue-on-error: trueuses: golang/govulncheck-action@032d45514ae346b1db93c04b0c90b841c370344f # v1.1.0with:go-version-input: ${{ env.GO_VERSION }}go-package: ./...+ output-file: govulncheck.txt+ - name: Fail only on vulnerabilities we haven't explicitly accepted+ run: |+ set -euo pipefail+ cat govulncheck.txt++ # GO-2024-3218 (CVE-2023-26248): content-censorship risk inherent to+ # Kademlia DHT routing in github.com/libp2p/go-libp2p-kad-dht.+ # Upstream advisory lists "no known fixed" version, since it's a+ # structural property of Kademlia DHTs, not a patchable bug. SAM's+ # mesh transport depends fundamentally on this module.+ # See https://pkg.go.dev/vuln/GO-2024-3218. Re-evaluate if this ever+ # gets a fixed version upstream.+ accepted=("GO-2024-3218")++ found=$(grep -oE '^Vulnerability #[0-9]+: GO-[0-9]{4}-[0-9]+' govulncheck.txt | awk '{print $3}' | sort -u || true)++ unaccepted=""+ for id in $found; do+ skip=false+ for a in "${accepted[@]}"; do+ [ "$a" = "$id" ] && skip=true && break+ done+ if [ "$skip" = false ]; then+ unaccepted="$unaccepted $id"+ fi+ done++ if [ -n "$unaccepted" ]; then+ echo "::error::New/unaccepted vulnerabilities found:$unaccepted"+ exit 1+ fi++ if [ "${{ steps.govulncheck.outcome }}" = "failure" ] && [ -z "$found" ]; then+ echo "::error::govulncheck failed for a reason other than a detected vulnerability; see output above."+ exit 1+ fi++ echo "OK - vulnerabilities found (all accepted): ${found:-none}"