
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
ganomede-helpers
Advanced tools
Install with npm install --save ganomede-helpers
var helpers = require("ganomede-helpers");
Simplifies the integration of restify servers with authdb. Will check req.params.authToken
agains passed in authdb client and fill out req.params.user
with result. Replies with HTTP 400 in case of missing token; or 401 in case of error or missing account.
Options:
authdbClient
[required]: a authdb client as created using the authdb librarysecret
: allows "spoofing" req.params.user
in case authToken
matches ${secret}.${username}
pattern. Will skip validating token and run following instead: req.params.user = {
_secret: true
username: spoofUsername // second part of token
}
log
: a bunyan style logger objectReturns a restify middleware function. This function requires authToken
as a request parameter and fills the virtual user
query parameter with the full user account details.
authMW = helpers.restify.middlewares.create({
authdbClient: myClient
});
app.get "/auth/:authToken/games", authMW, getGames
Conveniant access to service links environment variables, compatible with docker links.
Returns true if both the _PORT
and _ADDR
environemnt variables are set.
Returns the _ADDR
environemnt variable, or 127.0.0.1
Returns the _PORT
environemnt variable (casted to int), or the port
parameter.
generates and http://
URL using host
and port
.
var couch = myLib.connect(helpers.links.ServiceEnv.url('COUCH_GAMES', 5984))
Helper class allowing easier sending of notifications from ganomede services.
// Create notificaiton.
var notification = new helpers.Notification(
// Fill in required fields:
from: 'ganomede-service',
to: 'username',
type: 'sample-notification',
// Fill in optional fields as neccessary:
data: {sample: 'data'},
secret: 'api-secret' // defaults to process.env.API_SECRET
);
// send() function bound to NOTIFICATION service address
// (set as ENV variable retrieved by ServiceEnv class).
var sendNotification = helpers.Notification.sendFn();
// Send notification.
sendNotification(notification, function (err, response) {
// When notification is sent, it will have `id` and `timestamp`
// set by notification service. For more details, see:
// https://github.com/j3k0/ganomede-notifications#send-a-message-post.
});
FAQs
Helper modules shared by ganomede microservices
The npm package ganomede-helpers receives a total of 10 weekly downloads. As such, ganomede-helpers popularity was classified as not popular.
We found that ganomede-helpers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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 researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.