Repository navigation
2.0: security fetch provenance, final transport and DNS answers (#774, #775, #776) - #801
Merged
Merged
Conversation
Each lookup is found, absent (NXDOMAIN/NODATA) or unknown (timeout, SERVFAIL); unknown answers produce no finding, read 'unknown' in the PDF and record a failed collection per check (network_dns.caa, dnskey, mx, spf). CAA and DNSKEY walk up to the parent domains; MX unknown leaves SPF unknown instead of 'no mail'. The resolver is a trait, tested with a scripted resolver for NODATA, NXDOMAIN, SERVFAIL, timeout and delegation. Only complete answers are cached per host.
…#775) The header probe records source, method, status, requested and final URL. A timeout, refused connection or error status (WAF 403) is a failed collection, not an empty header set; a rejected HEAD falls back to GET. HTTPS is read from the probe's final URL, and security.document_match checks that the probe ended on the document the browser audited. Source maps and the certificate state record their own collections; counter-cases run against a local server (refused, timeout, 405, 403, redirect).
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.
Package 2, part 3: security, transport and DNS on the collection contract (#799).
#774 Security header fetch
security.fetchrecords:http_probe, a request outside the browser, so it is distinguishable from the browser's document response;HEAD.HEADthat fails or is rejected (405, 403, …) falls back toGET.Each of these is a failed collection (
security.headers), not an empty header set, so it produces no findings and no score:http_timeout);http_connect_failed);http_error_status).Source maps record their own collection. Assets that did not answer make the check partial, and an unreachable page makes it failed instead of "no leaks".
The certificate state records its own collection:
certificate_state_unavailable;It replaces the old
certificate_listenersubcheck.Counter-cases run against a local server: refused connection, timeout,
HEAD405 withGETfallback, 403, and a redirect with its final URL.#775 Transport of the audited document
security.document_match(scoring) compares the probe's final scheme and host with the browser's final URL. On a mismatch the headers describe another document, so security is partial and does not count toward the overall score.http_to_https, redirect chain).#776 DNS answers
Every lookup returns one of three outcomes:
dns_timeout,dns_lookup_failed).Unknown produces no finding, reads "unknown" in the PDF, and records a failed collection for that check (
network_dns.caa,dnskey,mx,spf).CAA and DNSKEY walk up the parent domains, following RFC 8659 tree climbing; DNSKEY sits at the zone apex. The DNSSEC scope is documented: a published DNSKEY, no chain validation.
MX unknown makes SPF unknown, not "no mail".
The resolver is a trait. A scripted resolver tests NODATA, NXDOMAIN, SERVFAIL, timeout and delegation.
Only complete answers are cached per host.
Validation (local, all green)
fmtpasses, andclippy -D warningsis clean with all features and with no default features.cargo test --all-featurespasses, including the security detection corpus.integration_test45/45,detection_corpus_test,schema_rules_detection_corpus_test,vulnerable_libs_detection_corpus_test,easy_language_detection_test,help_mechanisms_detection_test,score_calibration_test.reference_sites_testshows no deviation.