← Back to Pull requests

[18.0] webservice*: add neutralize scripts + secret params #189

Closed
unknown closed this pull request without merging on Nov 06, 2026 11:36 UTC
View on GitHub
unknown unknown commented on Oct 21, 2026 15:36 UTC
Author

Make it safe to restore a production database elsewhere: neutralization drops the webservice endpoints and credentials, and the values flagged as secret are hidden in the UI and in the logs.

Neutralize scripts

odoo neutralize (and the neutralization done on database copy) now runs:

  • webservice_core: replaces the backend url with https://neutralized.invalid (the field is required) and clears username, password and api_key

  • webservice: clears the OAuth2 client id, client secret, client auth value and token
  • The tests seed and read the raw columns with SQL, as the scripts do. Modules like webservice_server_env make the ORM read these fields from the environment instead of the columns, so going through the ORM would not test what the script actually does.

    Secret headers and querystring params

    New Secret flag on webservice.header and webservice.querystring.param, for values like tokens or keys:

  • the value is hidden in the UI (password widget)

  • the value is replaced by neutralized when the database is neutralized
  • The password attribute cannot depend on the record, so the Headers and Querystring Params lists are no longer editable inline: lines open in a small form showing either the plain or the masked value.

    Logging

    The call debug log masks (***) the values of:

  • secret headers and querystring params, including the ones merged from the backend into an endpoint call and vice versa

  • keys looking sensitive (apikey, password, pwd), reusing the blacklist of sanitize_url_for_log, now shared in webservice_core.utils (is_blacklisted_key, sanitize_values_for_log)
  • Diff: 210 lines (+157 / -53) across 2 files Reviewer: simahawk Review duration: 22800m
    All Vouch review confidence checks passed
    Residual risk 0.24 = Change Risk (0.60) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.60 · 210 lines diff across 2 files
    0.60
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.320
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.060
    Real PR Conversation Timeline
    1 comments
    "Review active on #189"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 59.7% (MEDIUM) · Higher = larger blast radius
    59.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 23.6% · Safe to merge
    23.6%
    Repository