Repository navigation
Публикация без токена: убран запасной NODE_AUTH_TOKEN - #4
Merged
Merged
Conversation
У пакета прописан доверенный издатель, npm берёт короткий ключ у GitHub по OIDC. Долгоживущий секрет в релизном прогоне больше не нужен. Claude-Session: https://claude.ai/code/session_01LBL4DAAw5JUE6RMmufNjkQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Последний шаг переезда публикации на доверенного издателя: из релизного прогона
убран запасной путь через
NODE_AUTH_TOKEN.Почему можно: у пакета прописан доверенный издатель (AutoPasha/cli, publish.yml),
и выпуск 0.1.1 прошёл именно по нему. В реестре у версии стоит
_npmUser = GitHub Actions <npm-oidc-no-reply@github.com>,trustedPublisher.id=github,provenance подписан. Прогон: https://github.com/AutoPasha/cli/actions/runs/34692428304
Почему нужно: пока секрет лежит в окружении релизного шага, долгоживущий токен
продолжает участвовать в публикации, а это ровно тот риск, ради которого затевался
переезд. Дока npm (docs.npmjs.com/trusted-publishers) советует после проверки
издателя ограничить токены и отозвать ненужные.
Дальше по этому делу: у пакета ставится «Require two-factor authentication and
disallow tokens» и отзывается сам npm_token. Нашим токеном это не сделать, реестр
отвечает 403 «npm tokens that bypass 2FA are being restricted for account changes».
https://claude.ai/code/session_01LBL4DAAw5JUE6RMmufNjkQ