Home / Companies / Cloudflare / Blog / Post Details
Content Deep Dive

How we train AI to uncover malicious JavaScript intent and make web surfing safer

Blog post from Cloudflare

Post Details
Company
Date Published
Author
Juan Miguel Cejuela, Zhiyuan Zheng
Word Count
2,841
Company Posts That Month
41
Language
English
Hacker News Points
-
Post removed?
No
Summary

Modern websites rely heavily on JavaScript, and leveraging third-party scripts accelerates web app development without requiring a full rebuild. However, supply chain attacks targeting third-party JavaScript have become a reality, making manual review of each script impractical due to the vast number of scripts and rapid updates. Cloudflare has developed an AI model that detects the exact malicious intent behind each script, providing deeper visibility into client-side threats and empowering organizations to better protect their users from evolving security risks. The new feature is integrated into Page Shield, a cloud-based security solution that scans JavaScript dependencies on web pages and flags suspicious content. The AI model uses syntax trees to classify malicious code, balances precision and recall with speed, and has been trained using a combination of labeled data and unsupervised learning techniques. To address the challenge of unbalanced data, Cloudflare employs strategies such as generating code embeddings and caching inference results to reduce false positives and improve efficiency. The solution is now available to all Page Shield customers with the add-on, providing an additional layer of security against evolving security threats.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Vector Search 4 1,879 278 111 +3%
LLM 2 4,855 541 180 +51%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.