Skip to content
Detectors

Scanner deep dive

Overview

Infisical is an open-source secrets management platform. Service tokens can be used to read and write secrets within their scoped environments and paths.
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 Infisical detector looks for a single value in text that resembles a credential. It uses the word “st.” to narrow its search.

Runs by default

Matching rules and source
Keywords
  • st.

Regex

  • RegexkeyPatinfisical.go:51 (opens TruffleHog source on GitHub)Only code file

    \b((st\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.[0-9a-f]{32})(?:\.[0-9a-f]{32})?)\b
    Show as a diagram

How it works

  1. Skips any text that doesn’t contain “st.”. This keeps scanning fast.
  2. Looks for text matching its pattern.
  3. Reports each remaining match as a possible Infisical credential. It isn’t known to work until it’s verified.
MustCompile
One value
Guards against false matches
Not found in source
Not found in source

How it behaves

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

pkg/detectors/infisical · Scanner

Keywords

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

  • st.

infisical.go line 57 (opens TruffleHog source on GitHub)

Behavior

Multi-part
No
Match window
512 bytes on each side of a keyword
ahocorasickcore.go line 159 (opens TruffleHog source on GitHub)
Custom endpoints
Yes, can verify against your own server
infisical.go line 20 (opens TruffleHog source on GitHub)
Cloud endpoint
https://app.infisical.com
infisical.go line 29 (opens TruffleHog source on GitHub)
Randomness check
None in this detector's own code
False-positive check
The shared word lists
Enabled by default
Yes in the open-source CLI, which turns on its feature flag
defaults.go line 1328 (opens TruffleHog source on GitHub)

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 “st.” and tests matches with the provider. The open-source CLI runs it by turning on its feature flag.

How verification works

What it means

Sends GET to a templated URL.

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

Verification walkthrough

How it works

  1. Sends a GET to %s/api/v2/service-token.
  2. Puts the found credential in the request: credential is sent in the Authorization header; scheme is not Bearer/token in source.
  3. If the request can’t reach the provider, the result is an error, not a rejection.

Evidence from source

Endpoint

%s/api/v2/service-token

Part of this address is filled in when the check runs, so the exact host isn’t known from source.

infisical.go:127 (opens TruffleHog source on GitHub)

How responses are judged

Not found in source

Troubleshoot this check

If a result looks wrong, work through these steps. They’re built from the request and status rules above. The Atlas doesn’t send anything.

1. Send the same request yourself

curl -i -H "Authorization: $AUTHORIZATION_VALUE" "{BASE_URL}/api/v2/service-token"
  • {BASE_URL}: your instance's address, such as https://your-company.example.com
  • $AUTHORIZATION_VALUE: the full Authorization header value (its format depends on the provider)

Rule: header. Key placement as recorded: Authorization header.

Only test keys you own or are allowed to check. Each command is one read-only GET request, the same one TruffleHog makes. Compare the status you get with “How responses are judged” above.

2. Likely causes

  • The check used the wrong address. Part of this check's address depends on your account or server. If the key belongs to a self-hosted, regional or custom-domain instance, make sure that's the address being called.
  • The scanner couldn't reach the provider. The scanner needs outbound HTTPS access to the provider. A firewall, proxy or DNS problem is reported as an error, not a rejection, and the key can be checked again.

3. Check the provider’s docs

No provider doc recorded for this check yet.

4. Still stuck

Report it to TruffleHog

Include the status code and response you got. Never include the key.

Errors, timeouts and rate limits
Not found in source
HTTP 429
SetVerificationError; HTTP 5xx; rate limited (HTTP 429): token validity could not be determined; unexpected HTTP response status %d

transport errors return a verification error

All URLs found in source

  • https://app.infisical.com
  • https://infisical.com/docs/cli/usage
  • https://eu.infisical.com
  • %s/api/v2/service-token

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: Infisical
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 Infisical 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 doesn’t name a token type or require a fixed prefix for this detector.

Pages TruffleHog’s source links to (1)

Written in the detector’s source by its authors. Shown as written: this doesn’t say what each page covers.

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

    Atlas added infisical to its detector catalog in this update.

    pkg/detectors/infisical/infisical.go+170−0View file
    @@ -0,0 +1,170 @@
    1added: package infisical
    2added:
    3added: import (
    4added: "cmp"
    5added: "context"
    6added: "fmt"
    7added: "io"
    8added: "net/http"
    9added: "net/url"
    10added:
    11added: regexp "github.com/wasilibs/go-re2"
    12added:
    13added: "github.com/trufflesecurity/trufflehog/v3/pkg/common"
    14added: "github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
    15added: "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detector_typepb"
    16added: )
    17added:
    18added: type Scanner struct {
    19added: client *http.Client
    20added: detectors.EndpointSetter
    21added: }
    22added:
    23added: // Ensure the Scanner satisfies the interfaces at compile time.
    24added: var _ detectors.Detector = (*Scanner)(nil)
    25added: var _ detectors.EndpointCustomizer = (*Scanner)(nil)
    26added: var _ detectors.CloudProvider = (*Scanner)(nil)
    27added:
    28added: // CloudEndpoint returns the primary Infisical Cloud region (US).
    29added: func (Scanner) CloudEndpoint() string { return "https://app.infisical.com" }
    30added:
    31added: // additionalCloudEndpoints lists the remaining Infisical Cloud regions.
    32added: // Cloud regions are isolated: a token issued in one region is unknown on
    33added: // the other host, so every region must be tried during verification.
    34added: // Self-hosted instances are not listed here. They are verified only when
    35added: // an operator configures their URL as a custom verification endpoint.
    36added: // https://infisical.com/docs/cli/usage
    37added: var additionalCloudEndpoints = []string{
    38added: "https://eu.infisical.com",
    39added: }
    40added:
    41added: var (
    42added: defaultClient = common.SaneHttpClient()
    43added:
    44added: // Infisical service tokens have the form st.<id>.<secret>, where <id> is a
    45added: // UUID and <secret> is 32 lowercase hex characters (crypto.randomBytes(16)).
    46added: // See Infisical/infisical backend/src/services/service-token/service-token-service.ts.
    47added: // The dashboard appends a fourth segment of 32 lowercase hex characters
    48added: // before showing the token (frontend/src/hooks/api/serviceTokens/queries.tsx),
    49added: // and the official CLI rejects tokens without it. Group 1 is the full token
    50added: // as found. Group 2 is the three-part form that authenticates to the API.
    51added: keyPat = regexp.MustCompile(`\b((st\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.[0-9a-f]{32})(?:\.[0-9a-f]{32})?)\b`)
    52added: )
    53added:
    54added: // Keywords are used for efficiently pre-filtering chunks.
    55added: // Use identifiers in the secret preferably, or the provider name.
    56added: func (s Scanner) Keywords() []string {
    57added: return []string{"st."}
    58added: }
    59added:
    60added: // FromData will find and optionally verify Infisical service tokens in a given set of bytes.
    61added: func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (results []detectors.Result, err error) {
    62added: dataStr := string(data)
    63added:
    64added: // Map each full token to the three-part form sent for verification.
    65added: uniqueMatches := make(map[string]string)
    66added: for _, match := range keyPat.FindAllStringSubmatch(dataStr, -1) {
    67added: uniqueMatches[match[1]] = match[2]
    68added: }
    69added:
    70added: for resMatch, authToken := range uniqueMatches {
    71added: s1 := detectors.Result{
    72added: DetectorType: detector_typepb.DetectorType_Infisical,
    73added: Raw: []byte(resMatch),
    74added: SecretParts: map[string]string{"key": resMatch},
    75added: }
    76added:
    77added: if verify {
    78added: client := s.VerificationClient(cmp.Or(s.client, defaultClient))
    79added:
    80added: // Verification targets the Infisical Cloud regions (US and EU)
    81added: // plus any operator-configured endpoints, such as self-hosted
    82added: // instances. URLs in the scanned data are never used.
    83added: //
    84added: // Only non-nil errors overwrite lastErr so that a clean 404 from
    85added: // the wrong region doesn't erase a transient failure (429, 5xx,
    86added: // timeout) from a region that might be authoritative.
    87added: var lastErr error
    88added: for _, baseURL := range s.Endpoints(additionalCloudEndpoints...) {
    89added: isVerified, vErr := verifyServiceToken(ctx, client, baseURL, authToken)
    90added: s1.Verified = isVerified
    91added: if vErr != nil {
    92added: lastErr = vErr
    93added: }
    94added: if isVerified {
    95added: lastErr = nil
    96added: s1.ExtraData = map[string]string{"endpoint": baseURL}
    97added: break
    98added: }
    99added: }
    100added: s1.SetVerificationError(lastErr, resMatch)
    101added: }
    102added:
    103added: results = append(results, s1)
    104added: }
    105added:
    106added: return results, nil
    107added: }
    108added:
    109added: // verifyServiceToken checks a three-part service token against one Infisical
    110added: // instance. It calls GET /api/v2/service-token, which returns only the
    111added: // token's metadata. The official CLI calls the same route to read token
    112added: // details. Do not switch to /api/v3/secrets/raw: for a token with one exact
    113added: // scope, that route returns the plaintext secret values and writes a secret
    114added: // read to the owner's audit log.
    115added: //
    116added: // The first return value reports whether the token verified. The error is
    117added: // non-nil only when verification is indeterminate (the token's validity
    118added: // could not be established from this response); the caller records it via
    119added: // Result.SetVerificationError so an ambiguous result is not silently
    120added: // dropped as a determinate miss.
    121added: func verifyServiceToken(ctx context.Context, client *http.Client, baseURL, token string) (bool, error) {
    122added: endpoint, err := url.JoinPath(baseURL, "/api/v2/service-token")
    123added: if err != nil {
    124added: return false, err
    125added: }
    126added:
    127added: req, err := http.NewRequestWithContext(ctx, http.MethodGet, endpoint, nil)
    128added: if err != nil {
    129added: return false, err
    130added: }
    131added: req.Header.Set("Authorization", "Bearer "+token)
    132added:
    133added: res, err := client.Do(req)
    134added: if err != nil {
    135added: return false, err
    136added: }
    137added: defer func() {
    138added: _, _ = io.Copy(io.Discard, res.Body)
    139added: _ = res.Body.Close()
    140added: }()
    141added:
    142added: switch {
    143added: case res.StatusCode == http.StatusOK:
    144added: return true, nil
    145added: case res.StatusCode == http.StatusUnauthorized, res.StatusCode == http.StatusNotFound:
    146added: // Determinately invalid: the instance does not recognize this token.
    147added: return false, nil
    148added: case res.StatusCode == http.StatusForbidden:
    149added: // Ambiguous: Infisical returns 403 for an expired token, and a proxy
    150added: // or WAF in front of the instance can reject requests for non-auth
    151added: // reasons. Do not read this as "not a secret".
    152added: return false, fmt.Errorf("forbidden response (HTTP 403): token validity could not be determined")
    153added: case res.StatusCode == http.StatusTooManyRequests:
    154added: // Transient rate limit; retrying later may verify the token.
    155added: return false, fmt.Errorf("rate limited (HTTP 429): token validity could not be determined")
    156added: case res.StatusCode >= 500:
    157added: // Transient server failure; the token's validity is unknown.
    158added: return false, fmt.Errorf("server error (HTTP %d): token validity could not be determined", res.StatusCode)
    159added: default:
    160added: return false, fmt.Errorf("unexpected HTTP response status %d", res.StatusCode)
    161added: }
    162added: }
    163added:
    164added: func (s Scanner) Type() detector_typepb.DetectorType {
    165added: return detector_typepb.DetectorType_Infisical
    166added: }
    167added:
    168added: func (s Scanner) Description() string {
    169added: return "Infisical is an open-source secrets management platform. Service tokens can be used to read and write secrets within their scoped environments and paths."
    170added: }

Source

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

2325546
50bc667
Parser
trufflehog-detectors-analyzers-v12
Extraction
intel-detector-v7

4 of 21 evidence rows need attention

Evidence rows that need attention
FieldStatusValueSource
lastSeenAt2026-11-25T16:33:44.855ZNo citation
rotationGuideNone extractedFile
timeoutNone extractedFile
verify.urls%s/api/v2/service-tokenParser confidence: lowFile
All 21 evidence rows
All evidence rows
FieldStatusValueSource
descriptionInfisical is an open-source secrets management platform. Service tokens can be used to read and write secrets within their scoped environments and paths.File
keywordsst.File
detectorTypesInfisicalFile
filesinfisical.goFile
patterns\b((st\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.[0-9a-f]{32})(?:\.[0-9a-f]{32})?)\bFile
patternTypemust_compileFile
statusactiveFile
lastSeenAt2026-11-25T16:33:44.855ZNo citation
rotationGuideNone extractedFile
verify.hasVerifyYesFile
verify.httpMethodsGETFile
verify.statusCodesOK, Unauthorized, NotFound, Forbidden, TooManyRequestsFile
timeoutNone extractedFile
rateLimitHTTP 429File
errorHandlingSetVerificationError; HTTP 5xx; rate limited (HTTP 429): token validity could not be determined; unexpected HTTP response status %dFile
verify.urlshttps://app.infisical.com, https://infisical.com/docs/cli/usage, https://eu.infisical.comFile
verify.urls%s/api/v2/service-tokenParser confidence: lowFile
detection.keywordsst.Lines 56–56
verification.endpoint%s/api/v2/service-tokenLines 127–127
verification.httpMethodGETLines 127–127
verification.authenticationMethodAuthorization headerLines 131–131
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)
  • infisical.go