S3 URI in Source Code with AWS Credential Context

Detects S3 and S3A URI references in source code or configuration files when accompanied by AWS credential context. S3 URIs alone are high-FP enumeration signals; this pattern only fires at 75+ confidence when AWS credential evidence (access key, secret, AKIA prefix) is present within 300 characters. URI-only matches surface at 65 as discovery inventory. Mirrors Snaffler rule KeepS3UriPrefixInCode.

Type
regex
Engine
boost_regex
Confidence
low
Confidence justification
Low confidence alone: s3:// URIs appear in logging config, documentation, and infrastructure code without any credential exposure. Detection is only meaningful when combined with AWS credential evidence (AKIA key IDs, aws_secret_access_key or access-key assignments) within 300 characters; generic bucket wording is storage context, not credential corroboration.
Jurisdictions
global
Regulations
Criminal Code Act 1995 (Cth)
Frameworks
CIS Controls, ISO 27001, NIST CSF, PCI-DSS
Data categories
credentials, security, cloud
Scope
specific
Risk rating
8
Platform compatibility
Purview: Compatible, GCP DLP: Compatible, Macie: Compatible, Zscaler: Compatible, Palo Alto: Compatible, Netskope: Compatible

Pattern

s3a?://[A-Za-z0-9\-+/]{2,40}

Corroborative evidence keywords

aws_access_key_id, aws_secret_access_key, AKIA, AWS_SECRET

Proximity: 300 characters

Should match

Should not match

Known false positives

Collections