Declare a permission on API operations that had none #588
All Vouch review confidence checks passed
Residual risk 0.33 = Change Risk (0.62) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.62 · 261 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.333
Sensitive Paths
sensitive_paths
0.062
Real PR Conversation Timeline
1 comments
"Review active on #588"
general
weight: 0.35
mgaffigan
19 API operations declared no permission in
@MirthOperation, so an authorization controller had nothing to check for them. Each now declares an existing permission:| Operations | Permission |
|---|---|
| Connector tests (Document Writer, File Reader and Writer, HTTP, TCP, SMTP and Web Service senders), the Web Service WSDL operations, Database
getTables, JMS template save and delete |manageChannels|| JMS
getTemplates,getTemplate|viewChannels||
getProperty|viewServerSettings||
setUpdateSettings|editServerSettings|Also:
deleteTemplatewas declared with the operation namesaveTemplate, and its API summary described a save.MirthOperationPermissionTestwalks every@MirthOperationin the core API, connectors and bundled plugins. It fails when one declares no permission and isn't on the test's list of operations that need none (each listed with its reason), and when a list entry matches no such operation or more than one overloaded method.Left out on purpose
These still declare no permission and are on the test's list:
auditAccessedPHIMessage,auditQueriedPHIMessage,auditExportMessages,auditExportMessagesSuccess). The client calls them to record that a user viewed, searched or exported messages. Whether that auditing belongs on the server is its own question.setUserNotificationAcknowledged. Every user reads and writes their own preferences through them, so a permission there is a separate change.How to verify
./gradlew :server:test --tests com.mirth.connect.client.core.api.MirthOperationPermissionTest: on main it fails and lists the 19; on this branch it passes.Tested
./gradlew clean build: 918 tests, 0 failures.Co-authored with Claude Code.