Skip to content
Detectors

Scanner deep dive

Overview

The AWS detector looks for pieces of a credential that belong together. The code names fields such as “access key ID” and “secret access key”.

Needs a person to check

Provider and detector details

Summary

ProviderNo provider details added yet.

  • Recognizable prefix (“AKIA” or “ABIA” (3 more))
  • Randomness check (differs by version)
  • Multi-part credential (parts listed across variants)
  • Unchanged since Sep 18, 2026(log start)
  • Source at 2325546
  • 1 review item
  • Change review: Nothing queued
  • Default scan: Runs in a default scan
  • pkg/detectors/aws
  • Vendor name inferred from source, not reviewed

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

AWS (Amazon Web Services) is a comprehensive cloud computing platform offering a wide range of on-demand services like computing power, storage, databases. API keys for AWS can have varying amount of access to these services depending on the IAM policy attached. AWS AppSync is a managed GraphQL service. This detector identifies exposed AppSync API keys. AWS Session Tokens are short-lived keys.
From the detector’s Description() in source

How detection works

The Access keys detector checks decoded text containing “AKIA”, “ABIA” or “ACCA” for a possible credential.

Matching rules and source
Keywords
  • AKIA
  • ABIA
  • ACCA

Regex

  • RegexidPatPlaced by a keyword only this variant declares

    \b((?:AKIA|ABIA|ACCA)[A-Z0-9]{16})\b

    Matches 16-character strings of uppercase letters and digits after a prefix such as “AKIA”, “ABIA” or “ACCA”.

    Show as a diagram
accesskey.go:83 (opens TruffleHog source on GitHub)
Detector-wide rules and behavior

How it works

  1. Finds the parts each variant needs and pairs them. Across variants these are access key ID, secret access key, key, endpoint and session token; which variant uses which isn’t parsed.
  2. Values below an entropy threshold are skipped. The threshold differs by version; How it behaves lists each one.
  3. Reports each remaining match as a possible AWS credential. It isn’t known to work until it’s verified.
MustCompile
Several partsaccess_key_id, secret_access_key, key, endpoint and session_token
3 regexes shared across variants

Used by more than one variant, or not tied to one variant’s files in what was read from source (shared files: common.go, utils.go).

  • Regex 1SecretPat

    (?:[^A-Za-z0-9+/]|\A)([A-Za-z0-9+/]{40})(?:[^A-Za-z0-9+/]|\z)
    Show as a diagram
  • Regex 2sessionPat

    (?:[^A-Za-z0-9+/]|\A)([a-zA-Z0-9+/]{100,}={0,3})(?:[^A-Za-z0-9+/=]|\z)
    Show as a diagram
  • Regex 3FalsePositiveSecretPat

    [a-f0-9]{40}

    Matches 40-character strings of lowercase hex characters.

    Show as a diagram
Guards against false matches
Differs by version; How it behaves lists each threshold
Not found in source
  • resource_type
  • base_url
  • account
  • message
  • is_canary
  • arn
Pairing and normalization
  • access_key_id, secret_access_key, key, endpoint, session_token are combined from match sets

How it behaves

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

pkg/detectors/aws/access_keys · scanner

Keywords

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

  • AKIA
  • ABIA
  • ACCA

accesskey.go line 84 (opens TruffleHog source on GitHub)

Behavior

Multi-part
Yes, pairs two parts such as an ID and a secret
accesskey.go line 30 (opens TruffleHog source on GitHub)
Custom endpoints
No
Cloud endpoint
None
Randomness check
Skips each part with entropy below 3 or 4.25, depending on the part
accesskey.go line 135 (opens TruffleHog source on GitHub)
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

  • Access keys: Wakes on “AKIA”, “ABIA” or “ACCA”, reads 1024 bytes around each hit to pair two parts and tests matches with the provider. A default scan runs it.
  • AppSync: Wakes on “da2-”, reads 1024 bytes around each hit to pair two parts and tests matches with the provider. A default scan runs it.
  • Session keys: Wakes on “ASIA”, reads 2048 bytes around each hit to pair two parts and tests matches with the provider. A default scan runs it.

How verification works

Each variant checks a found key its own way. Compare their requests and how answers are judged below.

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?

Probably not, but not certain: the source declares no changes, and many checks use POST only to read. POST can change data, so check the source if it matters.

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

Files
access_keys/accesskey.go, access_keys/canary.go
Request
Not tied to this variant’s files in what was read from source. The check may live in a shared file (common.go, utils.go).
Key is sent as
—
How answers are judged
—
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

Each variant checks keys its own way. Use the one that matches your key’s format (see Detection above).

  • Access keys

    No check is tied to this variant’s files in what was read from source.

  • AppSync

    No command for this check. The request's method or address isn't recorded, so no command is shown.

    Rule: missing. Key placement as recorded: x-api-key header.

  • Session keys

    No command for this check. The request's method or address isn't recorded, so no command is shown.

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

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.
  • The provider rejected the key. TruffleHog counts these as not verified (AppSync: 401 and 403): usually a revoked, expired or mistyped key. A 403 can also mean the key is real but isn't allowed to call this endpoint.
  • Rate limit or provider problem. TruffleHog counts these as an error, not a rejection (AppSync: any other status). A rate limit (429) or an outage lands here; the key can be checked again later.
  • Verified only when an extra condition holds. A successful status alone isn't enough here (AppSync: the response body contains “No schema definition exists”).
  • The provider changed its API. If the provider answers differently from the table above, its API may have changed since this check was written. Compare against the provider's docs.

3. Check the provider’s docs

4. Still stuck

Report it to TruffleHog

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

Errors, timeouts and rate limits
2s, 5s, 3s, 1s
Not found in source
SetVerificationError; unexpected HTTP response status %d; request to %v returned status %d with an unexpected reason (%s: %s); request to %v returned unexpected status %d

StatusBadGateway is verified only if `bytes.Contains(bodyBytes, []byte("No schema definition exists"))` (from source).

other statuses: verification error or unknown

transport errors return a verification error

All URLs found in source

  • https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-unique-ids
  • https://docs.aws.amazon.com/sdk-for-go/v2/developer-guide/configure-http.html
  • https://sts.amazonaws.com
  • https://howtorotate.com/docs/tutorials/aws/
  • https://docs.aws.amazon.com/sdk-for-go/v2/developer-guide/middleware.html
  • https://docs.aws.amazon.com/appsync/latest/APIReference/CommonErrors.html
  • http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
  • https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html
  • https://nitter.poast.org/TalBeerySec/status/1816449053841838223#m
  • https://medium.com/@TalBeerySec/a-short-note-on-aws-key-id-f88cc4317489
  • %s/%s/%s/aws4_request
Provider response documentation

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: AWS
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 AWS 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.

See Cloud Analyze setup

A notifier that displays rotation guides can include this link with the alert.

Open rotation guide

Optional analysis

Cloud Analyze is available for this credential type.

Enterprise Cloud Analyze

Rotation resources

Token types

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

What the vendor says:from the vendor’s own pages. Their exact words appear only where the vendor’s licence allows it.

Token types: from TruffleHog’s source, and what the vendor says
PrefixVariantWhat the vendor says
AKIAAccess keysAccess keydocs.aws.amazon.com
SourceAmazon Web Services, IAM User Guide, "Understanding unique ID prefixes". Checked 2026-11-24.Link only. No reuse licence found for AWS documentation, so no AWS text is copied.
Also linked from TruffleHog’s source.
ABIAAccess keysAWS STS service bearer tokendocs.aws.amazon.com
SourceAmazon Web Services, IAM User Guide, "Understanding unique ID prefixes". Checked 2026-11-24.Link only. No reuse licence found for AWS documentation, so no AWS text is copied.
Also linked from TruffleHog’s source.
ACCAAccess keysContext-specific credentialdocs.aws.amazon.com
SourceAmazon Web Services, IAM User Guide, "Understanding unique ID prefixes". Checked 2026-11-24.Link only. No reuse licence found for AWS documentation, so no AWS text is copied.
Also linked from TruffleHog’s source.
da2-AppSyncAppSync API keydocs.aws.amazon.com
SourceAmazon Web Services, AWS AppSync Developer Guide, "API_KEY authorization". Checked 2026-11-24.Link only. No reuse licence found for AWS documentation, so no AWS text is copied.
Caution: The page describes AppSync API keys but doesn't state the da2- prefix. That the prefix marks an AppSync API key comes from TruffleHog's AppSync variant, not from AWS.
ASIASession keysTemporary (AWS STS) access key IDdocs.aws.amazon.com
SourceAmazon Web Services, IAM User Guide, "Understanding unique ID prefixes". Checked 2026-11-24.Link only. No reuse licence found for AWS documentation, so no AWS text is copied.
Also linked from TruffleHog’s source.Caution: AWS says these IDs are unique only together with the secret access key and the session token.
Pages TruffleHog’s source links to (7)

Coverage in other scanners

4 scanners have a confirmed match.

Changes

No changes to AWS since Sep 18, 2026, when Atlas started recording.

When TruffleHog changes this detector, the changed fields, the pull request and the source diff appear here for review.

Browse all changesSource history on GitHub

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

3 of 31 evidence rows need attention

Evidence rows that need attention
FieldStatusValueSource
lastSeenAt2026-11-25T16:33:44.855ZNo citation
rateLimitNone extractedFile
verify.urls%s/%s/%s/aws4_requestParser confidence: lowFile
All 31 evidence rows
All evidence rows
FieldStatusValueSource
descriptionAWS (Amazon Web Services) is a comprehensive cloud computing platform offering a wide range of on-demand services like computing power, storage, databases. API keys for AWS can have varying amount of access to these services depending on the IAM policy attached.File
keywordsAKIA, ABIA, ACCA, da2-, ASIAFile
detectorTypesAWS, AWSAppSync, AWSSessionKeyFile
filesaccess_keys/accesskey.go, access_keys/canary.go, appsync/appsync.go, common.go, session_keys/sessionkey.go, utils.goFile
patterns\b((?:AKIA|ABIA|ACCA)[A-Z0-9]{16})\b, \b(da2-[a-z0-9]{26})\b, (https:\/\/[a-z0-9]{26}\.appsync-api\.[a-z0-9-]+\.amazonaws\.com)([^a-zA-Z0-9.-]|$), (?:[^A-Za-z0-9+/]|\A)([A-Za-z0-9+/]{40})(?:[^A-Za-z0-9+/]|\z), \b((?:ASIA)[A-Z0-9]{16})\b, (?:[^A-Za-z0-9+/]|\A)([a-zA-Z0-9+/]{100,}={0,3})(?:[^A-Za-z0-9+/=]|\z), [a-f0-9]{40}File
patternTypemust_compileFile
statusactiveFile
lastSeenAt2026-11-25T16:33:44.855ZNo citation
rotationGuidehttps://howtorotate.com/docs/tutorials/aws/File
verify.hasVerifyYesFile
verify.httpMethodsPOSTFile
verify.statusCodesOK, BadGateway, Unauthorized, ForbiddenFile
entropyMinimum4.5File
timeout2s, 5s, 3s, 1sFile
rateLimitNone extractedFile
errorHandlingSetVerificationError; unexpected HTTP response status %d; request to %v returned status %d with an unexpected reason (%s: %s); request to %v returned unexpected status %dFile
verify.urlshttps://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-unique-ids, https://docs.aws.amazon.com/sdk-for-go/v2/developer-guide/configure-http.html, https://sts.amazonaws.com, https://howtorotate.com/docs/tutorials/aws/, https://docs.aws.amazon.com/sdk-for-go/v2/developer-guide/middleware.html, https://docs.aws.amazon.com/appsync/latest/APIReference/CommonErrors.html, http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html, https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html, https://nitter.poast.org/TalBeerySec/status/1816449053841838223#m, https://medium.com/@TalBeerySec/a-short-note-on-aws-key-id-f88cc4317489File
verify.urls%s/%s/%s/aws4_requestParser confidence: lowFile
detection.keywordsAKIA, ABIA, ACCALines 83–83
detection.keywordsda2-Lines 37–37
detection.keywordsASIALines 80–80
verification.httpMethodPOSTLines 112–112
verification.authenticationMethodx-api-key headerLines 123–123
verification.expectedStatuses.verified{"statuses":[200],"names":["StatusOK"],"outcome":"verified"}Lines 138–138
verification.expectedStatuses.verified{"statuses":[],"names":["StatusBadGateway"],"outcome":"verified","condition":"bytes.Contains(bodyBytes, []byte(\"No schema definition exists\"))"}Lines 141–141
verification.expectedStatuses.conditionbytes.Contains(bodyBytes, []byte("No schema definition exists"))Lines 148–148
verification.expectedStatuses.not_verified{"statuses":[401,403],"names":["StatusUnauthorized","StatusForbidden"],"outcome":"not_verified"}Lines 155–155
verification.expectedStatuses.error_or_unknown{"statuses":[],"names":["default"],"outcome":"error_or_unknown"}Lines 158–158
verification.endpoint%s/%s/%s/aws4_requestLines 224–224
verification.authenticationMethodAuthorization headerLines 262–262
verification.expectedStatuses.verified{"statuses":[],"names":["2xx"],"outcome":"verified"}Lines 282–282
Parser completeness
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Unknown
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Not scanned
Package files (6)
  • access_keys/accesskey.go
  • access_keys/canary.go
  • appsync/appsync.go
  • common.go
  • session_keys/sessionkey.go
  • utils.go