Library Rules

Overview

The Scanning Rule Library is a collection of predefined rules for detecting common patterns such as email addresses, credit card numbers, API keys, authorization tokens, and more.


These rules can also be viewed in Datadog:

  1. Navigate to Sensitive Data Scanner.
  2. Click Scanning Rules Library on the top right side of the page.
  3. To add rules from the library to a scanning group:
    a. Select the rules you want to add.
    b. Click Add Rules to Scanning Group.
    c. Follow the steps in Set Up Sensitive Data Scanner to finish the setup

Secrets and credentials

Library ruleDefault Keywords
AWS Access Key ID Scanneraws_access_key_id, access key, aws access
AWS Secret Access Key Scanneraws_secret_access_key, credentials, secret access key, secret key, set-awscredential
Dynatrace Token Scannerdynatrace, token
Facebook Access Token Scannerfacebook, access, token
Gitlab Token Scannergitlab, token
Instagram Token ScannerInstagram, token
JSON Web Token Scanner-
Mailchimp API Key Scannermailchimp, api key
Mailgun API Key Scannermailgun, api key
Okta API Token Scannerokta, api token
Slack Access Token Scannerslack, access, token
Stripe API Key Scannerstripe, api key
Stripe Restricted API Key Scannerstripe, api key
Twilio API Key Scannertwilio, api key
Square Access Token Scannersquare, access, token
Square OAuth Secret Scannersquare, oauth, secret, authorization, authentication
Google API Key Scannerg_places_key, gcp api key, gcp key, google cloud key, google-api-key, google-cloud-apikeys, googlekey, x-goog-api-key
Google OAuth Access Token Scannergoogle, oauth, access, token, authorization, authentication
RSA Private Key Scannerrsa, private key
Send Grid API Token Scannersend grid, api token
Heroku API Key Scannerheroku, api key
SSH Key Scannerssh, ssh key
PGP Private Key Scannerpgp, key
Paypal Braintree Access Token Scannerpaypal, braintree, access, token
Amazon Marketplace Web Services Auth Token Scanneramazon, marketplace, aws, auth, token, authorization, authentication
Azure Personal Access Token Scannerazure, access, token
Azure SQL Connection String Scannerazure, sql, connection string
Azure Subscription Key Scannerazure, subscription key
Bearer Token Scannerbearer, token
Checkout.com Secret Scannercheckout, secret
Databricks Personal Access Token Scannerdatabricks, access, token
Docker Swarm Join Token Scannerdocker, docker swarm, join token
Docker Swarm Unlock Key Scannerdocker, docker swarm, unlock key
Github Access Token Scannergithub, access, token
Github Refresh Token Scannergithub, refresh token
JIRA API Token Scannerjira, api token
LinkedIn Secret Scannerlinkedin, secret
Shopify Access Token Scannershopify, access, token
Shopify Shared Secret Scannershopify, shared secret
Slack Webhook Secret Scannerslack, webhook, secret

Credit cards and banking

Library ruleDefault Keywords
Twitter Secret Scannertwitter, secret
Visa Card Scanner (4x4 digits)account number, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, electron, pan, payment account number, payment card number, pcn, union pay, visa
Visa Card Scanner (2x8 digits)account number, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, electron, pan, payment account number, payment card number, pcn, union pay, visa
Visa Card Scanner (1x16 & 1x19 digits)account number, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, electron, pan, payment account number, payment card number, pcn, union pay, visa
MasterCard Scanner (4x4 digits)account number, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, mastercard, mc, pan, payment account number, payment card number, pcn, union pay
MasterCard Scanner (2x8 digits)account number, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, mastercard, mc, pan, payment account number, payment card number, pcn, union pay
MasterCard Scanner (1x16 digits)account number, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, mastercard, mc, pan, payment account number, payment card number, pcn, union pay
Discover Card Scanner (4x4 digits)account number, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, discover, pan, payment account number, payment card number, pcn
Discover Card Scanner (2x8 digits)account number, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, discover, pan, payment account number, payment card number, pcn
Discover Card Scanner (1x16 digits)account number, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, discover, pan, payment account number, payment card number, pcn
American Express Card Scanner (4+6+5 digits)account number, american express, amex, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, pan, payment account number, payment card number, pcn, union pay
American Express Card Scanner (4+4+4+3 digits)account number, american express, amex, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, pan, payment account number, payment card number, pcn, union pay
American Express Card Scanner (8+7 digits)account number, american express, amex, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, pan, payment account number, payment card number, pcn, union pay
American Express Card Scanner (1x15 digits)account number, american express, amex, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, pan, payment account number, payment card number, pcn, union pay
Diners Card Scanner (4+6+4 digits)account number, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, diners club, mastercard, mc, pan, payment account number, payment card number, pcn
Diners Card Scanner (4+4+4+2 digits)account number, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, diners club, mastercard, mc, pan, payment account number, payment card number, pcn
Diners Card Scanner (8+6 digits)account number, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, diners club, mastercard, mc, pan, payment account number, payment card number, pcn
Diners Card Scanner (1x14 digits)account number, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, diners club, mastercard, mc, pan, payment account number, payment card number, pcn
JCB Card Scanner (4x4 digits)account number, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, japanese card bureau, jcb, pan, payment account number, payment card number, pcn
JCB Card Scanner (2x8 digits)account number, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, japanese card bureau, jcb, pan, payment account number, payment card number, pcn
JCB Card Scanner (1x16 digits)account number, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, japanese card bureau, jcb, pan, payment account number, payment card number, pcn
Maestro Card Scanner (4x4 digits)account number, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, mastercard, mc, pan, payment account number, payment card number, pcn
Maestro Card Scanner (2x8 digits)account number, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, mastercard, mc, pan, payment account number, payment card number, pcn
Maestro Card Scanner (1x16 digits)account number, bank card, card, card num, card number, cc #, ccn, check card, credit, credit card#, dankort, debit, debit card, mastercard, mc, pan, payment account number, payment card number, pcn
Standard Iban Code Scannerbank account, bank acct, checking account, checking acct, deposit account, deposit acct, savings account, savings acct, chequing account, chequing acct, iban, account code, account number, accountno#, accountnumber#, bban, customer account id, customer account number, customer bank account id, sepa

Personal identifiable information (PII)

Library ruleDefault Keywords
Standard Email Address Scanner-
US Passport Scannerpassport, travel document
US Vehicle Identification Number Scannerfahrgestellnummer, niv, numarul de identificare, numarul seriei de sasiu, numer vin, número de identificação do veículo, número de identificación de automóviles, numéro d’identification du véhicule, vehicle identification number, vin, vin numeris
UK National Insurance Number Scannernational health service, nhs
Canadian Social Insurance Number Scannercanada healthcare number, msp number, personal healthcare number, phn, soins de santé

Network and device information

Library ruleDefault Keywords
IPv4 Address Scanner-
IPv6 Address Scanner-
Standard Mac Address Scanner-
HTTP Basic Authentication Header Scanner-
HTTP Cookie Scannercookie
HTTP(S) URL Scanner-

Further Reading

Additional helpful documentation, links, and articles: