
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@gitterhq/env
Advanced tools
Deploying your node app? Use this to:
Firstly you need to create a singleton instance inside your application. Call the module something like env. It will need to reference the location of the configuration files, like this:
var gitterEnv = require('gitter-env');
var path = require('path');
/* Create a singleton environment */
module.exports = gitterEnv.create(path.join(__dirname, '..', '..', 'config'));
Once you've got your env
instance, here are some things you can do with it
env.logger
looks a lot like winston. Use it for logging:
logger.verbose(message, meta)
logger.info(message, meta)
logger.warn(message, meta)
logger.error(message, meta)
env.conf
looks a lot like nconf. Use it for configuration:
conf.get('some:variable')
env.errorReporter
will send your errors to sentry. Use it for logging serious problems:
errorReporter(err, { some: 'meta', information: 1 })
env.redis
will provide you with a singleton instance of a redis client or a new instance. It will use Redis Sentinel it it's configured.
Example configuration:
{
"redisDb": 1,
"sentinel": {
"master-name": "test-master",
"hosts": ["localhost:46379"]
},
clientOpts: {
"return_buffers": true
}
}
env.redis.getClient()
- returns the main singleton Redis client.env.redis.createClient([options])
- returns a new Redis client. Uses redis
config by default.env.redis.quitClient()
- closes a Redis client (don't do this with the main singleton client)env.stats
will send statistics to Datadog, Cube, and other places.
env.stats.event('name')
- increment a counterenv.stats.eventHF('name', [count], [frequency])
- increment a high frequency counterenv.stats.gaugeHF('name', [value], [frequency])
- update a high frequency gaugeenv.stats.responseTime('name', duration)
- track a response timeenv.installUncaughtExceptionHandler
- will install a graceful shutdown handler on uncaught exceptionsenv.domainWrap(function() { /* server */ });
- will do the same inside the functionenv.middlewares.errorHandler
- a basic error handling middlewareenv.middlewares.accessLogger
- access logging with response time statsFAQs
Gitter Base Environment Module
The npm package @gitterhq/env receives a total of 2 weekly downloads. As such, @gitterhq/env popularity was classified as not popular.
We found that @gitterhq/env demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.