Registry / devops / snyk-cpp-plugin

snyk-cpp-plugin

JSON →
library2.24.3jsnpmunverified

A library used by the Snyk CLI to scan C/C++ projects for known vulnerabilities and open-source license issues. It supports scanning of dependencies in C/C++ projects, including those managed by common build systems. Current stable version is 2.24.3 (February 2026). Regular releases occur monthly with bug fixes and dependency updates. Key differentiators: integrates directly with Snyk CLI, handles large directories, supports purl, and separates vulnerability and license issues.

npm install snyk-cpp-plugin
INSTALL
IMPORT
SIG · SNYK-CPP-PLUGIN
S
snyk-cpp-plugin
devopsjavascriptv2.24.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CppPlugin
import { CppPlugin } from 'snyk-cpp-plugin'
const { CppPlugin } = require('snyk-cpp-plugin')
Package is ESM-only since v2. Use named import.
scan
import { scan } from 'snyk-cpp-plugin'
import scan from 'snyk-cpp-plugin'
scan is a named export, not default.
display
import { display } from 'snyk-cpp-plugin'
Available from v2.22.0 onwards.

Scans a C/C++ project directory for vulnerabilities and licenses using the Snyk C/C++ plugin.

import { CppPlugin, scan } from 'snyk-cpp-plugin'; const plugin = new CppPlugin(); const results = await scan({ path: '/path/to/project', options: { dev: false } }); console.log(JSON.stringify(results, null, 2));
Debug
Known issues
gotchaThe package requires Node.js >=10. Older versions may cause runtime errors.
fix
Ensure Node.js version is 10 or higher.
affects: >=2.0.0
gotchaLarge directories may cause 'max call stack exceeded' error in versions before 2.24.1.
fix
Upgrade to version 2.24.1 or later.
affects: <2.24.1
breakingIn v2.22.0, issues were separated into vulnerabilities and licenses. The output format changed.
fix
Update code to handle separate lists: results.vulnerabilities and results.licenses.
affects: >=2.22.0
gotchaDirect dependency on minimatch added in v2.24.3. If using older versions, minimatch may need to be installed separately.
fix
Install minimatch as a direct dependency or upgrade to v2.24.3.
affects: <2.24.3
Errors
Common errors & fixes
Error: Cannot find module 'snyk-cpp-plugin'
Package not installed or incorrect import path.
fix
Run `npm install snyk-cpp-plugin` and verify import path.
TypeError: scan is not a function
Importing scan as default instead of named export.
fix
Use `import { scan } from 'snyk-cpp-plugin'`.
RangeError: Maximum call stack size exceeded
Scanning a very large directory with versions <2.24.1.
fix
Upgrade to version 2.24.1 or later.
Upgrade
Version history
2.24.3latest on npm
Audit
Dependencies
minimatchrequiredused for file pattern matching
Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources
snyk-cpp-plugin — npm install snyk-cpp-plugin · libregistry