slachiewicz opened a new pull request, #3627:
URL: https://github.com/apache/maven-surefire/pull/3627

   This PR addresses four reports about how Surefire consumes build-local 
inputs:
   
   - #3613 — harden `failsafe-summary.xml` parsing: build a 
`DocumentBuilderFactory` with secure processing, DOCTYPE and external entities 
disabled before evaluating XPath, and reject a summary containing a DOCTYPE.
   - #3615 — harden `TEST-*.xml` parsing: configure the same parser 
restrictions on the `SAXParserFactory`/`SAXParser` used by `TestSuiteXmlParser`.
   - #3626 — stop following preplanted temp paths: 
`TempFileManager.createTempFile` now uses atomic creation that fails when the 
predicted name is already occupied by a file or symlink, and creates 
directories/files with owner-only POSIX permissions where supported.
   - #3625 — bound stderr line buffering: `LineConsumerThread` now accumulates 
into a capped `CharBuffer`-fed builder instead of an unbounded `Scanner`, 
truncates overlong lines, and dispatches them with a marker.
   
   Regression tests are included for all four changes:
   
   - `TestSuiteXmlParserTest.testDoctypeWithExternalEntityIsRejected`
   - `MarshallerUnmarshallerTest.shouldRejectSummaryWithDoctype`
   - `TempFileManagerTest.testCreateTempFileDoesNotReturnPreplantedSymlink` and 
`testCreateTempFileUsesOwnerOnlyPermissionsOnPosix`
   - `LineConsumerThreadTest.shouldDispatchCompleteLines` and 
`shouldTruncateOverlongLine`
   
   Verification performed locally (offline): `mvn -o -B -pl 
surefire-api,surefire-extensions-api,surefire-report-parser,maven-failsafe-plugin
 -am install -DskipTests` followed by `mvn -o -B -pl 
surefire-api,surefire-extensions-api,surefire-report-parser,maven-failsafe-plugin
 test` — BUILD SUCCESS, all tests passing. Spotless/checkstyle were skipped 
locally because the available JDK 27 cannot run the configured 
palantir-java-format version.
   
   Relates to #3611 (boot config file permissions are covered by the temp-file 
change).
   


-- 
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