
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.
Trailpack Interface. Trailpacks extend the functionality of the Trails framework.
Trailpack Interface. Trailpacks extend the functionality of the Trails framework. (Application functionality should be extended using Microservices).
This module is a class which should be extended by all trailpacks.
See archetype/index.js
for more details.
const Trailpack = require('trailpack')
class ExampleTrailpack extends Trailpack {
constructor (app) {
super(app, {
config: require('./config'),
api: require('./api'),
pkg: require('./package')
})
}
validate () {
if (!this.app.config.example) throw new Error('config.example not set!')
}
configure () {
this.app.config.example.happy = true
}
initialize () {
setInterval(() => this.log.debug('happy?', this.app.config.example.happy), 1000)
}
}
See archetype/config/trailpack.js
for more details.
// config/trailpack.js
module.exports = {
provides: {
// ...
},
lifecycle: {
// ...
}
}
app.start
app.ready
constructor(app, definition)
Instantiate the Trailpack. definition
is an object which contains three
optional properties: config
, api
, pkg
. Trailpack configuration is merged
into the application configuration.
validate()
Validate the preconditions for proper functioning of this trailpack. For
example, if this trailpack requires that a database is configured in
config/database.js
, this method should validate this. This method should incur
no side-effects. Do not alter any extant configuration.
configure()
Extend the configuration (config/
, or app.config
) of the application, or
add new configuration objects. This method is run before the application
has loaded. You can alter application configuration here.
initialize()
If you need to bind any event listeners, start servers, connect to databases, all of that should be done in initialize. Here, all of the configuration is loaded and finalized.
We love contributions! Please see our Contribution Guide for more information.
FAQs
Trailpacks extend the functionality of the Trails framework.
The npm package trailpack receives a total of 161 weekly downloads. As such, trailpack popularity was classified as not popular.
We found that trailpack 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.