
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
cf-nodejs-client
Advanced tools
This project provides a simple client library to interact with some components used on the Cloud Foundry Architecture:
The features implemented are:
Authentication layer:
Logging & Metrics layer:
Using this library, you could interact with PWS , Bluemix or a Local Cloud Foundry instance using Node.js.
Node.js with Express are a great combination to develop Web applications. If you observe the Sinatra market, you will notice that Node.js has a huge Traction.
The development doesn't cover the whole CC API. Main areas of development are:
App life cycle:
PaaS Management:
If you need to interact with a Cloud Foundry platform, install the package in your Node.js development:
npm install cf-nodejs-client --save
Once you have installed the package define in a isolated config file the credentials to operate with the platform:
config.json
Interacting with Pivotal or Bluemix:
{
"endpoint" : "https://api.run.pivotal.io", || "endpoint" : "https://api.eu-gb.bluemix.net",
"username" : "xxx",
"password" : "yyy"
}
With the credentials defined, create a new file to paste this code to authenticate with the platform.
example.js
"use strict";
var config = require('./config.json');//Load CF configuration
var CloudFoundry = require("cf-nodejs-client").CloudFoundry;
CloudFoundry = new CloudFoundry();
CloudFoundry.setEndPoint(config.endpoint);
CloudFoundry.getInfo().then(function (result) {
return CloudFoundry.login(result.token_endpoint,config.username,config.password);
}).then(function (result) {
console.log(result);
}).catch(function (reason) {
console.error("Error: " + reason);
});
Save the file and test:
node example.js
This project has a test suite to ensure the reability of this project. Take a look the Tests cases developed with Mocha & Chai to understand some stuff about Cloud Foundry and the usage of this client. Besides, the project has invested some amount of time in testing phase to be the code with a nice coverage level.
The development has been tested with:
Local Instance | PWS | Bluemix |
---|---|---|
2.25.0 | 2.41.0 | 2.27.0 |
Note: Last test: 2015/10/29
Test suite:
npm test
Code coverage:
istanbul cover node_modules/mocha/bin/_mocha -- -R spec
Continous integration:
https://travis-ci.org/jabrena/cf-nodejs-client/
Take a look this doc to check the evolution of this Client for Cloud foundry.
If you have any question or doubt, please create an issue.
Juan Antonio
Version 0.9.1 2015-10-29
Environment: LOCAL_INSTANCE_1
65 passing (2m) 23 pending
Environment: PIVOTAL
58 passing (3m) 19 pending
Environment: BLUEMIX
58 passing (3m) 19 pending
FAQs
A Cloud Foundry Client for Node.js
The npm package cf-nodejs-client receives a total of 38 weekly downloads. As such, cf-nodejs-client popularity was classified as not popular.
We found that cf-nodejs-client 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.