Skip to content
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
wireguard-go
*LNETO_EQUIVALENCE.md
*_local.*
local
2 changes: 1 addition & 1 deletion device/pools_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func TestWaitPool(t *testing.T) {
}
wg.Wait()
if max.Load() != p.max {
t.Errorf("Actual maximum count (%d) != ideal maximum count (%d)", max, p.max)
t.Errorf("Actual maximum count (%d) != ideal maximum count (%d)", max.Load(), p.max)
}
}

Expand Down
5 changes: 4 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
module golang.zx2c4.com/wireguard

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing push of go.sum

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I'm still waiting on fixes to lneto before fixing a version. we currently use replace directive for it to work


go 1.23.1
go 1.24

require (
github.com/soypat/lneto v0.0.0-00010101000000-000000000000
golang.org/x/crypto v0.37.0
golang.org/x/net v0.39.0
golang.org/x/sys v0.32.0
Expand All @@ -14,3 +15,5 @@ require (
github.com/google/btree v1.1.2 // indirect
golang.org/x/time v0.7.0 // indirect
)

replace github.com/soypat/lneto => ../lneto

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Checking go.mod replace directive:"
rg -n '^\s*replace\s+github\.com/soypat/lneto' go.mod

echo
echo "Checking whether target path exists from repo root:"
python - <<'PY'
from pathlib import Path
p = Path("../lneto")
print(f"path: {p}")
print(f"resolved: {p.resolve()}")
print(f"exists: {p.exists()}")
PY

Repository: netbirdio/wireguard-go

Length of output: 261


Local replace directive breaks reproducible builds outside your workstation.

Line 19 references ../lneto, which does not exist in this repository. This prevents builds in CI and for external contributors. Move this local override to a developer-local go.work file instead, keeping go.mod resolvable on its own.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@go.mod` at line 19, Remove the replace directive for github.com/soypat/lneto
from go.mod (the line referencing ../lneto) since the relative path does not
exist in the repository and breaks builds in CI and for external contributors.
Instead, create or update a go.work file in the repository root to include this
local override, allowing developers to use it locally while keeping go.mod
reproducible and resolvable on its own.

Source: Linters/SAST tools

Loading