Skip to content

Keep SQLx codegen credentials out of process arguments - #1909

Draft
matthewpenkala wants to merge 1 commit into
storytold:mainfrom
matthewpenkala:contrib/harden-sqlx-codegen-credentials
Draft

Keep SQLx codegen credentials out of process arguments#1909
matthewpenkala wants to merge 1 commit into
storytold:mainfrom
matthewpenkala:contrib/harden-sqlx-codegen-credentials

Conversation

@matthewpenkala

Copy link
Copy Markdown

What changed

  • disable shell tracing in the SQLx cache-regeneration helper
  • pass the MySQL URL through the child environment instead of --database-url
  • use unique temporary SQLite/staging paths with an exit cleanup trap
  • fail clearly when no MySQL URL is configured

Why

The previous helper could expose a credential-bearing MySQL URL through shell trace output and the cargo sqlx process arguments. The revised flow keeps that value out of logs and argv while preserving SQLite and MySQL cache generation semantics.

Validation

  • bash -n script/rust/sqlx_codegen_database.sh passed
  • missing-credential path exited 1 with the intended diagnostic and no stdout
  • MySQL prepare invocation was inspected to confirm the URL is supplied only via DATABASE_URL
  • git diff --check passed

A live MySQL cache regeneration was not run because it requires a configured development database; the change does not modify query metadata or application runtime code.

@netlify

netlify Bot commented Aug 18, 2026

Copy link
Copy Markdown

👷 Deploy request for artcraft-webapp pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit df04e1f

@netlify

netlify Bot commented Aug 18, 2026

Copy link
Copy Markdown

Deploy Preview for artcraft-dashboard canceled.

Name Link
🔨 Latest commit df04e1f
🔍 Latest deploy log https://app.netlify.com/projects/artcraft-dashboard/deploys/6a83afced7e5f40008e986dd

@netlify

netlify Bot commented Aug 18, 2026

Copy link
Copy Markdown

Deploy Preview for storyteller-docs ready!

Name Link
🔨 Latest commit df04e1f
🔍 Latest deploy log https://app.netlify.com/projects/storyteller-docs/deploys/6a83afce0805660008f4c132
😎 Deploy Preview https://deploy-preview-1909--storyteller-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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