Rules as Data: Why LEA Platform Stores Compliance Rules as JSON
Published · Updated
How structured, machine-readable rules make compliance policy something you can read, review and move between tools.
A familiar problem: your compliance rules sit in a vendor's proprietary format, and you need to put them in your CI/CD pipeline. Or audit them. Or version-control them. Or hand them to an AI tool for a first draft. You can't, because only one tool can read them.
This is why LEA Platform stores every rule as JSON. Not because JSON is fashionable, but because it is what most modern tooling already reads and writes. Automation tools speak JSON. APIs expect JSON. Language models handle it well. When compliance rules are JSON, they can travel.
Rules as Data, Not Magic
Many compliance tools treat rules as opaque objects. You configure them in a UI, click save, and the rule is stored in a form only that tool understands. Want to see exactly what it checks? Hard. Want to change it programmatically? Only if the API happens to cover it.
LEA works the other way round. Every rule is a JSON document you can read, edit, version-control and diff like any other code. What does the rule run on Linux and on Windows? It is in the JSON. What counts as a pass? Same document. What is the optional fix? Same document again.
What a rule actually looks like
Here is a rule from LEA's shipped library, lightly trimmed. It checks that a Linux host is not forwarding IP traffic:
{
"name": "Linux IP Forwarding Disabled",
"category": "network_security",
"cycle": 3600,
"cmd": {
"validation": [
{
"command": "cat /proc/sys/net/ipv4/ip_forward",
"system": ["Linux"],
"distribution": []
}
],
"expect": [
{
"system": ["Linux"],
"distribution": [],
"re": { "stdout": "^0$" }
}
],
"remedy": [
{
"command": "sysctl -w net.ipv4.ip_forward=0",
"system": ["Linux"],
"distribution": []
}
]
},
"parameters": [],
"tags": [
"std:CIS",
"std:NIST_800-53:SC-7",
"std:ISO27001:A.13.1.1",
"cat:network_security",
"risk:medium",
"priv:required"
]
}
A few things to notice:
validationholds one entry per operating system or distribution. The command is read-only and returns raw output. There is nogreporawkon the host.expectsays what a passing result looks like (re,not_re, return code). It stays on the server. The agent sends back raw stdout, stderr and the return code, and the server decides pass or fail. A host can't grade its own homework.remedyis optional. If the check fails and a remedy exists, the server sends it, the agent runs it, then re-runs the validation and reports both.cyclesets how often the check runs, in seconds.tagsmap the rule to frameworks (CIS Controls, NIST SP 800-53, ISO 27001 and others), set severity, and note when the rule needs elevated privilege.
The same rule can carry separate validation and expect blocks for Linux, macOS and Windows. A Linux check might read /etc/ssh/sshd_config; the Windows block might run net user Guest. Different commands, one conceptual control.
That is the whole format. You can commit it to Git, review it in a pull request, and give security policy the same discipline as application code.
Why Integration Matters
Teams often spend weeks building glue between security tools: one exports XML, another only CSV, a third has its own data model. It's tiring and brittle.
When rules are JSON, much of that glue goes away. Your CI/CD system already parses JSON. Your configuration management tools read it. Your ticketing system probably accepts JSON webhooks.
Practical scenarios
- Rules in version control. Keep your rule set in a Git repository alongside your infrastructure code. Changes go through review before they reach production hosts.
- Scripted provisioning. Rules can be created and updated through LEA's REST API. LEA's own provisioning scripts work this way: authenticate, create a group, upsert the rules.
- Bulk edits. Need to change the check cycle for every audit rule, or add a framework tag to fifty rules? It's a script over JSON, not fifty trips through a UI.
- Notifications out. LEA sends results by email, Slack, Microsoft Teams and webhooks (ServiceNow, Jira, Splunk and more), so findings land where your team already works.
LEA stops being "that compliance tool" and becomes one more part of your normal workflow.
Language Models Handle JSON Well
Leaving the hype aside, language models are good with structured data. Give one a well-formed JSON document and ask it to explain, modify or draft a similar one, and it usually does a reasonable job. Give it an opaque binary format, and it can't.
What a model can help with today
- Drafting a rule from a sentence. Describe what you want ("SSH must not allow password authentication") and a model can draft the JSON. You review it, test it, and decide whether to deploy it.
- Explaining a rule. Paste a rule and ask what it checks and why. Useful when you inherit a rule set.
- Spotting coverage gaps. Compare your rule tags against a framework's control list and ask which controls have no rule yet. Treat the answer as a starting point, not a verdict.
- Reviewing remedies. Ask whether a remedy command is idempotent or has side effects you missed.
The key word is draft. A model does not get to change production rules on its own. It proposes; a person reviews, tests on a small group, and rolls out.
What LEA itself offers
LEA includes an optional assistant that answers questions about your fleet in plain language. It looks up hosts, rules and results with tools that run with your own permissions, and shows the answer as a table or chart. It is off until you connect a model, which can run on your own servers or come from a provider you choose, and any change it proposes waits for a person to confirm. LEA also ships an MCP server, so MCP-capable AI clients can read hosts, results, rules and documentation.
How People and Models Work Together
Because rules are plain JSON, people and tools work on the same data. An analyst edits a rule in LEA's rule editor; a script or AI client can read the same rule through the API. No translation layer.
A sensible workflow
- An analyst decides SSH hardening on a set of servers needs tightening.
- They ask an AI tool to draft a rule that checks
sshd_configfor the settings they want. - The model drafts the validation, expect and optional remedy blocks.
- The analyst adjusts it. They know which servers need exceptions; the model doesn't.
- The rule goes to a test group first. If results look right for a week, it is assigned to the wider fleet.
- Every result and every remedy attempt is kept as history, so the rollout is reviewable afterwards.
The model did pattern-matching and boilerplate. The person did context, judgment and the rollout decision. That division of labour makes sense, and it works because both sides read the same JSON.
Where Policy-as-Data Leads
Treating compliance as structured data opens options that closed formats don't. None of these are LEA features today; they are things teams can build once rules are data:
- Policy-as-code pipelines. The rule set lives in Git, changes go through pull requests, and a pipeline pushes approved rules through the API.
- Event-driven tightening. An external system (a SIEM, an incident tool) triggers a script that assigns stricter rules to an affected group until the issue is closed.
- Trend analysis. Results history is queryable, so you can look for hosts or rules that fail repeatedly and fix the cause.
Key Takeaways
- Policy as data: JSON rules avoid lock-in and fit infrastructure-as-code habits.
- Judged on the server: the agent returns raw output; pass/fail logic stays on the server.
- Easy to integrate: rules move between Git, scripts, CI/CD and the LEA API without translation.
- Model-friendly, human-approved: language models can draft and explain rules; people decide what ships.
- Plain-language questions: LEA's optional assistant answers fleet questions from live data, with your permissions and your choice of model.
Conclusion
Infrastructure changes faster than traditional compliance processes. Keeping policy as structured data lets you fold compliance into normal engineering work: reviewable, versioned, scriptable, and readable by both people and tools. You keep control and accountability; the format just stops getting in the way.
LEA Platform produces evidence; certification is granted only by an accredited auditor.
Try LEA Platform on your own servers:
Start a free POC