Skip to content
Detectors

Scanner deep dive

Overview

A service for cross browser testing, API keys can create and access tests from potentially sensitive internal websites
From the detector’s Description() in source

Needs a person to check

Provider and detector details

Summary

ProviderNo provider details added yet.

Runs on any connection. Triggered by keywords in the content, after decoding.How TruffleHog works

How detection works

The Sauce Labs detector looks for pieces of a credential that belong together. The code names fields such as “username” and “key”.

Runs by default

Matching rules and source
Keywords
  • saucelabs

Regexes

  • Regex 1usernamePatsaucelabs.go:30 (opens TruffleHog source on GitHub)Only code file

    \b([a-zA-Z0-9_\.-]{2,70})

    Matches 2–70-character strings of letters, digits and “_” “.” “-”.

    Show as a diagram

    Must appear near: “saucelabs” or “username”

  • Regex 2keyPatsaucelabs.go:31 (opens TruffleHog source on GitHub)Only code file

    \b([a-z0-9]{8}\-[a-z0-9]{4}\-[a-z0-9]{4}\-[a-z0-9]{4}\-[a-z0-9]{12})\b
    Show as a diagram

    Must appear near: “saucelabs”

  • Regex 3baseUrlPatsaucelabs.go:32 (opens TruffleHog source on GitHub)Only code file

    \b(api\.(?:us|eu)-(?:west|east|central)-[0-9]\.saucelabs\.com)\b
    Show as a diagram

How it works

  1. Skips any text that doesn’t contain “saucelabs”. This keeps scanning fast.
  2. Looks for 2–70-character strings of letters, digits and “_” “.” “-” within 40 characters after one of the words “saucelabs” or “username”. 2 more patterns in the technical detail.
  3. Finds each part (username and key) and pairs them.
  4. Reports each remaining match as a possible Sauce Labs credential. It isn’t known to work until it’s verified.
Prefix regex
Several partsusername and key
Guards against false matches
Not found in source
Not found in source
  • Base URL
Pairing and normalization
  • username, key are combined from match sets

How it behaves

What this detector does at each step of the TruffleHog pipeline.

pkg/detectors/saucelabs · Scanner

Keywords

Any one of these in the decoded text wakes the detector.

  • saucelabs

saucelabs.go line 51 (opens TruffleHog source on GitHub)

Behavior

Multi-part
Yes, pairs two parts such as an ID and a secret
saucelabs.go line 19 (opens TruffleHog source on GitHub)
Custom endpoints
No
Cloud endpoint
None
Randomness check
None in this detector's own code
False-positive check
The shared word lists

Verification. When a scan allows it, TruffleHog tests a match by calling the provider. A scan can turn this off for every detector or for this one. Atlas only describes this; it never tests credentials. How the verify decision works

Analyzer.None in the open-source code.

In short

Wakes on “saucelabs”, reads 1024 bytes around each hit to pair two parts and tests matches with the provider. A default scan runs it.

How verification works

What it means

The source checks both the HTTP status and the response body.

The detection and verification evidence on this page comes from the Open Source implementation. Check the Enterprise coverage guide for product availability.

Verification host is a template. The endpoint host is filled in at runtime (%s), so the exact host is not known from source.

Does checking a key change anything at the provider?

Not expected to: it’s a GET request, which reads without changing anything, and the source declares no changes.

Source says: GET as declared in source; mutating side effects not declared

Evidence from source

Sauce Labs identity check

GET /auth/v1/identity with the username and access key using HTTP Basic authentication.

Verified when HTTP 200 with a decodable identity whose account ID (sub) is nonempty.

HTTP 401 rejects the credential. An invalid identity response or any other status produces a verification error.

View source for Sauce Labs identity check
Errors, timeouts and rate limits
Not found in source
Not found in source
SetVerificationError; unexpected status code %v

other statuses: verification error or unknown

transport errors return a verification error

All URLs found in source

  • https://%s/auth/v1/identity

Verified findings

Open Source · Standard output (stdout)

The CLI prints verified findings to stdout. Use --json for structured output.

Example scan output · credential redacted

✅ Found verified result 🐷🔑
Detector Type: SauceLabs
Decoder Type: PLAIN
Raw result: [redacted]
Terminal printer source
CI formats

With --github-actions, GitHub Actions displays this workflow command as a warning on the indicated file and line.

::warning file=config/example.env,line=8,endLine=8::Found verified SauceLabs result 🐷🔑
GitHub Actions printer source

Legacy compatibility. --json-legacy writes pre-v3 JSON for Git, GitLab, and GitHub sources only.

Enterprise alerts

When Enterprise verifies that a secret is live, a configured notifier can alert your team. The finding is also available through the Enterprise API.

Optional analysis

No analyzer is recorded for this detector.

A missing analyzer is not evidence the credential has no further access.

Rotation resources

Atlas has no rotation guide for this detector.

Token types

TruffleHog’s source looks for 6 token types, by prefix. It doesn’t name them.

Token types: from TruffleHog’s source, and what the vendor says
Prefix
api.us-west-
api.us-east-
api.us-central-
api.eu-west-
api.eu-east-
api.eu-central-

The detector’s source links no vendor pages.

Coverage in other scanners

No confirmed matches in the available catalogs.

  • BetterleaksNo confirmed match
  • GitHub Secret ProtectionNo confirmed match
  • GitleaksNo confirmed match
  • KingfisherNo confirmed match

Changes

1 recorded change since Sep 18, 2026; 1 still needs review.

  1. What this change means

    Regex changed, Verification endpoint changed, How responses are judged changed. Changes how the detector verifies or what it treats as the credential.

    Field changes
    FieldBeforeAfter
    Regex patterns
    Before: \b([a-zA-Z0-9_\.-]{2,70}), \b([a-z0-9]{8}\-[a-z0-9]{4}\-[a-z0-9]{4}\-[a-z0-9]{4}\-[a-z0-9]{12})\b, \b(api\.(?:us|eu)-(?:west|east|central)-[… show all
    \b([a-zA-Z0-9_\.-]{2,70}), \b([a-z0-9]{8}\-[a-z0-9]{4}\-[a-z0-9]{4}\-[a-z0-9]{4}\-[a-z0-9]{12})\b, \b(api\.(?:us|eu)-(?:west|east|central)-[0-9].saucelabs\.com)\b
    After: \b([a-zA-Z0-9_\.-]{2,70}), \b([a-z0-9]{8}\-[a-z0-9]{4}\-[a-z0-9]{4}\-[a-z0-9]{4}\-[a-z0-9]{12})\b, \b(api\.(?:us|eu)-(?:west|east|central)-[… show all
    \b([a-zA-Z0-9_\.-]{2,70}), \b([a-z0-9]{8}\-[a-z0-9]{4}\-[a-z0-9]{4}\-[a-z0-9]{4}\-[a-z0-9]{12})\b, \b(api\.(?:us|eu)-(?:west|east|central)-[0-9]\.saucelabs\.com)\b
    Verification endpointBefore: https://%s/team-management/v1/teamsAfter: https://%s/auth/v1/identity
    Expected statusesBefore: 200/403 (StatusOK, StatusForbidden) → verified; 401 (StatusUnauthorized) → not verified; other (default) → error or unknownAfter: 200 (StatusOK) → verified; 401 (StatusUnauthorized) → not verified; other (default) → error or unknown
    pkg/detectors/saucelabs/saucelabs.go+28−6View file
    @@ -2,6 +2,7 @@ package saucelabs
    22
    33import (
    44 "context"
    5added: "encoding/json"
    56 "fmt"
    67 "io"
    78 "net/http"
    @@ -14,6 +15,7 @@ import (
    1415)
    1516
    1617type Scanner struct {
    18added: client *http.Client
    1719 detectors.DefaultMultiPartCredentialProvider
    1820}
    @@ -21,17 +23,28 @@ type Scanner struct {
    2123var _ detectors.Detector = (*Scanner)(nil)
    2224
    2325var (
    24removed: client = common.SaneHttpClient()
    26added: defaultClient = common.SaneHttpClient()
    2527
    2628 // Make sure that your group is surrounded in boundary characters such as below to reduce false positives.
    2729 // as per signup page username can be between 2 to 70 characters and must only contain letters, numbers, or characters (_-.)
    2830 usernamePat = regexp.MustCompile(detectors.PrefixRegex([]string{"saucelabs", "username"}) + `\b([a-zA-Z0-9_\.-]{2,70})`)
    2931 keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"saucelabs"}) + `\b([a-z0-9]{8}\-[a-z0-9]{4}\-[a-z0-9]{4}\-[a-z0-9]{4}\-[a-z0-9]{12})\b`)
    30removed: baseUrlPat = regexp.MustCompile(`\b(api\.(?:us|eu)-(?:west|east|central)-[0-9].saucelabs\.com)\b`)
    32added: baseUrlPat = regexp.MustCompile(`\b(api\.(?:us|eu)-(?:west|east|central)-[0-9]\.saucelabs\.com)\b`)
    3133
    3234 fixedBaseURL = "api.us-west-1.saucelabs.com"
    3335)
    3436
    37added: type identityResponse struct {
    38added: Sub string `json:"sub"`
    39added: }
    40added:
    41added: func (s Scanner) getClient() *http.Client {
    42added: if s.client != nil {
    43added: return s.client
    44added: }
    45added: return defaultClient
    46added: }
    47added:
    3548// Keywords are used for efficiently pre-filtering chunks.
    3649// Use identifiers in the secret preferably, or the provider name.
    3750func (s Scanner) Keywords() []string {
    @@ -79,7 +92,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
    7992 }
    8093
    8194 if verify {
    82removed: isVerified, verificationErr := verifySauceLabKey(ctx, client, userName, key, baseURL)
    95added: isVerified, verificationErr := verifySauceLabKey(ctx, s.getClient(), userName, key, baseURL)
    8396 s1.Verified = isVerified
    8497 s1.SetVerificationError(verificationErr, key)
    8598 }
    @@ -100,10 +113,12 @@ func (s Scanner) Description() string {
    100113 return "A service for cross browser testing, API keys can create and access tests from potentially sensitive internal websites"
    101114}
    102115
    116added: // verifySauceLabKey calls the identity endpoint, which accepts any valid credential regardless of role
    117added: // and is documented to return only 200 or 401. Any other response (e.g. a 403 from a proxy) is indeterminate.
    103118func verifySauceLabKey(ctx context.Context, client *http.Client, userName, key, baseURL string) (bool, error) {
    104removed: apiURL := fmt.Sprintf("https://%s/team-management/v1/teams", baseURL)
    119added: apiURL := fmt.Sprintf("https://%s/auth/v1/identity", baseURL)
    105120
    106removed: req, err := http.NewRequestWithContext(ctx, http.MethodGet, apiURL, nil)
    121added: req, err := http.NewRequestWithContext(ctx, http.MethodGet, apiURL, http.NoBody)
    107122 if err != nil {
    108123 return false, err
    109124 }
    @@ -120,7 +135,14 @@ func verifySauceLabKey(ctx context.Context, client *http.Client, userName, key,
    120135 }()
    121136
    122137 switch resp.StatusCode {
    123removed: case http.StatusOK, http.StatusForbidden:
    138added: case http.StatusOK:
    139added: var identity identityResponse
    140added: if err := json.NewDecoder(resp.Body).Decode(&identity); err != nil {
    141added: return false, fmt.Errorf("unexpected response body: %w", err)
    142added: }
    143added: if identity.Sub == "" {
    144added: return false, fmt.Errorf("unexpected response body: missing account id")
    145added: }
    124146 return true, nil
    125147 case http.StatusUnauthorized:
    126148 return false, nil

Source

Every fact on this page was parsed from trufflesecurity/trufflehog at 2325546, unless a row below says otherwise.

2325546
2921dcc
Parser
trufflehog-detectors-analyzers-v12
Extraction
intel-detector-v7

5 of 23 evidence rows need attention

Evidence rows that need attention
FieldStatusValueSource
lastSeenAt2026-11-25T16:33:44.855ZNo citation
rotationGuideNone extractedFile
timeoutNone extractedFile
rateLimitNone extractedFile
verify.urlshttps://%s/auth/v1/identityParser confidence: lowFile
All 23 evidence rows
All evidence rows
FieldStatusValueSource
descriptionA service for cross browser testing, API keys can create and access tests from potentially sensitive internal websitesFile
keywordssaucelabsFile
detectorTypesSauceLabsFile
filessaucelabs.goFile
patterns\b([a-zA-Z0-9_\.-]{2,70}), \b([a-z0-9]{8}\-[a-z0-9]{4}\-[a-z0-9]{4}\-[a-z0-9]{4}\-[a-z0-9]{12})\b, \b(api\.(?:us|eu)-(?:west|east|central)-[0-9]\.saucelabs\.com)\bFile
patternTypeprefix_regexFile
statusactiveFile
lastSeenAt2026-11-25T16:33:44.855ZNo citation
rotationGuideNone extractedFile
verify.hasVerifyYesFile
verify.httpMethodsGETFile
verify.statusCodesOK, UnauthorizedFile
timeoutNone extractedFile
rateLimitNone extractedFile
errorHandlingSetVerificationError; unexpected status code %vFile
verify.urlshttps://%s/auth/v1/identityParser confidence: lowFile
detection.keywordssaucelabsLines 50–50
verification.endpointhttps://%s/auth/v1/identityLines 121–121
verification.httpMethodGETLines 121–121
verification.authenticationMethodHTTP Basic AuthenticationLines 126–126
verification.expectedStatuses.verified{"statuses":[200],"names":["StatusOK"],"outcome":"verified"}Lines 138–138
verification.expectedStatuses.not_verified{"statuses":[401],"names":["StatusUnauthorized"],"outcome":"not_verified"}Lines 147–147
verification.expectedStatuses.error_or_unknown{"statuses":[],"names":["default"],"outcome":"error_or_unknown"}Lines 149–149
Parser completeness
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Unknown
  • Field status: Unknown
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Not scanned
Package files (1)
  • saucelabs.go