Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
drive-config
Advanced tools
A npm module for maintaining user config files (in json) on Google Drive.
We can take advantage of Google Drive's appdata folder to store a users config data for our application. The user cannot see these files, but can delete config data and revoke our app's access on their Drive by clicking the gear icon in the top right -> Settings -> Manage Apps -> Options Dropdown.
This module is currently written with ES6 for Node 6+
var googleAuth = require('google-auth-library');
let driveConfig = require('drive-config');
// get your user's oauth2Client
// more info about setting this up at https://github.com/google/google-api-nodejs-client
let auth = new googleAuth();
let oauth2Client = new auth.OAuth2(clientId, clientSecret, redirectUrl);
oauth2Client.credentials = user.creds;
let service = new driveConfig(oauth2Client);
Gets all files in a user's google drive for your application
let service = new driveConfig(oauth2Client);
service.list().then(files => {
// do something with files
}).catch(err => {
// handle errors
});
// Resolves as an array of files
[
{
id: String,
name: String,
data: Object,
createdTime: Datetime,
modifiedTime: Datetime,
},
...
]
Makes a new files in the user's google drive
let service = new driveConfig(oauth2Client);
service.create(fileName, data).then(file => {
// do something with the file
}).catch(err => {
// handle errors
});
// Resolves as a file
{
id: String,
name: String,
data: Object,
createdTime: Datetime,
modifiedTime: Datetime,
}
FAQs
A wrapper for mantaining json config files on Google Drive
We found that drive-config 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.