[CHORE] ci.yaml: scope publish-nightly-wheels AWS env to the publish step#1137
Open
shaun0927 wants to merge 1 commit into
Open
[CHORE] ci.yaml: scope publish-nightly-wheels AWS env to the publish step#1137shaun0927 wants to merge 1 commit into
shaun0927 wants to merge 1 commit into
Conversation
…step The AWS credentials were declared at the job level, exposing them to every step in the job (checkout, download-artifact, setup-python, pip install). Only the final `aws s3` step needs them. Mirrors the step-scoped OIDC token in python-publish.yml and the least-privilege intent of Nixtla#1112.
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.
The
publish-nightly-wheelsjob inci.yamldeclares the AWS credentials at the job level (lines 86–89), so the keys are present in the env of every step —actions/checkout,actions/download-artifact,actions/setup-python,pip install awscli beautifulsoup4— even though only the finalPublish wheelsstep callsaws s3.Moving the env block to the single step that needs it follows the same least-privilege intent as #1112 (explicit workflow
permissions:) and matches how the OIDC token is already step-scoped inpython-publish.yml.Diff
publish-nightly-wheels: if: github.event_name == 'push' needs: [run-tests] - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_NIXTLA_PACKAGES }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_NIXTLA_PACKAGES }} runs-on: ubuntu-latest steps: - uses: actions/checkout@… … - name: Publish wheels + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_NIXTLA_PACKAGES }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_NIXTLA_PACKAGES }} run: | pip install awscli beautifulsoup4 ...