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.
File utils
var lsFs = require('ls-fs');
lsFs.readJson('settings.json').then(function(settings) {
console.log(settings.prop1);
console.log(settings.prop2);
});
lsFs.readJson(path, [opts]).then(function(parsedJsonObj) {
console.log(parsedJsonObj);
});
path
(String) The path to the JSON file to readlsFs.writeJson(path, obj, [opts]).then(function(pathToJson) {
});
path
(String) The path to the JSON file to writeobj
(*) The thing to JSON.stringifylsFs.readIni(path, [opts]).then(function(parsedIniObj) {
console.log(parsedIniObj);
});
path
(String) The path to the INI file to read[opts]
(Object) Identical to q-io/fs.read
optionslsFs.writeIni(path, obj, [opts]).then(function(pathToIni) {
console.log('wrote ' + pathToIni);
});
path
(String) The path to the INI file to writeobj
(*) The thing to stringify into INI formatopts
(Object) Merge of options for ini
and q-io/fs.write
lsFs.tmpDir([opts]).then(function(pathToTmpDir) {
// do stuff with my temporary directory
});
[opts]
(Object) Same as https://github.com/raszi/node-tmp#directory-creationTakes a path to a directory and returns an object containing all the require
d modules in that directory.
For example, if you have a directory with:
some-module.js
other-module.js
static-content.json
requireDir
on that directory would return an object like:
{
someModule: <module.exports of some-module.js>,
...
}
lsFs.requireDir(pathToDir).then(function(requiredDirObj) {
// use required modules
});
pathToDir
(String) Path to the directory you would like to recursively requireFAQs
Some file utilities
The npm package ls-fs receives a total of 0 weekly downloads. As such, ls-fs popularity was classified as not popular.
We found that ls-fs 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.