Repository navigation
Stop Spring Data REST from exporting repositories - #499
Conversation
Spring Data REST published 26 repositories at the site root (/users, /entries, /comments, /userContacts, /queueMails and so on) with no login check, and /users overlapped the ActivityPub actor routes. Nothing on the site or in the unix, Java, Windows or Dashboard clients called them; they all use /api or the older servlets. Only repositories annotated with @RepositoryRestResource can be exported now, and every annotated one already says exported = false. A unit test checks no repository is exported, and ITAppTest expects 404 from a few of the old paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewer's GuideThe PR closes unintended Spring Data REST exposure by switching repository discovery to annotated-only mode, relying on existing exported=false annotations, and adds unit and integration tests to verify repositories are not published at the site root. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| PHP | Nov 3, 2026 8:29a.m. | Review ↗ | |
| Java | Nov 3, 2026 8:29a.m. | Review ↗ | |
| Shell | Nov 3, 2026 8:29a.m. | Review ↗ | |
| JavaScript | Nov 3, 2026 8:29a.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
Spring Data REST was publishing 26 repositories at the site root (
/users,/entries,/comments,/userContacts,/queueMails, …) with no login check, and/usersoverlapped the ActivityPub actor routes.Nothing calls them:
/api/...only./api/loginand/api/entry./api/loginor the older/loginAccountand/updateJournalservlets. Issues to move them to/api: Post entries through/api/entryinstead of/updateJournaljustjournal-client-java#4, Move login, posting and the mood list to/apijustjournal-windows-client#2, Stop sending the password in the URL; post through/apijustjournal-client-dashboard#2.Change:
JustJournalRepositoryRestConfigurationsets the annotated detection strategy, so only repositories marked@RepositoryRestResourcecan be exported. Every annotated one already saysexported = false. TheexposeIdsForcall is gone; it only affected exported repositories.Tests
JustJournalRepositoryRestConfigurationTestsscanscom.justjournal.repositoryand checks no repository is exported. Passes locally, along with the otherconfigtests.ITAppTest.repositoriesAreNotExportedexpects 404 from/entries,/comments,/userContactsand/queueMails. Not run locally (theitprofile couldn't reach Elasticsearch); needs CI.🤖 Generated with Claude Code
Summary by Sourcery
Disable unintended Spring Data REST repository exposure at the site root.
Bug Fixes:
Enhancements:
Tests: