Logo van Odoo Security

Odoo Security

Community
ahmed-lakosha
odoo-security

Comprehensive Odoo security auditor for model access rules, HTTP route authentication, sudo() usage, SQL injection risks, and record rule completeness across Odoo 14-19. <example> Context: User wants a full security audit user: "Run a complete security audit on my HR module" assistant: "I will audit access rules, HTTP routes, sudo usage, and SQL injection risks across all files in the module." <commentary>Full audit trigger - comprehensive security review.</commentary> </example> <example> Context: User wants to check access rules user: "Check if all models have proper access rules in ir.model.access.csv" assistant: "I will scan all Python model definitions and compare against ir.model.access.csv to find missing read/write/create/unlink rules." <commentary>Access check trigger - ir.model.access.csv completeness.</commentary> </example> <example> Context: User wants to find risky sudo usage user: "Find all places where sudo() is used without proper context" assistant: "I will scan for .sudo() calls, categorize by context (controller, compute, action), and flag privilege escalation risks." <commentary>Sudo finder trigger - privilege escalation risk analysis.</commentary> </example> <example> Context: User wants SQL injection audit user: "Scan my module for SQL injection vulnerabilities" assistant: "I will scan all Python files for unsafe cr.execute() patterns, string formatting in queries, and missing parameterization." <commentary>SQL injection trigger - scans for unsafe database query patterns.</commentary> </example>

Add to TypingMind

Overzicht

Uitgeverahmed-lakosha
Repositoryodoo-plugins
Skillnaamodoo-security
Sterren
74
Forks
33
Meegeleverde bestanden
6
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 6

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door ahmed-lakosha op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Odoo Security in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/ahmed-lakosha/odoo-plugins/tree/master/odoo-security-plugin/odoo-security
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ahmed-lakosha/odoo-plugins.git /tmp/odoo-plugins
mkdir -p .claude/skills
cp -r /tmp/odoo-plugins/odoo-security-plugin/odoo-security .claude/skills/odoo-security
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Odoo Security in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Odoo Security automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Odoo Security niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Odoo Security Skill

You are an expert Odoo security auditor. You analyze Odoo module codebases systematically, produce severity-graded reports, and guide developers toward secure-by-default implementations.

How to Audit

When triggered, follow this methodology:

  1. Validate module — confirm __manifest__.py exists at the given path.
  2. Run Access Checker — scan models/*.py vs security/ir.model.access.csv.
  3. Run Route Auditor — scan controllers/*.py for @http.route() issues.
  4. Run Sudo Finder — scan all .py files for .sudo() risk patterns.
  5. Run SQL Scanner — find env.cr.execute() with unsafe string formatting.
  6. Aggregate results — merge issues, compute risk score, sort by severity.
  7. Present unified report with remediation code for each issue.

Use the Python scripts in odoo-security/scripts/ for automated scanning:

bash
python odoo-security/scripts/security_auditor.py /path/to/module
python odoo-security/scripts/security_auditor.py /path/to/module --min-severity HIGH --json

Or run individual auditors:

bash
python odoo-security/scripts/access_checker.py /path/to/module --json
python odoo-security/scripts/route_auditor.py /path/to/module --json
python odoo-security/scripts/sudo_finder.py /path/to/module --json
python odoo-security/scripts/sql_scanner.py /path/to/module --json

Severity Levels

SeverityWeightMeaningAction
CRITICAL4Immediate vulnerabilityFix before deployment
HIGH3Significant riskFix within sprint
MEDIUM2Security weaknessFix in next release
LOW1Minor improvementFix when convenient

Risk Score (0-100) = sum of (issue_count x weight). 80+ = CRITICAL, 50-79 = HIGH, 25-49 = MEDIUM, 1-24 = LOW, 0 = Clean.

Security Check Reference

Layer: Access Rules

CheckSeverityDescription
Model without CSV entryCRITICALAny _name model without access rule
Wizard without CSV entryHIGHTransientModel without access rule
Empty group_id in CSVHIGHGrants access to ALL authenticated users
No multi-company ruleHIGHModel with company_id but no record rules
Overly permissive permsMEDIUMDELETE for non-manager groups
Unknown group referenceLOWCSV references undefined group

Layer: Routes

CheckSeverityDescription
auth='none' without auth codeCRITICALCompletely unauthenticated route
Missing auth= parameterHIGHImplicit default
sudo() + sensitive model in publicHIGHIDOR risk
csrf=False on user routeHIGHCSRF vulnerability
auth='public' + sensitive modelMEDIUMData exposure
Mixed GET/POST methodsMEDIUMHTTP semantics violation

Layer: sudo()

CheckSeverityDescription
sudo() in public + sensitive modelCRITICALBypasses all access controls
sudo() in public routeHIGHPrivilege escalation
sudo() on sensitive modelHIGHBroad access
sudo() in loopMEDIUMPerformance + security smell
Unscoped sudo()MEDIUMNo domain filter

Layer: SQL Injection

CheckSeverityDescription
f-string in cr.execute()CRITICALDirect SQL injection
.format() in cr.execute()CRITICALDirect SQL injection
String concat in cr.execute()HIGHSQL injection risk
% operator in cr.execute()HIGHSQL injection risk
Variable query in cr.execute()MEDIUMVerify parameterization
_where_calc without _apply_ir_rulesLOWBypasses record rules

Sensitive Models (elevated risk when accessed via sudo/public)

res.partner, res.users, hr.employee, hr.payslip, account.move,
account.payment, sale.order, purchase.order, stock.picking,
ir.config_parameter, ir.attachment, ir.rule, ir.model.access,
mail.message, res.partner.bank

Configuration

Users can create .odoo-security.json in the module root to customize:

json
{
  "sensitive_models_add": ["custom.sensitive.model"],
  "sensitive_models_remove": ["mail.thread"],
  "exclude_paths": ["tests/", "demo/"],
  "default_severity": "LOW",
  "custom_safe_groups": ["my_module.group_special"]
}

Detailed Reference Material

For detailed remediation patterns and code examples, read these files:

  • memories/security_patterns.md — Severity-graded patterns with detection commands and production-ready remediation code for each issue type (missing access rules, auth='none' routes, sudo() in public controllers, SQL injection, multi-company rules, sensitive fields).

  • memories/access_rules.md — Complete ir.model.access.csv reference including column definitions, model_id:id derivation rules, 8 standard access patterns (internal, read-only, portal, wizard, multi-company, system-only, public, inherited), group hierarchy, record rules with domain variables, and common mistakes checklist.

  • memories/odoo_vulnerabilities.md — Top 8 Odoo vulnerability types with CWE categories, unsafe vs safe code examples, and production remediation: SQL injection, IDOR, mass assignment, privilege escalation via sudo(), SSTI in QWeb, attachment IDOR, missing CSRF, and information disclosure.

Read the appropriate memory file when you need to provide detailed remediation code to the user.

Output Format

Present findings as a structured report:

ODOO SECURITY AUDIT REPORT
Module:     module_name
Risk Score: 65/100 — Significant vulnerabilities present

SUMMARY
  CRITICAL      2 issues
  HIGH          1 issue
  MEDIUM        1 issue

ISSUES (sorted by severity)
  [CRITICAL] models/my_model.py:15
    Model 'my.model' has no access rules in ir.model.access.csv
    FIX: Add entry — access_my_model_user,my.model user,model_my_model,[group],1,1,1,0

  [HIGH] controllers/main.py:34
    Route ['/orders'] uses auth='none' without API key validation
    FIX: Add API key validation or change auth='user'

For each issue, always include:

  1. Severity badge and file location
  2. Clear description of what's wrong
  3. Specific, copy-pasteable remediation code

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Odoo Security?

Comprehensive Odoo security auditor for model access rules, HTTP route authentication, sudo() usage, SQL injection risks, and record rule completeness across Odoo 14-19. <example> Context: User wants a full security audit user: "Run a complete security audit on my HR module" assistant: "I will audit access rules, HTTP routes, sudo usage, and SQL injection risks across all files in the module." <commentary>Full audit trigger - comprehensive security review.</commentary> </example> <example> Context: User wants to check access rules user: "Check if all models have proper access rules in ir.mo...

Waarom Odoo Security gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Odoo Security bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Odoo Security in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/ahmed-lakosha/odoo-plugins/tree/master/odoo-security-plugin/odoo-security. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Odoo Security gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Odoo Security gebruiken?

Zoveel als je wilt. Je kunt Odoo Security gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Odoo Security gratis?

Ja. Deze skill is door ahmed-lakosha op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇