# Verifying this audit bundle

Three independent checks: the contents match the hash manifest, the manifest was
signed by Aunova, and the signature existed by a provable date. Run them from
inside this directory.

**Scanned commit:** `47ddf73ed36a2dc5a7a18a13fb771b1675cf9b97`
**Remediation commit:** `e442cc4e3b58a25ee5e8860992ffc507badea333`

The findings were fixed after the scan. Everything below verifies the artifact
for the **scanned** commit `47ddf73ed36a2dc5a7a18a13fb771b1675cf9b97`; the fixes landed in the descendant
commit `e442cc4e3b58a25ee5e8860992ffc507badea333`, which is the repository HEAD. This bundle is not
evidence about that later commit — verifying it says nothing about the fixes.

## 1. The contents match the manifest

```bash
sha256sum -c bundle.sha256
```

`bundle.sha256` lists every published file in this bundle except itself, its
signature and its timestamp. Its last line is a `#` comment carrying the SHA-256
of the manifest lines above it — the value that is signed and timestamped below.
Re-derive that value with:

```bash
grep -v '^#' bundle.sha256 | sha256sum
```

## 2. The manifest was signed by Aunova

secp256k1 / BIP-340 Schnorr signature over the hash manifest, made with an
Aunova Nostr key using [`nak`](https://github.com/fiatjaf/nak). The signature is
the whole event in `bundle.sig.json` (NIP-94 kind 1063); its `x` tag
is the SHA-256 of `bundle.sha256`. Three things must hold — the event is validly
signed, it commits to *this* bundle, and the signer is Aunova.

```bash
# a. the event's signature and id are valid (silence means valid).
#    nak reads the event from STDIN — a filename as an argument is parsed as
#    the event itself and always fails.
nak verify < bundle.sig.json

# b. the signed digest is this bundle's manifest
[ "$(jq -r '.tags[]|select(.[0]=="x")|.[1]' bundle.sig.json)" \
  = "$(sha256sum bundle.sha256 | cut -d' ' -f1)" ] \
  && echo "digest OK" || echo "DIGEST MISMATCH"

# c. the signer is the key Aunova publishes. The published file is annotated,
#    so pull the npub out of it rather than reading the whole file.
[ "$(nak encode npub "$(jq -r .pubkey bundle.sig.json)")" \
  = "$(curl -fsSL https://aunova.ae/.well-known/aunova-signing.pub | grep -oE 'npub1[02-9ac-hj-np-z]{58}' | head -1)" ] \
  && echo "signer OK" || echo "SIGNER MISMATCH"
```

All three must pass. (a) alone only proves *somebody* signed *something*.

The event's `created_at` is self-asserted and proves nothing about when the
signature was made — that is what the OpenTimestamps proof below is for. The
event also carries a `commit` tag binding the signature to the scanned commit.

## 3. The signature existed by a provable date

OpenTimestamps proof over `bundle.sha256`, anchored in the Bitcoin blockchain.
No certificate authority is involved.

```bash
ots verify -f bundle.sha256 bundle.ots
```

A fresh stamp reports "pending" until it is anchored (a few hours); `ots upgrade
bundle.ots` completes the proof once the attestation is confirmed.

## What verification does and does not prove

Passing these checks proves the files are exactly what Aunova produced and that
they existed by the timestamped date. It does not make the findings
authoritative: they are LLM-generated triage candidates from a non-deterministic
tool with no published precision or recall, scoped to one commit of one
repository. This bundle is evidence, not a certification, and implies no
third-party endorsement.
