ReportExample.java
SHA-2561bbbdd7a7a3721f26b68eb5d5ffe24b0cc1d642d0d78624a99607eeed3046bda
Malecule∅
Also flagged by https://www.endorlabs.com/learn/rss.xml (How AI SAST works: detection, triage, and remediation agents | Endor Labs).
Evidence
1// ReportController.java
2@GetMapping("/reports/{reportId}")
3public ReportDto getReport(@PathVariable Long reportId,
4 @AuthenticationPrincipal User user) {
5 return reportService.findReport(reportId);
6}
7
8
9// ReportService.java
10public ReportDto findReport(Long reportId) {
11 Report report = reportRepository.findById(reportId)
12 .orElseThrow(NotFoundException::new);
13 return ReportDto.from(report);
14}
15