-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: sanitize input tokens #94
base: main
Are you sure you want to change the base?
Conversation
.github/workflows/pipelines-root.yml
Outdated
id: secrets | ||
shell: bash | ||
run: | | ||
PR_TRIM=$(echo $PIPELINES_READ_TOKEN | xargs) |
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 needs to actually reference the secret, its not in env yet.
Wouldn't this be simpler in pipelines-credentials? gruntwork-io/pipelines-credentials#8 |
No argument from me. We'd have to do all the tokens, and still update the references in primary workflows, but it would avoid adding another step to workflows. |
@@ -120,7 +120,7 @@ jobs: | |||
uses: ./pipelines-actions/.github/actions/pipelines-preflight-action | |||
with: | |||
IS_ROOT: "true" | |||
PIPELINES_READ_TOKEN: ${{ secrets.PIPELINES_READ_TOKEN }} | |||
PIPELINES_READ_TOKEN: ${{ steps.pipelines-gruntwork-read-token.outputs.PIPELINES_TOKEN }} |
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.
@Resonance1584 can you confirm this change makes sense? This is the only case where we were reading a secret directly instead of reading from the output of a credentials step
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.
No this doesn't make sense without reworking preflight https://github.com/gruntwork-io/pipelines-actions/blob/main/.github/actions/pipelines-preflight-action/scripts/check-token-permissions.sh#L94-L118
TODO: Test it