You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Small untested branches: validTarget length, library sources, SARIF and report edges #486
A few small branches with user-visible effects have no test: part of CNAME target validation, the public library source constructors, and some output and subenum report edge cases.
Where and what to add
internal/dns/cname.go:58 (validTarget: the name == "" || len(name) > 253 || !validLabels(name) branch has count 0; TestCNAMEInvalidTarget only uses bad characters). Table test: "", ".", a 254-byte name, a 64-byte label, "a..b" are false; "_svc.edge-1.example.net." is true.
pkg/subenum/sources.go:42, pkg/subenum/zone.go:138, :167 (CertSpotter(), zoneSource.Names, walkSource.Names are 0%). Test that CertSpotter().Name() == "certspotter", that every exported constructor returns a non-nil source with the CLI's label, and that ZoneTransfer(opts).Names and NSECWalk(opts).Names against the lab server return the zone's names.
internal/output/sarif.go:97 (dangling-srv rule mapping). SARIF golden case: rule subenum/dangling-srv, name DanglingSRV.
internal/output/writer.go:274 (text PARTIAL suffix). A partial result's line ends with PARTIAL.
internal/cli/runreport.go:57, :107-115. subenum report with -results as a JSON array, with {bad, and with a -stats file {}: expected entries, "reading -results file", "not a subenum -stats report", non-zero exit for the errors.
Impact
These are thin branches, but a renamed SARIF rule ID breaks code-scanning dedupe for users, and the report error paths could regress to panics.
Getting started
How to run tests: go test ./internal/dns ./internal/output ./internal/cli ./pkg/subenum
Filed by repo-audit/full-audit at a45b999. Severity: low. Effort: S. audit-key: testing|internal/output/sarif.go|small edges
Activity