Is This Evidence Accurate?
How a reviewer goes from a value in a pack to the code and the lookups that produced it, using one real value as the example.
epack verify shows that a pack's files are unchanged and who signed them. It does not show that a value inside measures what you need. The pack records enough to check that too: which collector produced each file, the commit it was built from, and the digest of the binary that ran.
This page traces one value from a real pack back to its source. Every step uses public tools and public data, so you can repeat it. How epack Works lists the same checks in brief.
The example
This pack was collected from the public DNS records of example.com by the email-dns collector, version 0.2.2. Its artifacts/email-dns.json reports:
"with_dkim_pct": 100
DKIM lets a receiving mail server check that a message came from the domain it claims. Read quickly, 100 suggests that every domain signs its mail. The steps below show what the number counts.
Build the same pack yourself
Put this in an epack.yaml in an empty folder and run epack collect. The pack lands in packs/. Your binary_digest will match the release file for your platform, so step 4 finds a different file name with the same result.
stream: example/email-security
output: packs/
collectors:
email-dns:
source: locktivity/epack-collector-email-dns@v0.2.2
config:
domains:
- example.com
1. Check the pack
Start with epack verify example-email.epack. If the pack is signed, also name the signer you expect with --issuer and --subject. If verification fails, stop: the steps below would describe files that may have changed.
2. Find the value and the records behind it
epack extract example-email.epack artifacts/email-dns.json
"domain": "example.com",
"dkim": [
{ "selector": "default", "record": "v=DKIM1; p=", "valid": false },
{ "selector": "selector1", "record": "v=DKIM1; p=", "valid": false },
...
],
"assessment": {
"issues": [
"No DMARC aggregate reporting (rua) configured",
"No valid DKIM records (all keys are malformed or revoked)"
]
},
...
"summary": {
"total_domains": 1,
"with_dkim_count": 1,
"with_dkim_pct": 100
}
Every DKIM record found has an empty key (p=), and the collector marks each one "valid": false. Its own assessment says the domain has no valid DKIM records. The summary still reports 100.
3. Find the collector that wrote it
The pack's manifest names each collector that ran, with the commit it was built from and the digest of the binary:
"sources": [
{
"name": "email-dns",
"version": "v0.2.2",
"source": "github.com/locktivity/epack-collector-email-dns",
"commit": "e9585b8e4e5dfe199305f3186e841bd373e8399f",
"binary_digest": "sha256:200a2d34851b62c574c746d9c5661f134880897617ccf31fd885f352a5d3b752"
}
]
This pack has one collector, and its artifacts are named after it. Version 0.2.2 of this collector names its file artifacts/email-dns.json. A collector built with epack v0.10.0 or later names each file artifacts/<collector>.<kind>.json, where the kind comes from the file's schema ID, or is details for the collector's own file.
4. Confirm the binary was built from that commit
Each collector release publishes a checksum and a Sigstore provenance file for every binary. Find the release file whose checksum matches binary_digest:
gh release download v0.2.2 -R locktivity/epack-collector-email-dns -p checksums.txt grep 200a2d34851b62c574c746d9c5661f134880897617ccf31fd885f352a5d3b752 checksums.txt
200a2d34851b62c574c746d9c5661f134880897617ccf31fd885f352a5d3b752 epack-collector-email-dns-darwin-arm64
Download that binary with its .sigstore.json file and verify the provenance with the GitHub CLI:
gh release download v0.2.2 -R locktivity/epack-collector-email-dns \ -p epack-collector-email-dns-darwin-arm64 \ -p epack-collector-email-dns-darwin-arm64.sigstore.json gh attestation verify epack-collector-email-dns-darwin-arm64 \ --bundle epack-collector-email-dns-darwin-arm64.sigstore.json \ --repo locktivity/epack-collector-email-dns \ --predicate-type https://slsa.dev/provenance/v0.2 \ --signer-repo slsa-framework/slsa-github-generator
✓ Verification succeeded! - Attestation #1 - Build repo:..... locktivity/epack-collector-email-dns - Build workflow:. .github/workflows/release.yaml@refs/tags/v0.2.2 - Signer repo:.... slsa-framework/slsa-github-generator
Add --format json --jq '.[0].verificationResult.statement.predicate.invocation.configSource.digest' to the same command to print the commit the build ran at. It is e9585b8e4e5dfe199305f3186e841bd373e8399f, the commit the pack records. A binary changed by even one byte fails this check. epack runs the same check when it installs a collector, and refuses a binary that fails it.
5. Follow the trace map to the code
A collector built with the epack SDK adds a build file to the pack, here artifacts/email-dns.collector-build.json. Its trace_map links each field the collector writes to the source lines behind it, and its lines holds the text of each of those lines. The map is committed in the collector's repository and built into the binary, so it comes from the same commit as the code. It is a file in the pack, so the pack's signature covers it.
From epack v0.12.3 the trace map also lists the collector's test suites under suites: the operations each one declares, how many scenarios it runs and how many of them are recordings of a test account, and the waivers in force, each with its reason and expiry. A reader can see from the pack itself what the collector's tests cover and what they leave out.
The build file also holds the collector's schemas, under schemas. For a collector built with epack v0.10.0 or later, a value there can carry an x-epack-method sentence on how the collector measures it, and an x-epack-label and x-epack-summary for a reviewer.
Fields are listed by artifact path and then by JSON pointer, with each array index written as *. Start with the valid flag on each DKIM record, /domains/*/dkim/*/valid. These commands print the lines behind it, with each line's role and text:
epack extract example-email.epack artifacts/email-dns.collector-build.json jq -r --arg f '/domains/*/dkim/*/valid' \ '.trace_map as $t | $t.artifacts["artifacts/email-dns.json"][$f].code[] | "\(.role)\t\(.line)\t\($t.lines[.line] // "")"' \ artifacts/email-dns.collector-build.json
input internal/collector/collector.go:17 var commonDKIMSelectors = []string{
condition internal/collector/collector.go:302 for _, selector := range commonDKIMSelectors {
input internal/collector/collector.go:303 dkimDomain := selector + "._domainkey." + domain
input internal/collector/collector.go:304 txtRecords, err := s.resolver.LookupTXT(named(ctx, opDKIM), dkimDomain)
condition internal/collector/collector.go:305 if err != nil {
condition internal/collector/collector.go:317 for _, txt := range txtRecords {
condition internal/collector/collector.go:318 if isDKIMRecord(txt) {
assign internal/collector/collector.go:322 Valid: validateDKIM(txt),
helper internal/collector/collector.go:455 func validateDKIM(record string) bool {
| Role | What the line is |
|---|---|
assign |
The line that sets the field. |
input |
A line that changes a value the field is computed from. |
condition |
The test of an if or loop that one of those lines sits under. |
helper |
A function the assignment calls, from its first line to the entry's end. The build file holds the text of every line in it. |
Read it from the assignment back. Line 322 sets valid by calling validateDKIM, the helper at lines 455 to 472. Its key lines, as the build file holds them:
465 if strings.HasPrefix(part, "p=") {
466 key := strings.TrimPrefix(part, "p=")
467 key = strings.TrimSpace(key)
468 return key != "" // Non-empty key
So a record is valid when its p= key is not empty. Lines 302 to 318 show where the records come from: a TXT lookup at each selector listed on line 17, keeping the first record that looks like DKIM. The entry also lists "operations": ["dns.dkim.lookup"], the lookup whose failure would leave this field out or change it. Step 6 counts those lookups.
When the map misses a line
Run the same command with --arg f '/summary/with_dkim_pct':
input internal/collector/collector.go:572 total := len(scans)
condition internal/collector/collector.go:577 if total == 0 {
input internal/collector/collector.go:581 var withMX, withSPF, withDMARC, withDKIM, withAllThree, enforced, withReporting tally
assign internal/collector/collector.go:597 summary.WithDkimCount, summary.WithDkimPct = s.share("with_dkim", withDKIM, total)
helper internal/collector/collector.go:613 func (s *scanner) share(name string, t tally, total int) (count, pct *int) {
Line 597 passes the withDKIM tally to share, which returns t.holds * 100 / total at line 620, rounded down. The entry jumps from line 581, where withDKIM is declared, to line 597, where it is used. It does not list the line that fills the tally in between. That line is 588 at commit e9585b8:
588 withDKIM.add(len(r.DKIM) > 0, d.dkim)
A domain counts when its DKIM list is not empty, whatever its records' valid flags say. epack's collector protocol notes that the analysis behind the map can miss a line, so use the map as a guide to where to read. When an entry jumps from a variable's declaration to its use, as this one does, read the lines in between at the commit the pack records.
6. Reproduce the number
One domain was scanned, and its DKIM list has nine records, so it counts: 1 × 100 ÷ 1 = 100. The pack's artifacts/email-dns.collector-result.json shows that all nine DKIM lookups were answered (NOERROR) and lists no gaps, so no failed lookup changed the result.
7. Ask the source system yourself
DNS is public, so you can repeat the lookups:
dig +short TXT default._domainkey.example.com dig +short TXT selector1._domainkey.example.com
"v=DKIM1; p=" "v=DKIM1; p="
The DKIM standard says an empty p= means the key has been revoked (RFC 6376, section 3.6.1). For collectors that read private systems such as GitHub or AWS, you cannot query the publisher's account. You can run the same collector version against a system you control to see which fields it reads.
What the value means
with_dkim_pctis the share of domains that publish any DKIM record at one of nine common selectors. Revoked and malformed keys count.- A domain that signs with a custom selector counts as 0.
- To check that mail is signed with a usable key, read each record's
validflag or the domain'sassessment.issues.
None of this is visible from the number alone. All of it is visible from the code at the commit the pack records.
What this trace does not cover
- That this pack is the one the collector produced. That comes from the signature. For a pack signed in CI, read the workflow at the commit
epack verifyprints. See Did a pipeline assemble it? - That the source system answered truthfully at collection time. DNS lets you check again later. Most APIs do not.
Go deeper
How epack Works
The full path from collection to verification
ConceptSecurity Model
What verification establishes, and the threat model
ConceptTrust Levels
Which verification to require from whom
GuideVerify Vendor Packs
The commands for checking a pack someone sent you
ConceptHow Collectors Are Tested
How each value is checked against its written definition
ReferenceNormalized Fields
Every field's definition and the code that computes it