
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
Easy Rules is a .NET port of the Easy Rules Java-based rules engine, which was inspired by an article called "Should I use a Rules Engine?" by Martin Fowler in which he states:
You can build a simple rules engine yourself. All you need is to create a bunch of objects with conditions and actions, store them in a collection, and run through them to evaluate the conditions and execute the actions.
This is exactly what Easy Rules does, it provides the Rule abstraction to create rules with conditions and actions, and the RulesEngine API that runs through a set of rules to evaluate conditions and execute actions.
[Rule(Name = "weather rule", Description = "if it rains then take an umbrella")]
public sealed class WeatherRule
{
[Condition]
public bool ItRains([Fact("rain")] bool rain) => rain;
[Action]
public void TakeAnUmbrella() {
Console.WriteLine("It rains, take an umbrella!");
}
}
var weatherRule = new Rule(
name: "weather rule",
description: "if it rains then take an umbrella",
condition: f => f.True(rain),
action: _ => Console.WriteLine("It rains, take an umbrella!"));
// define facts
var facts = new Facts()
{
{ "rain", true }
};
// define rules
var weatherRule = ...
var rules = new Rules()
{
weatherRule
};
// fire rules on known facts
var rulesEngine = new DefaultRulesEngine();
rulesEngine.Fire(rules, facts);
This is the hello world of Easy Rules. You can find other examples on the original Easy Rules Wiki.
FAQs
The simple, stupid rules engine for .NET
We found that easyrules 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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.