FrankChen021 opened a new pull request, #19822: URL: https://github.com/apache/druid/pull/19822
## What - replace insecure default temporary-file creation with owner-private NIO or test-managed temporary locations - make test resource lookup use declaring-class literals and close resource streams - preserve portable `getconf` PATH lookup with a narrow CodeQL suppression and rationale - strengthen temporary archive cleanup in the OSS, S3, and Cassandra segment pushers ## Why This addresses the 55 CodeQL warnings in the temporary-file and resource-lookup group: - 46 `java/local-temp-file-or-directory-information-disclosure` - 8 `java/unsafe-get-resource` - 1 `java/relative-path-command` ## Impact Temporary files are created with restrictive permissions or inside managed private directories. Resource lookup no longer depends on runtime subclass dispatch, and affected tests can load resources when packaged in JARs. ## Root cause The affected code used legacy `File.createTempFile`, runtime-class resource lookup, and one intentionally portable executable lookup that CodeQL could not distinguish from an attacker-controlled command. ## Checks - affected 21-module reactor test compilation and Checkstyle passed - production-focused tests: 24 passed - processing-focused tests: 174 passed - cross-module focused tests: 100 passed - `git diff --check` Created by GPT-5.6-Sol. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
