You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
waf-detect: read vendor cookie names, attribute a bot vendor over its CDN, and stop calling CloudFront AWS WAF #750
@squirrelscan/waf-detect misses or misnames bot-protection vendors in three common cases:
Cookies are not read. Vendors set cookies whose NAMES identify them:
Cloudflare: __cf_bm, cf_clearance
DataDome: datadome
HUMAN/PerimeterX: _px3, _pxvid, ...
Kasada: KP_UIDz
Akamai Bot Manager: _abck, ak_bmsc, bm_sz
Imperva: incap_ses_*, visid_incap_*, reese84
AWS WAF: aws-waf-token
A block page often carries the cookie and no vendor header.
Stacked vendors are misattributed. Detection takes the first match in a fixed order and returns early on any high-confidence header, so a DataDome block served through Cloudflare (cf-ray plus DataDome's header, cookie or markup) is reported as Cloudflare.
AWS infrastructure is reported as AWS WAF.x-amz-cf-id (CloudFront), x-amzn-requestid and x-amz-apigw-id (API Gateway, Lambda) appear on AWS-hosted sites that have no WAF. AWS WAF's own signals are the x-amzn-waf-action header, the aws-waf-token cookie and its *.token.awswaf.com challenge script.
The CLI's bot-protection warning and the WAF technology entry both read this package, so they inherit all three gaps.
Acceptance Criteria
A response that sets only a vendor cookie (no vendor header) is detected as that vendor, for each vendor listed above. Each has a fixture test.
Cookie values never appear in the detection result: names only.
A Cloudflare-fronted response with DataDome's header, cookie or block-page markup is attributed to DataDome.
The result still lists Cloudflare among the providers, so callers asking "did this come through Cloudflare?" keep answering yes.
CloudFront, API Gateway and Lambda headers alone are not AWS WAF; x-amzn-waf-action or the AWS WAF challenge script is.
A response with no known signature is not detected, never guessed.
Activity
fix(waf-detect): read vendor cookie names, name a bot vendor over its…
fix(waf-detect): vendor cookies attribute a response but never prove …
fix(waf-detect): read vendor cookie names, name a bot vendor over its…
fix(waf-detect): a signature counts where it acts, not where a page q…