slachiewicz opened a new issue, #3611: URL: https://github.com/apache/maven-surefire/issues/3611
Affected version: master at d7c7e359e. While tracing the configuration written for each fork, I noticed that `SystemPropertyManager.writePropertiesFile` (surefire-booter/src/main/java/org/apache/maven/surefire/booter/SystemPropertyManager.java:65-81) creates the file through `TempFileManager.createTempFile` (surefire-api/src/main/java/org/apache/maven/surefire/api/util/TempFileManager.java:140-172) and stores it with a plain `FileOutputStream`/`Properties.store` under the process umask. No explicit owner-only mode is set. The file contains `FORK_NODE_CONNECTION_STRING` (including the session token), `PLUGIN_PID`, and `PROVIDER_CONFIGURATION` (`BooterSerializer.serialize`, maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java:102-180). Cleanup is also conditional: `deleteOnExit` is applied only when `keepForkFiles` is false (SystemPropertyManager.java:68-70), and `BooterSerializer.java:178` maps debug mode to `keepForkFiles`, so debug runs retain the file on disk. Expected behavior: create these files with owner-only permissions (0600 on POSIX), for example via `Files.createFile` with `PosixFilePermissions`, and avoid persisting the connection token where possible. A regression test could assert the mode on POSIX filesystems. -- 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]
