TASK-0015 NetGuard reality collector core - #8
Merged
lr00rl merged 2 commits intoJul 31, 2026
Conversation
G3 needs reliable host-fact normalization before the server endpoint and poll-loop semantics are introduced. This adds a parser-first collector behind an injected command runner so the node-agent can prove listener, interface, nft table, and version handling without executing live host discovery in tests. Constraint: TASK-0015 is limited to node-agent collector core; server API and poll-loop wiring wait for a contract-backed follow-up Rejected: Wire the collector into the running agent now | that would add reporting behavior before the /api/agent/guard-reality contract exists Confidence: high Scope-risk: narrow Directive: Keep guard reality as low-trust display/diff input; do not let collected facts silently author firewall policy Tested: go test -race -cover ./internal/guardreality -count=1 (81.1%) Tested: go vet ./... Tested: go test -race -cover ./... Not-tested: Live ss/ip/nft collection on a Linux host; server ingestion and dashboard drift rendering
The collector does not call gRPC, but the PR gate evaluates the whole node-agent module. Update the existing gRPC dependency to the first fixed version reported by govulncheck so the branch can be judged on its guarded collector changes. Constraint: PR #8 runs govulncheck ./... across the full node-agent module and flags GO-2026-6061 in existing proxyusage code. Constraint: TASK-0015 allowed paths include go.mod and go.sum but not workflow or proxyusage changes. Rejected: Disable or narrow govulncheck | would weaken the repo gate and touches forbidden CI scope. Rejected: Refactor proxyusage away from gRPC | outside TASK-0015 collector-core scope. Confidence: medium Scope-risk: moderate Directive: Do not downgrade google.golang.org/grpc below v1.82.1 without re-running govulncheck against proxyusage. Tested: gofmt-clean; go vet ./...; go test -race -cover ./... Not-tested: local govulncheck is blocked by host Go go1.26.1 stdlib advisories; PR CI uses Go 1.26.5 and is the authoritative gate for this scan.
Contributor
Author
|
Landed on origin/integration as 3e505d6.\n\nVerification before integration push:\n- PR #8 ci/go success at exact head f87058e.\n- Merge commit first parent: 03f730a; second parent: f87058e.\n- Local merge worktree: gofmt-clean, go vet ./..., go test -race -cover ./..., redaction scan with inspected synthetic fixture IP ledger.\n\nGitHub already marked the PR merged after the integration push; branch left in place as the review record. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary\n- add internal guardreality collector/parser package for NetGuard G3a\n- normalize ss/ip/nft outputs into model.GuardNodeReality\n- keep command execution injected in tests; no server API or agent poll-loop wiring\n\n## Local verification\n- go test -race -cover ./internal/guardreality -count=1 (81.1%)\n- gofmt-clean\n- go vet ./...\n- go test -race -cover ./...\n\n## Boundaries\n- allowed paths only: lattice-node-agent/internal/guardreality/**\n- no dependencies, no workflows, no live ss/ip/nft/root execution, no server API