Repository navigation
zig-dnssec milestone 1: wire codec, DNSSEC validator, DoH stub (supersedes #4) #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
2e100b4
M1: RFC 1035 wire codec with strict decoding and name compression
claude e857744
M2: DNSSEC signature verification and RFC known-answer tests
claude c86b0c5
M3: NSEC and NSEC3 denial-of-existence proofs
claude b02574d
M4: chain-of-trust validator with explicit verdicts
claude 079eadf
M5: DoH stub client, dnssec-stub CLI, recorded-response tests
claude fe93016
M6: fuzzing of the decoder, NSEC3 parser, presentation parser and val…
claude 3e02708
fix(validator): a spent fetch budget mid-chain is bogus, not indeterm…
claude 8a9ccfd
M7: cross-check against Unbound and ldns on a fixed zone set
claude 1da07d2
Integrate the library into the minted repository: docs, CI, container
claude 7b87054
fix(validator): never infer insecurity from an unverified RRSIG signer
claude 5a48a72
fix(deed): declare the cli capability with the dnssec-stub CLI
claude b255fb7
fix(deed): declare the library's paths in the variant contract
claude 742e626
C ABI seam: zig_dnssec.h, libzig_dnssec, Idris2 model (#5)
hyperpolymath 7e2c4ce
fix(dnssec): never infer insecurity from an unauthenticated signer name
hyperpolymath db58948
fix(wire): SVCB/HTTPS canonical form, relative-name length, skew-boun…
hyperpolymath 9e3a860
fix(stub): keep a DoH URI template's query in the request target
hyperpolymath 4673656
fix(ffi): refuse QTYPE=RRSIG at the C boundary with invalid_argument
hyperpolymath 1a410bc
fix(container,ci): report the cross-check's status; force HTTPS and T…
hyperpolymath 15468f2
test(replay): regressions for the validator's signer, Labels, TTL and…
hyperpolymath 33a778b
fix(deed,scripts): make (provenance) reachable and honour the variant…
hyperpolymath 43c0ca2
docs: record the milestone-1 review cycle and what its evidence does …
hyperpolymath 0eaea35
docs(verification): the deed's template pin is unfetchable, so the dr…
hyperpolymath d9cd8ec
Update src/dnssec/validator.zig
hyperpolymath 41864cb
Update src/README.adoc
hyperpolymath File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| # This workflow is managed by gh actions-lock. | ||
| # SPDX-License-Identifier: MPL-2.0 | ||
| # | ||
| # Builds and tests the zig-dnssec library with the Zig release pinned in | ||
| # mise.lock. The toolchain is fetched from ziglang.org and checked against | ||
| # its published SHA-256 (no third-party setup action). | ||
| name: Zig CI | ||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 30 | ||
| permissions: | ||
| contents: read | ||
| env: | ||
| ZIG_VERSION: "0.17.0" | ||
| ZIG_SHA256: "1cbe9df9f27e6b78d14ccbca43b6703a404ef79ef1c463de901d7f088d4e2026" | ||
| steps: | ||
| - uses: actions/checkout@v7.0.1 | ||
|
|
||
| - name: Install Zig (checksum-verified) | ||
| run: | | ||
| set -euo pipefail | ||
| curl -fsSL --proto '=https' --tlsv1.2 -o "$RUNNER_TEMP/zig.tar.xz" \ | ||
| "https://ziglang.org/download/${ZIG_VERSION}/zig-x86_64-linux-${ZIG_VERSION}.tar.xz" | ||
| echo "${ZIG_SHA256} $RUNNER_TEMP/zig.tar.xz" | sha256sum -c - | ||
| tar -xJf "$RUNNER_TEMP/zig.tar.xz" -C "$RUNNER_TEMP" | ||
| echo "$RUNNER_TEMP/zig-x86_64-linux-${ZIG_VERSION}" >> "$GITHUB_PATH" | ||
|
|
||
| - name: Formatting | ||
| run: zig fmt --check build.zig src/root.zig src/wire src/dnssec src/stub src/cli src/interface/ffi tests | ||
|
|
||
| - name: Unit, RFC-vector, denial, replay, fuzz-corpus and C ABI tests | ||
| run: zig build test --summary all | ||
|
|
||
| - name: ReleaseSafe build | ||
| run: zig build -Doptimize=ReleaseSafe | ||
|
|
||
| - name: Short fuzz run (standalone mutation fuzzer, fixed seed) | ||
| run: | | ||
| zig build fuzz-tool -Doptimize=ReleaseSafe | ||
| ./zig-out/bin/dnssec-fuzz all 20 0x2026 | ||
|
|
||
| # The Idris2 side of the ABI seam: typecheck the proofs, then run the | ||
| # Idris2 -> C ABI -> Zig end-to-end test. Idris2 is built from a pinned | ||
| # release commit (it has no checksummed binary release). | ||
| abi-seam: | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 45 | ||
| permissions: | ||
| contents: read | ||
| env: | ||
| ZIG_VERSION: "0.17.0" | ||
| ZIG_SHA256: "1cbe9df9f27e6b78d14ccbca43b6703a404ef79ef1c463de901d7f088d4e2026" | ||
| IDRIS2_TAG: "v0.7.0" | ||
| IDRIS2_COMMIT: "27780073c8631826d846499840b3857d9b9a4fd5" | ||
| steps: | ||
| - uses: actions/checkout@v7.0.1 | ||
|
|
||
| - name: Install Zig (checksum-verified) | ||
| run: | | ||
| set -euo pipefail | ||
| curl --proto '=https' --tlsv1.2 -fsSL -o "$RUNNER_TEMP/zig.tar.xz" \ | ||
| "https://ziglang.org/download/${ZIG_VERSION}/zig-x86_64-linux-${ZIG_VERSION}.tar.xz" | ||
| echo "${ZIG_SHA256} $RUNNER_TEMP/zig.tar.xz" | sha256sum -c - | ||
| tar -xJf "$RUNNER_TEMP/zig.tar.xz" -C "$RUNNER_TEMP" | ||
| echo "$RUNNER_TEMP/zig-x86_64-linux-${ZIG_VERSION}" >> "$GITHUB_PATH" | ||
|
|
||
| - name: Build Idris2 from the pinned release commit | ||
| run: | | ||
| set -euo pipefail | ||
| sudo apt-get update -q | ||
| sudo apt-get install -y -q chezscheme libgmp-dev | ||
| git clone -q --depth 1 --branch "$IDRIS2_TAG" https://github.com/idris-lang/Idris2.git "$RUNNER_TEMP/idris2-src" | ||
| test "$(git -C "$RUNNER_TEMP/idris2-src" rev-parse HEAD)" = "$IDRIS2_COMMIT" | ||
| make -C "$RUNNER_TEMP/idris2-src" bootstrap SCHEME=chezscheme PREFIX="$RUNNER_TEMP/idris2" -j"$(nproc)" | ||
| make -C "$RUNNER_TEMP/idris2-src" install PREFIX="$RUNNER_TEMP/idris2" | ||
| echo "$RUNNER_TEMP/idris2/bin" >> "$GITHUB_PATH" | ||
|
|
||
| # `idris2 --typecheck` can exit 0 with an Error: line (see | ||
| # scripts/check-proofs.sh), so both are checked. | ||
| - name: Typecheck the Idris2 ABI model | ||
| run: | | ||
| set -euo pipefail | ||
| out="$(idris2 --typecheck src/interface/abi.ipkg 2>&1)" || { echo "$out"; exit 1; } | ||
| echo "$out" | ||
| if echo "$out" | grep -q '^Error'; then exit 1; fi | ||
|
|
||
| - name: Idris2 -> C ABI -> Zig end-to-end test | ||
| run: | | ||
| set -euo pipefail | ||
| zig build ffi | ||
| idris2 --build src/interface/E2e/abi-e2e.ipkg | ||
| LD_LIBRARY_PATH=zig-out/lib src/interface/E2e/build/exec/abi-e2e \ | ||
| tests/testdata/crosscheck.traces tests/testdata/crosscheck-root.anchor |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.