Skip to content

ensure access token do not contain sensitive credentials#1097

Merged
davidzhao merged 2 commits intomainfrom
check-credentials
Jun 7, 2025
Merged

ensure access token do not contain sensitive credentials#1097
davidzhao merged 2 commits intomainfrom
check-credentials

Conversation

@davidzhao
Copy link
Copy Markdown
Member

No description provided.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jun 7, 2025

🦋 Changeset detected

Latest commit: 7a7d801

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "github.com/livekit/protocol" specified in the `fixed` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

@davidzhao davidzhao requested a review from a team June 7, 2025 05:17
@davidzhao davidzhao merged commit 299737a into main Jun 7, 2025
7 checks passed
@davidzhao davidzhao deleted the check-credentials branch June 7, 2025 05:36
@github-actions github-actions bot mentioned this pull request Jun 7, 2025
Comment thread auth/grants.go
if c.Egress.Participant != nil {
for _, output := range c.Egress.Participant.FileOutputs {
if err := checkOutputForCredentials(output.Output); err != nil {
return err
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

https://pkg.go.dev/slices#ContainsFunc

Cleaner to use this instead of the for loop

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm not seeing that.. I need to capture the error, not just checking for if it passes a boolean check

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah yes good point, let me try to come up with something

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

03e2559

How does this look? All tests pass.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The diff in GH UI looks all over the place, probably worth it to open the file directly

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

personally, I'm not a huge fan of using reflections when alternatives exists. it's less code, but much harder to read.

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