Package File Scanning

File types that Socket scans for malicious behavior inside the packages it analyzes.

When Socket analyzes a package, it scans the files inside that package for malicious behavior. Besides source code, Socket scans the infrastructure configuration and build files listed on this page.

Socket scans these files only when they appear inside a package it already analyzes, such as an npm, PyPI, or Cargo package. They are file types, not ecosystems. For the ecosystems and package managers that Socket supports, see Ecosystem Support. The following are out of scope:

  • The Terraform Registry. Socket does not resolve Terraform modules or providers as dependencies.
  • Content that a scanned file references, such as remote modules, scripts, or URLs. Socket does not fetch it.
  • Terraform and CMake files in your own repositories. Your source code is not uploaded.

Socket checks each file for behaviors such as running commands, downloading content, and reading environment variables, and uses AI analysis on files that look risky. Findings appear on the package as AI-detected potential malware and the other supply chain risk alerts.

Build and Infrastructure Files

File typeFilesSupport LevelNotes
Terraform and HCL.tf, .tfvars, .hcl✅ Supported
CMakeCMakeLists.txt, .cmake✅ SupportedFor npm packages whose install scripts run cmake or cmake-js, Socket also analyzes CMake files as part of installation behavior. CMake coverage applies to package versions analyzed after November 17, 2026.

Did this page help you?