Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
bluemix-service-discovery
Advanced tools
Readme
bluemix service discovery client for node
npm install bluemix-service-discovery
In Bluemix, bind Service Discovery to your application and configure the client:
var ServiceDiscovery = require('bluemix-service-discovery');
var discovery = new ServiceDiscovery({
name: 'ServiceDiscovery',
auth_token: '<AUTH TOKEN>',
url: '<SERVICE DISCOVERY URL>',
version: 1
});
// list services that are still alive
discovery.getServices(function(error, response, services) {
// handle services
});
// register a service and send heartbeats
discovery.register({
"service_name": "users_api",
"ttl": 0,
"endpoint": {
"host": "https://api.users.coolapp.com",
"port": 443
},
"metadata": {}
}, function(error, response, service) {
if (!error) {
var intervalId = setInterval(function() {
discovery.renew(service.id, function(error, response, service) {
if (error || response.statusCode !== 200) {
console.log('Could not send heartbeat');
clearInterval(intervalId);
}
});
}, 1000);
}
});
More examples can be found in the /examples
folder
opts - json
The method calls use a callback with the signature function(error, response, error)
.
Register a new service instance
Instance:
{
"service_name": <string>,
"ttl": <number>,
"endpoint": {
"type": <string>,
"value": <string>
},
"status": <string>,
"metadata": <json>
}
Returns:
{
"id": <string>,
"ttl": 0,
"links": {
"self": <string>,
"heartbeat": <string>
}
}
Removes the registration for an existing service instance
Sends a heartbeat for an existing service instance registration. Failing to renew the registration will result in the instance being removed from the registry.
Returns a list of all instances
Returns a list of all registered services
Returns a list of all registered service instances of serviceName
.
FAQs
Bluemix Service Discovery Client
We found that bluemix-service-discovery 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
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.