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, bucket context) is present within 300 characters. 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 assignments, or bucket policy context) within 300 characters.
Jurisdictions
global
Regulations
Criminal Code Act 1995 (Cth)
Frameworks
CIS Controls, ISO 27001, NIST CSF, PCI-DSS
Data categories
credentials, security, cloud
Scope
specific
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, bucket, AWS_SECRET

Proximity: 300 characters

Should match

Should not match

Known false positives

Collections