Repository navigation
fix: detect port changes on one address of a DNS target - #1248
Merged
Merged
Conversation
A DNS target is compared as one logical unit whose ports are merged across its resolved addresses, so a port that opened on one address while another already exposed it, or closed on one address while another kept it open, produced no change, incident or notification, also in the default address-sensitive mode. Address-sensitive mode now compares, for a port that is positive in both the baseline and the scan, which addresses in both DNS answers expose it. Each difference is a port-address change with the address in the new address field, reported as for example "edge.example tcp/22 on 2001:db8::10: not-open -> open". Ports without address evidence are unknown and take their addresses from the next complete scan, closures on a down host are left to its host change, incomplete scans report openings on complete addresses and defer closures, and findings a complete scan cannot compare are retired rather than recovered. Aggregate mode ignores per-address ports. Baseline samples converge only on the same per-address ports. Accepting a port-address incident updates the baseline evidence and host view; accepting a closure recomputes the service from the remaining addresses and resolves a service incident reporting it. The console labels the new kind with its address. Existing baselines can report per-address drift that built up before the upgrade. Fixes #1222
Deploying edgewatch with
|
| Latest commit: |
58fc9e0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7e6defb6.edgewatch-cpd.pages.dev |
| Branch Preview URL: | https://fix-dns-per-address-ports.edgewatch-cpd.pages.dev |
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
Fixes the false negative in #1222. A DNS name is one logical unit whose ports are merged across its resolved addresses, and nothing compared which addresses expose a port. A port opening on the IPv6 address of a dual-stack name while IPv4 already had it, or closing on one address while another kept it, produced no change, incident or notification, even in the default
address_sensitivemode.Comparison (
internal/engine)dns-added/dns-removed.port-addresschange with keyport-address|<target>|<proto>|<port>|<address>:Change.addressfield carries the IP.critical(warningforopen|filtered); a closure isinfo.edge.example tcp/22 on 2001:db8::10: not-open -> open.Protections
aggregatemode dropsport-addresschanges entirely.Baseline learning
Snapshot.Hash()is unchanged, and snapshots without DNS port evidence hash exactly as before.Accepting an incident (
internal/store/incident_actions.go)acceptedServiceForEvidence). If an open service incident reports exactly that service, it is resolved in the same action.Console and docs
edge.example (2001:db8::10)in incidents, scan changes, pending confirmations and Activity.jobs-baselines-incidents.md, the job editor's DNS comparison help, andapi-compatibility.md(a newport-addresssection) are updated.Compatibility (call out in release notes)
port-addressand a newaddressfield on changes, omitted for other kinds. There are no schema changes.Validation
gofmt,go vet ./...go test -race:internal/engine,internal/model,internal/web,internal/appandinternal/scanner;internal/store.main:npm run lint, Vitest (45 files, 478 tests passed), and the engine, model and incident store tests again.npm --prefix docs run buildNew tests:
internal/engine/dns_port_address_test.go:internal/store/incident_port_address_test.go: accepting a per-address incident updates the baseline evidence, and the next identical scan reports nothing.Fixes #1222