
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
@google-cloud/resource
Advanced tools
Cloud Resource Manager Client Library for Node.js
Looking for more Google APIs than just Resource Manager? You might want to check out google-cloud
.
$ npm install --save @google-cloud/resource
var resource = require('@google-cloud/resource')({
projectId: 'grape-spaceship-123',
keyFilename: '/path/to/keyfile.json'
});
// Get all of the projects you maintain.
resource.getProjects(function(err, projects) {
if (!err) {
// `projects` contains all of your projects.
}
});
// Get the metadata from your project. (defaults to `grape-spaceship-123`)
var project = resource.project();
project.getMetadata(function(err, metadata) {
// `metadata` describes your project.
});
// Promises are also supported by omitting callbacks.
project.getMetadata().then(function(data) {
var metadata = data[0];
});
// It's also possible to integrate with third-party Promise libraries.
var resource = require('@google-cloud/resource')({
promise: require('bluebird')
});
It's incredibly easy to get authenticated and start using Google's APIs. You can set your credentials on a global basis as well as on a per-API basis. See each individual API section below to see how you can auth on a per-API-basis. This is useful if you want to use different accounts for different Cloud services.
If you are running this client on Google Cloud Platform, we handle authentication for you with no configuration. You just need to make sure that when you set up the GCE instance, you add the correct scopes for the APIs you want to access.
var resource = require('@google-cloud/resource')();
// ...you're good to go!
If you are not running this client on Google Cloud Platform, you need a Google Developers service account. To create a service account:
var projectId = process.env.GCLOUD_PROJECT; // E.g. 'grape-spaceship-123'
var resource = require('@google-cloud/resource')({
projectId: projectId,
// The path to your key file:
keyFilename: '/path/to/keyfile.json'
// Or the contents of the key file:
credentials: require('./path/to/keyfile.json')
});
// ...you're good to go!
FAQs
Cloud Resource Manager Client Library for Node.js
The npm package @google-cloud/resource receives a total of 1,073 weekly downloads. As such, @google-cloud/resource popularity was classified as popular.
We found that @google-cloud/resource 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
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.