Case study ยท Product engineering

Odoo Shield Warden: money-at-risk controls for Odoo

ERP security is usually a checklist. Fraud is money leaving. I designed and built a controls engine for Odoo that stops risky vendor payments before they go out, puts a money figure on what was exposed, and keeps evidence an administrator cannot quietly rewrite.

Designed and built by Facundo Montefalcone. Portfolio edition.
14/14Lab attack scenarios detected, up from 3/14
60/60Automated tests passing on Odoo 18 and 19
22/22End-to-end scenarios in the regression loop
15 to 5Alerts correlated into cases
6Logic bugs the lab exposed and I fixed
3Frameworks mapped: ISO 27001, SOC 2, CIS v8

The problem

Companies running Odoo protect accounts payable with role-based groups and the record chatter log. That leaves three blind spots.

The audit trail can be switched off

A caller with write access can change a vendor bank account while passing a context flag that disables change tracking. The payment run then pays the wrong account and the log shows nothing.

Checklists do not measure money

A hardening checklist says a setting is wrong. It does not say which payments were exposed or how much they were worth.

Evidence can be edited

An assessment stored as ordinary records can be rewritten by the same administrator it is meant to check.

What it does

Security and GRC controls

Continuous assessment mapped to ISO 27001, SOC 2 and CIS Controls v8: MFA coverage, login throttling, default admin checks, database manager exposure, weak database credentials, mass exports.

Anti-forensics monitors

Detects code stored in the database, custom record rules that hide data from auditors, and privilege drift against a sealed baseline.

Preventive payment hold

Payments to a new or recently changed vendor bank account are intercepted and need a second person to verify before funds are released.

Transaction monitoring

Rules for untracked bank swaps, bank accounts shared between vendors and staff, self-approved bills, duplicate vendor bills and rapid payouts to new vendors.

Money-at-risk cases

Related alerts are grouped into one investigation case per payment with a money total and a return-on-security-investment view.

Tamper-evident evidence

Every assessment and attestation is linked into a SHA-256 hash chain, with optional off-box seal receipts and an executive PDF scorecard.

Architecture

Core addon
Automated controlsAnti-forensic monitorsThird-party addon scannerRisk registerOne-click hardeningEvidence chainPDF scorecard
Finance addon
Two-person payment holdToxic privilege detectionTransaction fraud rulesCase aggregationROSI view
Scanner
Standalone host and external inspectionFor instances where addons cannot be installed
Lab
Adversarial fraud benchmarkSynthetic data onlyRefuses non-localhost targets
Tools
Fraud scenario seedingAssessment runnerScorecard export
Dev stack
Docker ComposeOdoo 18PostgreSQL

Everything runs inside the Odoo instance through the ORM and the accounting module. There is no external agent to deploy.

How I proved it works

I wrote an attack lab that plays the fraudster and the insider against a local instance: bank swaps with tracking disabled, dormant server actions, record rules that blind an auditor, quiet privilege escalation. Then I ran review cycles until detection stopped missing.

MeasureFirst versionCurrent
Lab attack scenarios detected3 of 1414 of 14
Logic bugs found by the lab in the controls engineUnknown6 found and fixed
Automated tests, Odoo 18Not ported60 of 60
Automated tests, Odoo 19Not ported60 of 60, ported by patch
End-to-end regression loopNone22 of 22 scenarios, 2 prevention checks
Alert correlation in the demo dataset15 separate alerts5 cases with one money total

Odoo 17 is documented as not supported: the module installs after view backports but 14 finance tests fail. I would rather publish the boundary than hide it.

Design decisions

Prevent, then detect

A hold on the payment beats an alert after the money left. Detection covers what the hold cannot see.

Cases, not alerts

One fraudulent payment trips two or three rules. Grouping by payment gives an investigator one case and one number.

Independent fingerprints

Bank details are hashed separately from the chatter log, so a swap with tracking disabled still shows as a mismatch.

Known limits, written down

Bank aliases re-pointed outside Odoo are invisible to ERP-layer controls. The documentation says so and recommends paying by account number.

Stack

Platform
Odoo 18Odoo 19PostgreSQL
Code
PythonOdoo ORMXML viewsQWeb PDF
Runtime
Docker ComposeLinux
Localization
IBANArgentine CBU and CVU
Frameworks
ISO 27001SOC 2CIS Controls v8
Portfolio edition. Source is available for review on request. All lab and demo data is synthetic.