Skip to content

feat(docs): add a Vault guide eval - #555

Draft
czenko wants to merge 1 commit into
mainfrom
docs/vault-guide-eval
Draft

czenko wants to merge 1 commit into
mainfrom
docs/vault-guide-eval

Conversation

@czenko

@czenko czenko commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes DOCS-1659

Problem

Nothing measures whether the Vault guide leads an agent to keep a credential safe. A database function that calls out with a key needs somewhere to keep it. Customers and agents put the key in the function body, a trigger, a migration file, or a database setting the platform refuses.

Evidence:

  • user-feedback: route hosted database secrets to Supabase Vault agent-skills#353: an agent stored a key for security definer functions with ALTER DATABASE ... SET app.*. Hosted refuses it with 42501, and so does the local stack.
  • PSQLEXT-1703: a Bearer token hardcoded in a pg_net function.
  • FDBKIN-49036: static tokens sit in trigger definitions and migration files unless someone writes a function to read Vault.
  • FDBKIN-19971: reading Vault from server code needed a security definer function, and the customer was unsure how to scope it. A #team-contributors thread shows the same getter shape, get_secret(secret_name text).

No existing eval covers Vault.

Sources reached: Linear, Slack, agent-skills issues, supabase/supabase issues. Not reached: Hex, Supacademy, troubleshooting guides.

Changes

Adds build-docs-034-vault. An app signs CDN download links in the database. The seed fixes the function contract and keeps the key in .env. The prompt asks for three things: the key stays out of the repo and the database copies, app users never get it, and a changed key takes effect without a code change.

Checks:

  • The agent applied the migrations it wrote.
  • The key is stored in the vault, and is not in plain text in the database.
  • The key is not in a file the repo would commit.
  • A signed-in user gets a link the CDN accepts.
  • Links follow a change of the key. The scorer rotates the vault entry and asks again.
  • App users cannot read the key, through any table, view, or public function they can call.
  • The agent read the Vault guide.

Expected signal: The guide shows vault.create_secret in SQL but not where that SQL goes, so a migration that carries the key is the likely failure. The guide also does not show how a signed-in user's request reaches the decrypted view. A function that runs as the caller fails the link check.

What part of the guide this tests:

Guide section Tested How
Adding secrets Yes The key has to land in the vault without landing in the repo
Viewing secrets, and protecting access to the view Yes A signed-in user gets a valid link, and neither app role can read the key
Updating secrets Indirectly The scorer rotates the key and checks that links follow it
Deleting secrets No Not part of the task
Deep dive: encryption, key location, key portability No Hosted only

Verification

  • pnpm exec biome check evals/docs/build-docs-034-vault passes.
  • pnpm --filter @supabase-evals/framework typecheck passes.
  • pnpm eval:dry -- --suite docs --eval build-docs-034-vault plans one pair on codex-gpt-6-luna-no-skills.
  • Baseline: three runs of codex-gpt-6-luna-no-skills in the run-evals-changed run. All three passed all eight checks, including the guide read. No run put the key in a migration. A full-marks pass does not show the page carried the run, since a model that knows Vault produces the same result. Braintrust run.

For new or changed evals (see Submitting evals for review):

  • Ran the eval locally, and it completes without framework errors.
  • Ran it in CI with the run-evals-changed label or the Refresh eval results workflow (suite: regression for framework changes), and linked the Braintrust run here.

@vercel

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
evals Ignored Ignored Nov 25, 2026 7:25pm UTC

Request Review

@czenko czenko added the run-evals-changed Add to a PR to refresh only the benchmark evals that have had changes label Nov 25, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-evals-changed Add to a PR to refresh only the benchmark evals that have had changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant