slachiewicz opened a new issue, #3621:
URL: https://github.com/apache/maven-surefire/issues/3621

   Affected version: master at d7c7e359e.
   
   `AbstractSurefireReport.CustomI18N.getString` 
(maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/AbstractSurefireReport.java:457-496)
 interpolates `${...}` expressions found in custom bundle strings using an 
`EnvarBasedValueSource`, `System.getProperties()`, project properties, and a 
`PrefixedObjectValueSource` for project/pom/settings. The resulting strings 
reach the generated HTML through `getI18nString`/`formatI18nString` calls in 
`SurefireReportRenderer` (for example title and summary labels at lines 77-79 
and 139-155).
   
   The trigger is the `customBundle` `@Parameter` 
(AbstractSurefireReport.java:103-110), defaulting to 
`${basedir}/src/site/custom/surefire-report.properties` and guarded by 
`isFile()`/`.properties` checks in `getI18N` (lines 270-283). This is a 
documented customization feature, and project source/config is normally 
trusted, but a bundle can therefore pull `${env.*}` and `${settings.*}` values 
into a published site report without making that explicit.
   
   Expected behavior: document the value sources available to custom bundles, 
or restrict the interpolator to project/ReportBundle-safe keys so that 
environment and settings values are not silently rendered into reports.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to