Skip to content

[feat] LambdaTest Credential Detector #4208

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

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

Conversation

annetteshajan
Copy link
Contributor

Description:

LambdaTest is a cloud-based cross-browser testing platform that allows developers to test their web applications across various browsers and devices. This relates to issue : #4181
This feature enables detection of username and access key of LambdaTest based on its pattern and verifies the credentials as well by sending a request to the endpoint.

Checklist:

  • [ ✔️ ] Tests passing (make test-community)?
  • [ ✔️ ] Lint passing (make lint this requires golangci-lint)?

@annetteshajan annetteshajan requested review from a team as code owners June 5, 2025 10:13
@annetteshajan annetteshajan reopened this Jun 5, 2025
// Keywords are used for efficiently pre-filtering chunks.
// Use identifiers in the secret preferably, or the provider name.
func (s Scanner) Keywords() []string {
return []string{"lambdatest", "LT_"}
Copy link
Contributor

Choose a reason for hiding this comment

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

LT_ might yield a significant amount of false matches, a lot of unnecessary chunks inputs might get filtered in.


s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_LambdaTest,
Raw: []byte(fmt.Sprintf("%s:%s", usernameMatch, accessKeyMatch)),
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a value for RawV2 as well? It should be the same value


isVerified, extraData, verificationErr := verifyMatch(ctx, client, usernameMatch, accessKeyMatch)
s1.Verified = isVerified
s1.ExtraData = extraData
Copy link
Contributor

Choose a reason for hiding this comment

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

There doesn't seem to be any extraData being returned by verifyMatch.
We can also remove map[string]string from the return types and update the return statements.

return true, nil, nil
case http.StatusUnauthorized:
// The secret is determinately not verified (nothing to do)
return false, nil, fmt.Errorf("access key not present in db or invalid")
Copy link
Contributor

Choose a reason for hiding this comment

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

In cases where we determinately unverify credentials, we should return a nil error, since errors imply issues in the verification process or indeterminate results.

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.

Feature Request: Add LambdaTest Credential Detector (Access Key & Username) to TruffleHog
2 participants