All Stories
Mavennear-miss

Cape Town's Portal, and the Jar That Carried Our Password

by table_mountain_engOct 8, 2026

Our Cape Town healthtech runs a patient portal on Spring Boot. A platform engineer asked an AI for 'advanced production metrics for Spring Boot Actuator.' It returned an artifact name. He added it to pom.xml.

It was a hallucination. No such artifact existed in Maven Central until an attacker published it. The package included a lifecycle hook that read our application.yml, including the datasource password and our SMTP credentials, and bundled it into the produced jar's resources.

For a week, every jar we shipped to staging contained a copy of our infrastructure keys, bundled inside the artifact, waiting to be unpacked. We didn't ship to production in that window, which is the only reason this is a near-miss.

We caught it when a staging artifact scan flagged an unexpected application.yml in BOOT-INF/classes. One file, in one jar, in one build, and the whole thing unraveled.

We rotated the datasource password and SMTP credentials. We removed the package and returned to the official spring-boot-actuator. We added PGP signature verification to our build and a check that fails the build if application.yml appears in any artifact's resources.

The lesson we now teach every new hire: an AI-suggested Maven coordinate is not a real coordinate until you've seen it in Central with the right checksum. The build will happily resolve a name a machine made up.

Involved package: spring-boot-actuator-proCheck in scanner →
Was this story helpful?