Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@hypnosphi/chrome-store-api
Advanced tools
Chrome webstore Api for Node.js
npm install chrome-store-api
var WebstoreApi = require('chrome-store-api').Webstore;
var TokenManager = require('chrome-store-api').TokenManager;
var code = 'app-code';
var clientId = 'your-client-id';
var clientSecret = 'your-client-secret';
var tokenManager = new TokenManager(code, clientId, clientSecret);
var api = new WebstoreApi(tokenManager);
You can use storage for save token data between sessions.
var WebstoreApi = require('chrome-store-api').Webstore;
var TokenManager = require('chrome-store-api').TokenManager;
var FileStorage = require('chrome-store-api').FileStorage;
var code = 'app-code';
var clientId = 'your-client-id';
var clientSecret = 'your-client-secret';
var storage = new FileStorage('data.json');
// you can use every storage module, which implements IStorage interface
var tokenManager = new TokenManager(code, clientId, clientSecret, storage);
var api = new WebstoreApi(tokenManager);
api.get('extensiond-id')
.then(function (data) {
console.log(data);
})
.catch(function (err) {
console.log(err);
});
var fs = require('q-io/fs');
fs.read('path/to/extension.zip', 'b')
.then(function (blob) {
return api.insert(blob);
})
.then(function (data) {
console.log(data); // new item info
})
.catch(function (err) {
console.log(err);
});
var fs = require('q-io/fs');
fs.read('path/to/extension.zip', 'b')
.then(function (blob) {
return api.update('extension-id', blob);
})
.then(function (data) {
console.log(data); // item info
})
.catch(function (err) {
console.log(err);
});
api.publish('extension-id')
.then(function (data) {
console.log(data);
})
.catch(function (err) {
console.log(err);
});
api.publish('extension-id', 'trusted')
.then(function (data) {
console.log(data);
})
.catch(function (err) {
console.log(err);
});
FAQs
Chrome webstore API
The npm package @hypnosphi/chrome-store-api receives a total of 2 weekly downloads. As such, @hypnosphi/chrome-store-api popularity was classified as not popular.
We found that @hypnosphi/chrome-store-api 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.