Skip to content

Conversation

@webstackdev
Copy link

@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: 6365783

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

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.

3 participants