Skip to content

Added LangSmith API Key detector #4251

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

Merged
merged 2 commits into from
Jun 23, 2025

Conversation

kashifkhan0771
Copy link
Contributor

@kashifkhan0771 kashifkhan0771 commented Jun 20, 2025

Description:

This PR adds a new detector for LangSmith API Keys

Tests:

Screenshot from 2025-06-20 16-40-26

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

@kashifkhan0771 kashifkhan0771 requested review from a team as code owners June 20, 2025 11:42
Copy link
Contributor

@nabeelalam nabeelalam left a comment

Choose a reason for hiding this comment

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

Awesome! Thanks @kashifkhan0771

Comment on lines +56 to +58
isVerified, verificationErr := verifyMatch(ctx, client, apiKey)
s1.Verified = isVerified
s1.SetVerificationError(verificationErr, apiKey)
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the keys could be either a personal api token or service keys, how different could these keys be in terms of permissions/access? And is it worth storing this info in extra data?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no fine grain access for these keys.

Copy link
Contributor

@shahzadhaider1 shahzadhaider1 left a comment

Choose a reason for hiding this comment

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

LGTM.
One non-blocking comment.

@kashifkhan0771 kashifkhan0771 merged commit 62faf2e into trufflesecurity:main Jun 23, 2025
13 checks passed
@kashifkhan0771 kashifkhan0771 deleted the new/csm-1205 branch June 23, 2025 08:23
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.

3 participants