
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
eval-free npm package.npm i kenolo -S
{
"NAME_OF_RULE_1": {
// mandatory - object of one or more conditions to check whether rule should apply:
"include":
// condition 1:
{ "name": "CONDITION_NAME", "property": "PROPERTY_PATH_TO_EXTRACT_DATA_FROM", "operator": "eq", "value": "VALUE_TO_COMPARE_WITH" },
// optional - object of one or more conditions to check whether rule should NOT apply:
"exclude": {
// array of conditions which should all be truthy for rule to apply:
"and": [
// condition 1:
{ "name": "CONDITION_NAME", "property": "PROPERTY_PATH_TO_EXTRACT_DATA_FROM", "operator": "gt", "value": "VALUE_TO_COMPARE_WITH" },
// condition 2:
{ "name": "CONDITION_NAME", "property": "PROPERTY_PATH_TO_EXTRACT_DATA_FROM", "operator": "neq", "value": "VALUE_TO_COMPARE_WITH" },
// more conditions:
//...
],
// array of conditions from which at least one of them should be truthy for rule to apply:
"or": [
// condition 1:
{ "name": "CONDITION_NAME", "property": "PROPERTY_PATH_TO_EXTRACT_DATA_FROM", "operator": "eq", "value": "VALUE_TO_COMPARE_WITH" },
// condition 2:
{ "name": "CONDITION_NAME", "property": "PROPERTY_PATH_TO_EXTRACT_DATA_FROM", "operator": "eq", "value": "VALUE_TO_COMPARE_WITH" },
// more conditions:
//...
]
}
},
"NAME_OF_RULE_2": {
"include": [
// ...
]
}
}
const kenolo = require('kenolo');
const data = {
order: {
status: 2,
user: {
email: 'danger@hotmail.com'
}
}
};
const SHOULD_REVIEW = {
include: {
and: [
{ name: 'STATUS_PENDING', property: 'order.status', operator: 'eq', value: 2 },
{
or: [
{ name: 'HIGH_RISK_USER_EMAILS', property: 'order.user.email', operator: 'in', value: ['danger@hotmail.com', 'omg@hacked.com'] },
{ name: 'MAX_PRICE_EXCEEDED', property: 'order.price', operator: 'gt', value: 500 }
]
}
]
}
};
kenolo(SHOULD_REVIEW, data);
// -> { apply: true, conditions: [ 'STATUS_PENDING', 'HIGH_RISK_USER_EMAILS' ] }
See tests directory for more examples
{
// {Boolean} apply - Should rule apply?
apply: true,
// {String[]} conditions - Truthy condition names
conditions: ['CONDITION_NAME_1', 'CONDITION_NAME_2']
}
ex - Property exists
{ "property": "a", "operator": "ex" }
nex - Property doesn't exists
{ "property": "a", "operator": "nex" }
eq - Equals to (a single value)
{ "property": "a", "operator": "eq", "value": "a" }
neq - Not equals to (a single value)
{ "property": "a", "operator": "neq", "value": "b" }
weq - Weak equals to (a single value)
{ "property": "2", "operator": "weq", "value": 2 }
nweq - Not weak equals to (a single value)
{ "property": "a", "operator": "nweq", "value": "b" }
in - In (an array of values)
{ "property": "a", "operator": "in", "value": ["a", "b", "c"] }
nin - Not in (an array of values)
{ "property": "d", "operator": "nin", "value": ["a", "b", "c"] }
gt - Greater than (a single value)
{ "property": 100, "operator": "gt", "value": 80 }
gte - Greater than or equals to (a single value)
{ "property": 100, "operator": "gte", "value": 100 }
lt - Lower than (a single value)
{ "property": 100, "operator": "lt", "value": 120 }
lte - Lower than or equals to (a single value)
{ "property": 100, "operator": "lte", "value": 100 }
sw - Starts with (an array of values)
{ "property": "+1 40 9871625", "operator": "sw", "value": ["+1", "+40"] }
nsw - Not starts with (an array of values)
{ "property": "+1 40 9871625", "operator": "nsw", "value": ["+1", "+40"] }
ew - Ends with (an array of values)
{ "property": "danger@hacker.com", "operator": "ew", "value": ["@hacker.com", "@hazard.com"] }
new - Not ends with (an array of values)
{ "property": "danger@hacker.com", "operator": "new", "value": ["@hacker.com", "@hazard.com"] }
inc - Includes (an array of values)
{ "property": "John", "operator": "inc", "value": ["oh", "bla"] }
ninc - Not includes (an array of values)
{ "property": "John", "operator": "ninc", "value": ["oh", "bla"] }
sl - Sounds like (an array of values)
{ "property": "John", "operator": "sl", "value": ["Jon", "David"] }
re - Regular expression (an array of values)
{ "property": "New York", "operator": "re", "value": [/New/i] }
{ "property": "New York", "operator": "re", "value": ["\\w+"] }
some - Some are included (an array of values){ "property": [1, 2, 3], "operator": "some", "value": [1, 5, 8] }every - All are included (an array of values){ "property": [1, 2, 3], "operator": "every", "value": [1, 2, 3, 4, 5] }none - None are included (an array of values){ "property": [1, 2, 3], "operator": "none", "value": [4, 5, 7, 8] }FAQs
A lightweight JSON-based business rules engine
We found that kenolo demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.