Netskope named a Leader in the 2022 Gartner® Magic Quadrant™ for Security Service Edge. Get the Report.

  • Products

    Netskope products are built on the Netskope Security Cloud.

  • Platform

    Unrivaled visibility and real-time data and threat protection on the world's largest security private cloud.

Netskope Named a Leader in the 2022 Gartner Magic Quadrant™ for SSE Report

Get the report Go to Products Overview
Netskope gartner mq 2022 sse leader

Netskope delivers a modern cloud security stack, with unified capabilities for data and threat protection, plus secure private access.

Explore our platform
Birds eye view metropolitan city

Make the move to market-leading cloud security services with minimal latency and high reliability.

Learn more
Lighted highway through mountainside switchbacks

Prevent threats that often evade other security solutions using a single-pass SSE framework.

Learn more
Lighting storm over metropolitan area

Zero trust solutions for SSE and SASE deployments

Learn more
Boat driving through open sea

Netskope enables a safe, cloud-smart, and fast journey to adopt cloud services, apps, and public cloud infrastructure.

Learn more
Wind turbines along cliffside
  • Customer Success

    Secure your digital transformation journey and make the most of your cloud, web, and private applications.

  • Customer Support

    Proactive support and engagement to optimize your Netskope environment and accelerate your success.

  • Training and Certification

    Netskope training will help you become a cloud security expert.

Trust Netskope to help you address evolving threats, new risks, technology shifts, organizational and network changes, and new regulatory requirements.

Learn more
Woman smiling with glasses looking out window

We have qualified engineers worldwide, with diverse backgrounds in cloud security, networking, virtualization, content delivery, and software development, ready to give you timely, high-quality technical assistance.

Learn more
Bearded man wearing headset working on computer

Secure your digital transformation journey and make the most of your cloud, web, and private applications with Netskope training.

Learn more
Group of young professionals working
  • Resources

    Learn more about how Netskope can help you secure your journey to the cloud.

  • Blog

    Learn how Netskope enables security and networking transformation through security service edge (SSE).

  • Events & Workshops

    Stay ahead of the latest security trends and connect with your peers.

  • Security Defined

    Everything you need to know in our cybersecurity encyclopedia.

Security Visionaries Podcast

Bonus Episode: The Importance of Security Service Edge (SSE)

Play the podcast
Black man sitting in conference meeting

Read the latest on how Netskope can enable the Zero Trust and SASE journey through security service edge (SSE) capabilities.

Read the blog
Sunrise and cloudy sky

SASE Week

Netskope is positioned to help you begin your journey and discover where Security, Networking, and Zero Trust fit in the SASE world.

Learn more
SASE Week

What is Security Service Edge?

Explore the security side of SASE, the future of network and protection in the cloud.

Learn more
Four-way roundabout
  • Company

    We help you stay ahead of cloud, data, and network security challenges.

  • Why Netskope

    Cloud transformation and work from anywhere have changed how security needs to work.

  • Leadership

    Our leadership team is fiercely committed to doing everything it takes to make our customers successful.

  • Partners

    We partner with security leaders to help you secure your journey to the cloud.

Netskope enables the future of work.

Find out more
Curvy road through wooded area

Netskope is redefining cloud, data, and network security to help organizations apply Zero Trust principles to protect data.

Learn more
Switchback road atop a cliffside

Thinkers, builders, dreamers, innovators. Together, we deliver cutting-edge cloud security solutions to help our customers protect their data and people.

Meet our team
Group of hikers scaling a snowy mountain

Netskope’s partner-centric go-to-market strategy enables our partners to maximize their growth and profitability while transforming enterprise security.

Learn more
Group of diverse young professionals smiling
Blog Platform, Products, & Services The Importance of a Machine Learning-Based Source Code Classifier
Aug 08 2022

The Importance of a Machine Learning-Based Source Code Classifier

Co-authored by Yihua Liao and Yi Zhang

This is the fifth in a series of articles focused on AI/ML.  

Source code is a critical part of an organization’s intellectual property and digital assets. As more and more centralized source code repositories are moving to the cloud, it is imperative for organizations to use the right security tools to safeguard their source code.

In December 2020, a software engineer started working at Tesla and immediately began uploading the company’s source code files to his personal Dropbox account. Tesla didn’t confront him about his alleged theft until January 6, 2021. In March 2022, Microsoft confirmed that the Lapsus$ hacking group had compromised an employee account and stolen the company’s source code from Bing, Bing Maps and Cortana. These are just some of the latest examples of sensitive data leaking in the form of source code. 

Challenges of source code detection

It is not an easy task to determine programmatically whether a text document is source code or not. First of all, there are many different programming languages, and there is no specific pattern to describe what the source code should look like. As a result, it is impossible to come up with some regular expressions to match source code files with acceptable accuracy. 

Furthermore, programming languages are different from natural languages. Therefore, many popular pre-trained NLP (Natural Language Processing) models, such as GPT, BERT, and XLNet, which have shown great results in other document classification problems, are not effective in identifying source code. For example, some terms, punctuations, and symbols, such as “str”,  “def”, “==”, “>=”, and “:”, are not included in the vocabularies of most pre-trained models. However, they are widely used and carry significant meanings in source code. On the other hand, some words, such as “return” and “switch”, are used in both natural English and programming languages, yet with very different semantic meanings. 

The Netskope source code classifier

To address these challenges, we have developed a machine learning (ML) based source code classifier to detect source code files, as part of Netskope’s Advanced DLP (data loss prevention) solution. The source code classifier takes advantage of a proprietary code vocabulary, which consists of 80,000 common phrases in source code. The code vocabulary was extracted from a large corpus of source code sample files, covering more than 20 of the most popular programming languages. 

We have generated machine learning features based on the code vocabulary and trained a decision tree-like source code classifier. Compared to the model that is refined from a pre-trained language model, the source code classifier achieves 92% reduction in false positives while keeping the source code detection rate at 99%.   

The source code classifier scans our customers’ network traffic and looks for source code files inline. Its runtime in production is just a few milliseconds. This allows customers to enforce their source code policy and prevent data exfiltration in real time. 

More about Netskope DLP

Netskope’s award-winning DLP solution helps an organization protect the sensitive data it owns or its employees process. Netskope understands the context of cloud and web access, including the user, device, app, instance, activity, and content involved, to accurately identify violations and data risks. From there, it can then allow, challenge, block, quarantine, encrypt, or apply a legal hold, as well as integrate with on-premises solutions to prevent data loss and exposure. Netskope performs accurate inspection through 3,000+ out-of-the-box data identifiers, 25 predefined legal and regulatory compliance templates, and various matching techniques (proximity expression, custom regex and dictionaries, file fingerprinting, exact data matching, and so on).

Netskope Advanced DLP includes machine learning based file classification that provides a fast and effective way to identify sensitive documents, enabling users to work inline with granular real-time DLP policy controls. ML classifiers are able to accurately classify documents into different categories, including source code, tax forms, patent documents, and other sensitive legal and financial documents, without the need to identify specific pieces of sensitive information contained in those files. 

For more information, please check out our white paper Protecting Data Using Machine Learning.

author image
About the author
Dr. Yihua Liao is the Director of Data Science at Netskope. His team Develops cutting-edge AI/ML technology to tackle many challenging problems in cloud security, including data loss prevention, malware and threat protection, and user/entity behavior analytics. Previously, he led data science teams at Uber and Facebook.
Dr. Yihua Liao is the Director of Data Science at Netskope. His team Develops cutting-edge AI/ML technology to tackle many challenging problems in cloud security, including data loss prevention, malware and threat protection, and user/entity behavior analytics. Previously, he led data science teams at Uber and Facebook.