Skip to content

feat: sanitize input tokens#94

Open
ZachGoldberg wants to merge 3 commits into
mainfrom
sanitizeTokens
Open

feat: sanitize input tokens#94
ZachGoldberg wants to merge 3 commits into
mainfrom
sanitizeTokens

Conversation

@ZachGoldberg

@ZachGoldberg ZachGoldberg commented Nov 11, 2024

Copy link
Copy Markdown
Contributor

TODO: Test it

odgrim
odgrim previously approved these changes Nov 11, 2024
Comment thread .github/workflows/pipelines-root.yml Outdated
Comment thread .github/workflows/pipelines-root.yml Outdated
id: secrets
shell: bash
run: |
PR_TRIM=$(echo $PIPELINES_READ_TOKEN | xargs)

Copy link
Copy Markdown
Contributor Author

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.

@Resonance1584

Copy link
Copy Markdown
Contributor

Wouldn't this be simpler in pipelines-credentials? gruntwork-io/pipelines-credentials#8

@ZachGoldberg

Copy link
Copy Markdown
Contributor Author

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.

with:
IS_ROOT: "true"
PIPELINES_READ_TOKEN: ${{ secrets.PIPELINES_READ_TOKEN }}
PIPELINES_READ_TOKEN: ${{ steps.pipelines-gruntwork-read-token.outputs.PIPELINES_TOKEN }}

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants