Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
undeclared-identifiers
Advanced tools
find undeclared identifiers and property accesses in a javascript file.
find undeclared identifiers and property accesses in a javascript file.
npm install undeclared-identifiers
var undeclaredIdentifiers = require('undeclared-identifiers')
undeclaredIdentifiers(src)
// { identifiers: ['Buffer'],
// properties: ['Buffer.isBuffer'] }
res = undeclaredIdentifiers(source, opts)
Find undeclared identifiers and properties that are used in the source
. source
can be an AST or a source string that will be parsed using acorn-node.
res
is an object with properties:
res.identifiers
- an array of variable names as strings.res.properties
- an array of property names as .-separated strings, such as 'xyz.abc'
. These are the property accesses on the undeclared variables found in res.identifiers
.Set opts.properties
to false to only return identifiers.
When opts.wildcard
is true, unknown uses of undeclared identifiers will be added to res.properties
as 'VarName.*'
.
undeclaredIdentifiers('Buffer(), Buffer.from()', { wildcard: true })
// { identifiers: ['Buffer'],
// properties: ['Buffer.*', 'Buffer.from'] }
1.1.3
FAQs
find undeclared identifiers and property accesses in a javascript file.
We found that undeclared-identifiers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.