← Back to Pull requests

[18.0][FIX] password_security: sudo password history read for reuse #972

Merged
LauraCForgeFlow merged 1 files (8 lines) on Jul 27, 2026 14:15 UTC
View on GitHub
LauraCForgeFlow LauraCForgeFlow commented on Jul 16, 2026 14:01 UTC
Author

The res.users.pass.history record rules only let a user read their own history. So when someone set another user's password (an admin resetting it), _check_password_history read an empty history and the "cannot reuse recent passwords" check was silently skipped. Reading the history with sudo() fixes this, the check sees the target's real history regardless of who triggers the change.

Diff: 8 lines (+5 / -3) across 1 files Reviewer: LoisRForgeFlow Review duration: 15854m
All Vouch review confidence checks passed
Residual risk 0.07 = Change Risk (0.39) × (1 − Review Confidence (0.82)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 8 lines diff across 1 files
0.39
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.74 · 4 substantive comment(s)
0.74
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
82%
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.131
Sensitive Paths sensitive_paths
0.039
Real PR Conversation Timeline
7 items
LoisRForgeFlow LoisRForgeFlow approved these changes on Jul 16, 2026 14:11 UTC
Approved Reviewer

Makes sense

JoanSForgeFlow JoanSForgeFlow approved these changes on Jul 27, 2026 07:09 UTC
Approved Reviewer

Approved these changes.

OCA-git-bot OCA-git-bot commented on Jul 27, 2026 07:26 UTC
Bot

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

LoisRForgeFlow LoisRForgeFlow commented on Jul 27, 2026 14:11 UTC
Contributor

/ocabot merge patch

OCA-git-bot OCA-git-bot commented on Jul 27, 2026 14:11 UTC
Bot

This PR looks fantastic, let's merge it!
Prepared branch 18.0-ocabot-merge-pr-972-by-LoisRForgeFlow-bump-patch, awaiting test results.

OCA-git-bot OCA-git-bot commented on Jul 27, 2026 14:15 UTC
Bot

Congratulations, your PR was merged at 1032c76b34dedde18c0e555ca2d3e41f4a30eee2. Thanks a lot for contributing to OCA. ❤️

Assignees
LauraCForgeFlow LauraCForgeFlow
Labels
risk: low confidence: 82.2% 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: 39.3% (MEDIUM) · Higher = larger blast radius
39.3%
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: 82.2% · Lower = rushed or shallow review
82.2%
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: 7% · Safe to merge
7%