• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openmrs / openmrs-core / 27768587422
64%
master: 65%

Build:
Build:
LAST BUILD BRANCH: 2.9.x
DEFAULT BRANCH: master
Ran 18 Jun 2026 03:06PM UTC
Jobs 1
Files 852
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Jun 2026 02:59PM UTC coverage: 63.728% (+0.05%) from 63.675%
27768587422

push

github

web-flow
Require Get Alerts privilege to read all users' alerts (#6206)

Backport of #6186 to 2.9.x.

AlertService.getAllAlerts() and getAllAlerts(boolean) return every user's
alerts but were guarded only by @Authorized (authentication), so any
authenticated user could read alerts addressed to others. Introduce a
dedicated Get Alerts privilege (GET_* read-privilege convention) and gate both
methods with it. The per-user reads (getAlert, getAlerts, getAlertsByUser,
getAllActiveAlerts) stay open for a caller reading their own alerts; reading
another user's alerts through them now requires Get Alerts. getAlert(Integer)
returns null (rather than throwing) for another user's alert, the same as for
an unknown id, so it cannot be used as an existence oracle.

The privilege is created on startup via @AddOnStartup / checkCoreDataset() and
is not auto-granted to any role, so it does not reintroduce the leak. The
scheduled AlertReminderTask grants itself a proxy Get Alerts privilege around
its read of all alerts.


Claude-Session: https://claude.ai/code/session_01GswaapaA8WAbd7V7dv3yxW

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

10 of 13 new or added lines in 2 files covered. (76.92%)

4 existing lines in 2 files now uncovered.

23940 of 37566 relevant lines covered (63.73%)

0.64 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
0.0
0.0% api/src/main/java/org/openmrs/scheduler/tasks/AlertReminderTask.java

Coverage Regressions

Lines Coverage ∆ File
3
92.47
-1.08% api/src/main/java/org/openmrs/validator/PatientProgramValidator.java
1
83.54
-0.2% api/src/main/java/org/openmrs/Concept.java
Jobs
ID Job ID Ran Files Coverage
1 27768587422.1 18 Jun 2026 03:06PM UTC 852
63.73
Source Files on build 27768587422
  • Tree
  • List 852
  • Changed 9
  • Source Changed 4
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27768587422
  • 31acbcfa on github
  • Prev Build on 2.9.x (#27688009154)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc