What changed, and why it matters
This commit adds a new automated security scanner to the project's continuous integration pipeline. It does not change any actual LND code, fix a bug, or patch a vulnerability. Instead, it introduces a weekly GitHub Actions workflow that builds the lnd and lncli release binaries and runs Google's govulncheck tool against them to detect known vulnerable Go dependencies. Findings are currently treated as warnings only (exit code 3 is advisory) while the team works through any existing baseline issues.
No immediate security action required. Monitor the new workflow's weekly output and transition the advisory-only exit-code-3 handling to a failing check once the existing vulnerability baseline is cleared. Ensure the GO_VERSION pin and govulncheck version are kept current.
Security signals we found
Adds automated vulnerability scanning (govulncheck) for release binaries
Scanner runs weekly and on relevant code/build changes
Advisory-only handling of findings while baseline is remediated
No product code changes; purely CI/tooling addition
Evidence from the diff
The diff creates .github/workflows/govulncheck.yml, a GitHub Actions workflow triggered on workflow_dispatch, a weekly cron schedule, pull requests touching Go/build files, pushes/merge groups to master. It checks out the repo, sets up Go 1.26.3, installs golang.org/x/vuln/cmd/govulncheck@v1.3.0, builds release binaries via make release-install, then runs govulncheck -mode=binary against $GOPATH/bin/lnd and $GOPATH/bin/lncli. Exit code 3 (known vulnerabilities found) is downgraded to a warning and recorded in the job summary; other non-zero exit codes fail the job. No application code, cryptography, networking, or consensus logic is modified.
Changed components
.github/workflows/govulncheck.ymlCI/CD pipelineRelease build process (lnd, lncli binaries)Inspect captured patch +109 / −0
diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml
new file mode 100644
index 0000000..ec18b10
--- /dev/null
+++ b/.github/workflows/govulncheck.yml
@@ -0,0 +1,109 @@
+name: Vulnerability scan
+
+on:
+ workflow_dispatch:
+ schedule:
+ # Run weekly to catch newly published vulnerabilities even when the code
+ # does not change.
+ - cron: "0 9 * * 1"
+ pull_request:
+ paths:
+ - ".github/workflows/govulncheck.yml"
+ - ".github/actions/setup-go/action.yml"
+ - "Makefile"
+ - "make/release_flags.mk"
+ - "**/*.go"
+ - "**/go.mod"
+ - "**/go.sum"
+ push:
+ branches:
+ - "master"
+ paths:
+ - ".github/workflows/govulncheck.yml"
+ - ".github/actions/setup-go/action.yml"
+ - "Makefile"
+ - "make/release_flags.mk"
+ - "**/*.go"
+ - "**/go.mod"
+ - "**/go.sum"
+ merge_group:
+ branches:
+ - "master"
+
+permissions:
+ contents: read
+
+defaults:
+ run:
+ shell: bash
+
+env:
+ # If you change this please also update GO_VERSION in Makefile (then run
+ # `make lint` to see where else it needs to be updated as well).
+ GO_VERSION: 1.26.3
+
+jobs:
+ govulncheck:
+ name: Scan release binaries
+ runs-on: ubuntu-latest
+ steps:
+ - name: Git checkout
+ uses: actions/checkout@v5
+ with:
+ fetch-depth: 0
+
+ - name: Setup Go ${{ env.GO_VERSION }}
+ uses: ./.github/actions/setup-go
+ with:
+ go-version: '${{ env.GO_VERSION }}'
+ key-prefix: govulncheck
+ use-build-cache: 'no'
+
+ - name: Install govulncheck
+ run: go install golang.org/x/vuln/cmd/govulncheck@v1.3.0
+
+ - name: Build release binaries
+ run: make release-install
+
+ - name: Run govulncheck
+ run: |
+ set +e
+
+ gopath="$(go env GOPATH)"
+ final_exit_code=0
+ advisory_findings=0
+
+ for binary in lnd lncli; do
+ output="govulncheck-${binary}.txt"
+ "${gopath}/bin/govulncheck" \
+ -mode=binary \
+ "${gopath}/bin/${binary}" 2>&1 | tee "${output}"
+ exit_code=${PIPESTATUS[0]}
+
+ {
+ echo "### govulncheck ${binary}"
+ echo
+ echo '```'
+ sed -n '1,200p' "${output}"
+ echo '```'
+ } >> "$GITHUB_STEP_SUMMARY"
+
+ if [ "$exit_code" -eq 3 ]; then
+ advisory_findings=1
+ continue
+ fi
+
+ if [ "$exit_code" -ne 0 ] && [ "$final_exit_code" -eq 0 ]; then
+ final_exit_code="$exit_code"
+ fi
+ done
+
+ if [ "$advisory_findings" -eq 1 ]; then
+ echo "::warning title=govulncheck findings::govulncheck found vulnerabilities; see the job summary for details."
+ {
+ echo
+ echo "> govulncheck exited with code 3 for one or more release binaries. This job is advisory while the existing vulnerability baseline is remediated."
+ } >> "$GITHUB_STEP_SUMMARY"
+ fi
+
+ exit "$final_exit_code"
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.