Proof
Verify this site
Six checks. Each one comes with a command you can run, and each says what it proves and what it doesn't.
This copy was built from the merge of pull request 74.
Built from commit
Before you start
Run the commands in one empty folder, in order. They use curl, jq, tar, ssh-keygen, and gh, GitHub's command line tool. None of them needs a login.
1. Source
- What it proves
- This site names the commit it was built from, and that commit is on the main line of the public repo.
- What it doesn't
- That the code is good.
Run this
commit=40607f14c0d54214ae43f3e79888a4069e6b310d
api=https://api.github.com/repos/jeremiahcarreon/jeremiahcarreon.com
curl -fsS https://jeremiahcarreon.com/verify | grep -o -m 1 "commit/$commit" &&
curl -fsS "$api/compare/main...$commit" |
jq -r 'if .ahead_by == 0 then "on main" else "NOT on main" end'You should see
commit/40607f14c0d54214ae43f3e79888a4069e6b310d on main
2. Build
- What it proves
- The package for that commit was built by this repo's own workflow, on the main branch, at that commit, on a machine that GitHub runs. The check uses the attestation file published next to the package, so it needs no GitHub login.
- What it doesn't
- That someone else can rebuild it bit for bit.
Run this
commit=40607f14c0d54214ae43f3e79888a4069e6b310d
package=jeremiahcarreon.com-$commit.tar.gz
release=https://github.com/jeremiahcarreon/jeremiahcarreon.com/releases/download/site-$commit
curl -fsSL -O "$release/$package" -O "$release/$package.sigstore.json" &&
gh attestation verify "$package" --repo jeremiahcarreon/jeremiahcarreon.com \
--bundle "$package.sigstore.json" \
--signer-workflow jeremiahcarreon/jeremiahcarreon.com/.github/workflows/deploy.yml \
--source-ref refs/heads/main --source-digest "$commit" \
--deny-self-hosted-runners --format json |
jq -r '.[].verificationResult.signature.certificate |
"Built by \(.buildSignerURI) from commit \(.sourceRepositoryDigest)" +
" on a \(.runnerEnvironment) runner."'You should see
Built by https://github.com/jeremiahcarreon/jeremiahcarreon.com/.github/workflows/deploy.yml@refs/heads/main from commit 40607f14c0d54214ae43f3e79888a4069e6b310d on a github-hosted runner.
3. Live files
- What it proves
- Every file in the package is what the live site serves, byte for byte.
- What it doesn't
- That the site serves nothing more. The check asks only for the files the package holds.
This one unpacks the package that check 2 fetched, so run that one first.
Run this
commit=40607f14c0d54214ae43f3e79888a4069e6b310d
site=https://jeremiahcarreon.com
mkdir -p package && tar -xzf "jeremiahcarreon.com-$commit.tar.gz" -C package &&
find package -type f ! -name SHA256SUMS | sort | {
different=0
while read -r file; do
name=${file#package/}
case $name in
_headers | _redirects | 404.html) continue ;;
index.html) address=/ ;;
*/index.html) address=/${name%/index.html} ;;
*.html) address=/${name%.html} ;;
*) address=/$name ;;
esac
if ! curl -fsS -o live "$site$address" || ! cmp -s live "$file"; then
echo "DIFFERENT: $address"
different=1
fi
done
[ "$different" -eq 0 ] && echo "Every file in the package is what the site serves."
}You should see
Every file in the package is what the site serves.
4. Identity
- What it proves
- The statement at /proof.txt is signed by a key that GitHub lists as a signing key on my account. The statement ties together this site, my GitHub account, and my signing key.
- What it doesn't
- That the key holder is me in person.
Run this
site=https://jeremiahcarreon.com
curl -fsS -O "$site/proof.txt" -O "$site/proof.txt.sig" &&
curl -fsS https://api.github.com/users/jeremiahcarreon/ssh_signing_keys |
jq -r '.[] | "jeremiahcarreon \(.key)"' > allowed_signers &&
ssh-keygen -Y verify -f allowed_signers -I jeremiahcarreon -n jeremiahcarreon.com \
-s proof.txt.sig < proof.txtYou should see
Good "jeremiahcarreon.com" signature for jeremiahcarreon with ED25519 key SHA256:SuuneNPeQmJe0nsBtMMH+DXvgL9VG8NtfD8kREsXCyY
5. Review
- What it proves
- The commit this site was built from is the merge of a pull request from the agent's account, and my account approved the exact commit that merged. CI asks the same of every merge before it deploys, and those runs are public.
- What it doesn't
- What I read. I set the direction and approve every change. I review the tests in detail, because they define what correct means. For the rest, a second AI session reads each diff and gives me a summary before I approve. Who pressed approve. Also, GitHub shows the rules on the main branch to everyone but hides the list of who may bypass them. The record for each change is the proof, not the rules.
Run this
api=https://api.github.com/repos/jeremiahcarreon/jeremiahcarreon.com
curl -fsS -o pull.json "$api/pulls/74" &&
curl -fsS -o reviews.json "$api/pulls/74/reviews" &&
jq -r 'if .merged then
"\(.user.login) opened it. Its last commit is \(.head.sha). " +
"It merged as \(.merge_commit_sha)." else "It has not merged." end' pull.json &&
jq -r '.[] | select(.state == "APPROVED") | "\(.user.login) approved \(.commit_id)."' \
reviews.jsonYou should see
agent-jeremiah opened it. Its last commit is bb1d09779c8407ac7e665e44556174bd818eb2ac. It merged as 40607f14c0d54214ae43f3e79888a4069e6b310d. jeremiahcarreon approved bb1d09779c8407ac7e665e44556174bd818eb2ac.
6. Headers
- What it proves
- Which security headers this site sends with a page.
- What it doesn't
- That the site has no bugs.
Run this
curl -fsS -o /dev/null -D - https://jeremiahcarreon.com/verify | tr -d '\r' |
grep -i \
-e '^content-security-policy:' \
-e '^strict-transport-security:' \
-e '^x-content-type-options:' \
-e '^x-frame-options:' \
-e '^referrer-policy:' \
-e '^cross-origin-opener-policy:' \
-e '^permissions-policy:' |
sortYou should see
content-security-policy: default-src 'none'; script-src 'self'; style-src 'self'; font-src 'self'; img-src 'self'; base-uri 'none'; form-action 'none'; frame-ancestors 'none' cross-origin-opener-policy: same-origin permissions-policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=() referrer-policy: strict-origin-when-cross-origin strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-frame-options: DENY
A public scanner gives a second opinion. Scan this site with Mozilla's HTTP Observatory.