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”.
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
- Source at 2325546
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.
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
Regex
\b((?:AKIA|ABIA|ACCA)[A-Z0-9]{16})\bMatches 16-character strings of uppercase letters and digits after a prefix such as “AKIA”, “ABIA” or “ACCA”.
Show as a diagram
Detector-wide rules and behavior
How it works
- 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.
- Values below an entropy threshold are skipped. The threshold differs by version; How it behaves lists each one.
- Reports each remaining match as a possible AWS credential. It isn’t known to work until it’s verified.
- Regular expression
- Several partsaccess key ID, secret access key, key, endpoint and session token
Compare all matching rules side by side
| Access keysaccess_keys/accesskey.go, access_keys/canary.go | AppSyncappsync/appsync.go | Session keyssession_keys/sessionkey.go | |
|---|---|---|---|
| Keywords |
|
|
|
| Regexes |
|
|
|
- Files
- access_keys/accesskey.go, access_keys/canary.go
- Keywords
- AKIA
- ABIA
- ACCA
- Regexes
Regex
\b((?:AKIA|ABIA|ACCA)[A-Z0-9]{16})\bMatches 16-character strings of uppercase letters and digits after a prefix such as “AKIA”, “ABIA” or “ACCA”.
Show as a diagram
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 1
(?:[^A-Za-z0-9+/]|\A)([A-Za-z0-9+/]{40})(?:[^A-Za-z0-9+/]|\z)Show as a diagram
Regex 2
(?:[^A-Za-z0-9+/]|\A)([a-zA-Z0-9+/]{100,}={0,3})(?:[^A-Za-z0-9+/=]|\z)Show as a diagram
Regex 3
[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
How it behaves
What this detector does at each step of the TruffleHog pipeline.
Keywords
Any one of these in the decoded text wakes the detector.
- AKIA
- ABIA
- ACCA
Behavior
- Multi-part
- Yes, pairs two parts such as an ID and a secret
- accesskey.go line 30 (opens TruffleHog source on GitHub)
- Match window
- 1024 bytes on each side of a keyword
- multi_part_credential_provider.go line 13 (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.
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.
| Access keysaccess_keys/accesskey.go, access_keys/canary.go | AppSyncappsync/appsync.go | Session keyssession_keys/sessionkey.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). | POSTEndpoint not found in sourceappsync.go:112 (opens TruffleHog source on GitHub) | Method not found in source%s/%s/%s/aws4_requestPart of this address is filled in when the check runs.sessionkey.go:224 (opens TruffleHog source on GitHub) |
| Key is sent as | — | x-api-key headerappsync.go:123 (opens TruffleHog source on GitHub) | Authorization headersessionkey.go:262 (opens TruffleHog source on GitHub) |
| How answers are judged | — |
|
- 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.
Session keys
No command for this check. The request's method or address isn't recorded, so no command is shown.
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
- Provider response documentation linked from TruffleHog’s source
4. Still stuck
Report it to TruffleHogInclude the status code and response you got. Never include the key.
Errors, timeouts and rate limits
- 2s, 5s, 3s, 1s
- Not found in source
- If the provider can’t be reached
- The result is an error, not a rejection, and the key can be checked again.
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
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 sourceCI 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 sourceLegacy 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 setupA notifier that displays rotation guides can include this link with the alert.
Open rotation guideOptional analysis
Cloud Analyze is available for this credential type.
Rotation resources
Use the rotation guide to replace this credential.
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.
| Prefix | Variant | What the vendor says |
|---|---|---|
| AKIA | Access keys | Access 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. |
| ABIA | Access keys | AWS 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. |
| ACCA | Access keys | Context-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. |
| da2- | AppSync | AppSync 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. |
| ASIA | Session keys | Temporary (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. |
Pages TruffleHog’s source links to (7)
Written in the detector’s source by its authors. Shown as written: this doesn’t say what each page covers.
- docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-unique-ids
- docs.aws.amazon.com/sdk-for-go/v2/developer-guide/configure-http.html
- docs.aws.amazon.com/sdk-for-go/v2/developer-guide/middleware.html
- docs.aws.amazon.com/appsync/latest/APIReference/CommonErrors.html
- docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
- docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html
- medium.com/@TalBeerySec/a-short-note-on-aws-key-id-f88cc4317489
Coverage in other scanners
4 scanners have a confirmed match.
BetterleaksConfirmed match
GitHub Secret ProtectionConfirmed match
- Amazon AWS Access Key ID
aws_access_key_id, aws_secret_access_keyPush protection yes · Validity check yes - Amazon AWS API Key ID
aws_api_keyPush protection yes · Validity check no - Amazon AWS Session Token
aws_secret_access_key, aws_session_token, aws_temporary_access_key_idPush protection yes · Validity check yes
- Amazon AWS Access Key ID
GitleaksConfirmed match
KingfisherConfirmed match
betterleaks.aws-access-tokenThe rule declares validation, access mapping, revocation.betterleaks.aws-session-tokenThe rule declares validation.
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.
Source
Facts on this page were read from trufflesecurity/trufflehog at commit 2325546.