-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add a --db-app-token flag to "astro db" execute, push, and verify commands #15069
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a --db-app-token flag to "astro db" execute, push, and verify commands #15069
Conversation
🦋 Changeset detectedLatest 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 |
…5/Node 22 check, from 1000ms to 3000ms for two test cases
matthewp
left a comment
There was a problem hiding this 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.
sarah11918
left a comment
There was a problem hiding this 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! 🙌
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
sarah11918
left a comment
There was a problem hiding this 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! 🥳
Changes
Adding the
ASTRO_DB_APP_TOKENsecret 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 theASTRO_DB_APP_TOKENsecret that is only needed by thenpm astro dbcommands. With the addition of a--db-app-tokenflag for theastro dbcommands, 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