Skip to content

Feature Request: Add LambdaTest Credential Detector (Access Key & Username) to TruffleHog #4181

Open
@ksrakshit

Description

@ksrakshit

📌 Description
Request to add a LambdaTest detector in TruffleHog for identifying potentially leaked credentials such as username and access key.

LambdaTest is a cloud testing platform that uses access tokens for authentication, which can be accidentally exposed in codebases. Including a detector would help identify these secrets and prevent misuse.

Preferred Solution

🔍 Regex Patterns

  • Access Key:
    ^LT_[a-zA-Z0-9]{47}$

  • Username:
    ^[a-zA-Z0-9]*$

🔑 Keywords for Access Key Detection

detectors.PrefixRegex([]string{
    "hub.lambdatest.com",
    "accessKey",
    "\"access_Key\":",
    "ACCESS_KEY",
    "key",
    "lambdatestKey",
    "LT_AUTHKEY",
    "LT_ACCESS_KEY",
})

👤 Keywords for Username Detection

userPat = regexp.MustCompile(
  detectors.PrefixRegex([]string{
    "hub.lambdatest.com",
    "userName",
    "\"username\":",
    "USER_NAME",
    "user",
    "lambdatestUser",
    "LT_USERNAME",
    "LAMBDATEST_USERNAME",
  })
)

🔐 Credential Validation API

curl --location 'https://auth.lambdatest.com/api/user/token/auth' \
--header 'Content-Type: application/json' \
--data '{
    "username": "username",
    "token": "key"
}'

Sample Invalid Response:

{
  "type": "error",
  "title": "Unauthorized Error",
  "message": "Something went wrong! Access key not present in db or invalid"
}

Additional Context

You can create an account on https://accounts.lambdatest.com/register and you can get the username and access key from here https://accounts.lambdatest.com/security/username-accesskey

Activity

shahzadhaider1

shahzadhaider1 commented on Jun 2, 2025

@shahzadhaider1
Contributor

Hi @ksrakshit,

Thank you for taking the time to open this issue, we really appreciate your contribution to the project!

While we’ll aim to address it when the team has available bandwidth, we also welcome contributions from the community. If you or anyone else is interested in taking this on, we’d be happy to support your efforts.

You can follow our guide on how to add a new detector to get started.

Thanks again for helping improve TruffleHog!

linked a pull request that will close this issue[feat] LambdaTest Credential Detector #4208on Jun 5, 2025
nabeelalam

nabeelalam commented on Jun 20, 2025

@nabeelalam
Contributor

Hey @ksrakshit, thanks for opening up this request. there's a PR open for this that's currently under review: #4208

ksrakshit

ksrakshit commented on Jun 20, 2025

@ksrakshit
Author

Thanks, @nabeelalam . I’m from the LambdaTest Security team and have attached a few regex patterns to match the token in this PR #4181 (comment) , so that false positives do not get through. Please do let me know if you need help on this

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @nabeelalam@shahzadhaider1@ksrakshit

      Issue actions

        Feature Request: Add LambdaTest Credential Detector (Access Key & Username) to TruffleHog · Issue #4181 · trufflesecurity/trufflehog