Skip to content

Conversation

@webstackdev
Copy link
Contributor

@webstackdev webstackdev commented Dec 21, 2025

Changes

Adding the ASTRO_DB_APP_TOKEN secret to the environment in a CD workflow for pushing Astro DB migrations to a remote server creates a security vulnerability for repos hosted on some platforms like GitHub. The issue is that you cannot selectively block PRs from forked repos to segregate trusted and untrusted contributions. Both will run in the established CI / CD workflows. When the CD job checks out such a forked repo, untrusted code then has access to the ASTRO_DB_APP_TOKEN secret that is only needed by the npm astro db commands. With the addition of a --db-app-token flag for the astro db commands, that secret can be securely passed to the executable.

Testing

Added unit and integration tests for the changeset for happy path, error condition, and edge cases.

Docs

Docs updated in PR #12965

@changeset-bot
Copy link

changeset-bot bot commented Dec 21, 2025

🦋 Changeset detected

Latest commit: bdf74fd

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Dec 21, 2025
Copy link
Contributor

@matthewp matthewp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be a minor since its a new feature.

@Princesseuh Princesseuh dismissed matthewp’s stale review January 20, 2026 16:49

updated changeset

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contributing this helpful feature @webstackdev ! I left an example of what a minor changeset would normally look like to give you an idea of a direction you might want to take. Your feature is great, and we want to make sure people know about it, what it's for, and how to use it! 🙌

Princesseuh and others added 2 commits January 21, 2026 18:02
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving for docs, and the docs PR is also approved! 🥳

@Princesseuh Princesseuh merged commit d14dfc2 into withastro:main Jan 22, 2026
23 of 24 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants