Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Execute functions in a configurable order, modifying a shared data structure.
Task functions are executed in order of addition, and passed a shared context, a modifiable data structure, and task meta data. Execution is synchronous or asynchronous. You can control execution by returning commands from a task function.
You can add tasks before and after existing named tasks.
This module is used by the Seneca framework to provide configurable extension hooks to various internal processes.
NOTE: OUT-OF-DATE
SEE TESTS FOR API CHANGES
TODO: UPDATE README
const Ordu = require('ordu')
let process = new Ordu()
process.add(function first(spec) {
if (null == spec.data.foo) {
return {op: 'stop', err: new Error('no foo')}
}
spec.data.foo = spec.data.foo.toUpperCase() + spec.ctx.suffix
// Default is to continue to next step.
})
const ctx = { suffix: '!!!' }
let data = { foo: 'green' }
process.execSync(ctx, data)
console.log(data.foo) // prints 'GREEN!!!' (first)
process.add(function second(spec) {
spec.data.foo = spec.ctx.prefix + spec.data.foo
})
ctx.prefix = '>>>'
data = { foo: 'blue' }
process.execSync(ctx, data)
console.log(data.foo) // prints '>>>BLUE!!!' (first, second)
npm install ordu
From the Irish ordú: instruction. Pronounced or-doo.
Copyright (c) 2014-2021, Richard Rodger and other contributors. Licensed under MIT.
FAQs
Execute functions in a configurable order, modifying a shared data structure.
The npm package ordu receives a total of 7,764 weekly downloads. As such, ordu popularity was classified as popular.
We found that ordu 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.