Skip to content

Add tests for veil-verify.#80

Merged
NullHypothesis merged 2 commits into
masterfrom
add-verifier-tests
Jun 1, 2026
Merged

Add tests for veil-verify.#80
NullHypothesis merged 2 commits into
masterfrom
add-verifier-tests

Conversation

@NullHypothesis

Copy link
Copy Markdown
Contributor

So far, veil-verify has received very little attention. This PR adds a number of tests; mostly for the critical attestEnclave function.

This PR fixes #15.

So far, veil-verify has received very little attention. This PR adds a
number of tests; mostly for the critical `attestEnclave` function.

This PR fixes #15.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds unit tests around veil-verify’s enclave attestation flow (notably attestEnclave) to improve confidence in verifier behavior outside an enclave, and standardizes several verifier error values for reliable errors.Is checks.

Changes:

  • Add comprehensive table-driven tests for cmd/veil-verify attestation request building, TLS binding verification, and attestEnclave failure modes.
  • Standardize verifier error returns by introducing exported sentinel errors in internal/errs and using them in nitro/noop attesters and veil-verify.
  • Improve noop attester verification by validating document type and nonce.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal/errs/errs.go Adds sentinel verifier errors (PCR mismatch, TLS binding mismatch, nonce/type mismatch, enclave error) for consistent error matching.
internal/enclave/noop/attester.go Adjusts noop attestation encoding to wrap AuxInfo in an enclave.Document and adds nonce/type checks.
internal/enclave/noop/attester_test.go Updates noop attester test to verify nonce matching behavior.
internal/enclave/nitro/attester.go Switches type/nonce mismatch errors to shared sentinel errors.
cmd/veil-verify/attestation.go Returns sentinel errors for enclave HTTP errors, PCR mismatch, and TLS binding mismatch.
cmd/veil-verify/attestation_test.go Adds new tests covering buildReq, attestEnclave success/failure cases, context cancellation, and verifyTLSBinding.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/enclave/noop/attester.go
...as suggested by Copilot.
@NullHypothesis NullHypothesis merged commit a92578d into master Jun 1, 2026
5 checks passed
@NullHypothesis NullHypothesis deleted the add-verifier-tests branch June 1, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add unit test for verifier.

2 participants