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

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

Build:
Build:
LAST BUILD BRANCH: 2.8.x
DEFAULT BRANCH: master
Ran 21 Jul 2026 08:52PM UTC
Jobs 1
Files 859
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

21 Jul 2026 05:53PM UTC coverage: 64.101% (+0.1%) from 63.994%
29867170267

push

github

ibacher
Require Get Patient Programs privilege for by-uuid program lookups (#6318)

* Require Get Patient Programs privilege for by-uuid program lookups

ProgramWorkflowService.getPatientProgramByUuid and getPatientStateByUuid
had no @Authorized annotation. Because AuthorizationAdvice only enforces
when a method declares a privilege, both fell through with no check at
all, letting any authenticated user read program-enrollment PHI by uuid.
Every other read on the service, including getPatientProgram(Integer),
already requires Get Patient Programs; annotate both by-uuid methods to
match.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Require Get Patient Programs privilege for patient program attribute lookup

getPatientProgramAttributeByAttributeName returns patient program
attribute values keyed by patient id, yet lacked an @Authorized check.
Its two sibling attribute readers (getPatientProgramAttributeByUuid and
getPatientProgramByAttributeNameAndValue) already guard on Get Patient
Programs, so this was a missed PHI read of the same class addressed by
GHSA-gqf9-38mg-wgqg.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TpKNfxm3QjwUBDePEtFm2H

* Add authorization tests pinning the by-uuid program privilege checks

The existing tests for getPatientProgramByUuid, getPatientStateByUuid and
getPatientProgramAttributeByAttributeName run as the privileged superuser
and assert only find/null behavior, so they pass even if the
@Authorized(Get Patient Programs) checks added by this branch are removed.
getPatientProgramAttributeByAttributeName had no test at all.

Add a test per method that logs out (dropping Get Patient Programs) and
asserts APIAuthenticationException is thrown for otherwise-valid arguments,
mirroring AuthorizationAdviceTest and AdministrationServiceTest. These fail
if any of the three annotations is removed, pinning the fix.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Cl... (continued)

24273 of 37867 relevant lines covered (64.1%)

0.64 hits per line

Coverage Regressions

Lines Coverage ∆ File
125
13.82
-0.28% web/src/main/java/org/openmrs/web/filter/update/UpdateFilter.java
60
90.13
0.04% api/src/main/java/org/openmrs/api/impl/PatientServiceImpl.java
30
66.67
8.94% web/src/main/java/org/openmrs/web/filter/util/FilterUtil.java
3
92.47
-1.08% api/src/main/java/org/openmrs/validator/PatientProgramValidator.java
3
45.83
12.5% web/src/main/java/org/openmrs/web/filter/initialization/DatabaseDetective.java
1
92.41
0.1% api/src/main/java/org/openmrs/api/impl/CohortServiceImpl.java
1
96.55
0.26% api/src/main/java/org/openmrs/validator/AllergyValidator.java
Jobs
ID Job ID Ran Files Coverage
1 29867170267.1 21 Jul 2026 08:52PM UTC 859
64.1
Source Files on build 29867170267
  • Tree
  • List 859
  • Changed 16
  • Source Changed 9
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29867170267
  • 9a4d7d78 on github
  • Prev Build on 2.9.x (#29845725671)
  • Next Build on 2.9.x (#29955961944)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc