Skip to content

Harden destructive end-to-end test database guard - #1

Open
Clearkess wants to merge 9 commits into
mainfrom
safety/harden-e2e-test-guard
Open

Clearkess wants to merge 9 commits into
mainfrom
safety/harden-e2e-test-guard

Conversation

@Clearkess

Copy link
Copy Markdown
Owner

Summary

  • Remove the implicit fallback to a local database URL from the end-to-end test harness.
  • Require an explicitly supplied TEST_DATABASE_URL.
  • Refuse to run unless the database name contains test or ci.
  • Require ALLOW_DESTRUCTIVE_TEST=1 because the harness drops tables before testing.
  • Avoid printing the full database URL in error messages, which could expose credentials.

Why

The existing harness executes DROP TABLE ... CASCADE. A database-name heuristic that also accepted sim was not a sufficient safeguard against accidentally running destructive tests against a non-test database.

Validation

The change was reviewed against the existing test harness. It has not been run against a live PostgreSQL database in this environment; use only a disposable test database when running it.

@vercel

vercel Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
opay-flash-simulator-vercel-fixed Ready Ready Preview Oct 27, 2026 12:02am UTC

This branch was successfully deployed

1 active deployment
Preview — 703f4268 Deployed Oct 27, 2026 by vercel[bot]
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.

1 participant