Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

feat: sanitize input tokens #94

wants to merge 3 commits into from

Conversation

ZachGoldberg
Copy link
Contributor

@ZachGoldberg ZachGoldberg commented Nov 11, 2024

TODO: Test it

odgrim
odgrim previously approved these changes Nov 11, 2024
.github/workflows/pipelines-root.yml Outdated Show resolved Hide resolved
id: secrets
shell: bash
run: |
PR_TRIM=$(echo $PIPELINES_READ_TOKEN | xargs)
Copy link
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
Contributor

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

@ZachGoldberg
Copy link
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.

@@ -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 }}
Copy link
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
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