github-advanced-security[bot] commented on code in PR #19123:
URL: https://github.com/apache/druid/pull/19123#discussion_r2915180076


##########
server/src/main/java/org/apache/druid/server/emitter/EmitterModule.java:
##########
@@ -177,4 +183,28 @@
       return emitter;
     }
   }
+
+  /**
+   * Returns the {@code Build-Revision} attribute from {@code 
META-INF/MANIFEST.MF}, or {@code null}
+   * if the manifest is absent or the attribute is not set. This value is null 
during {@code mvn test}.
+   */
+  protected String getBuildRevision()
+  {
+    try (InputStream is = 
getClass().getResourceAsStream("/META-INF/MANIFEST.MF")) {

Review Comment:
   ## Unsafe use of getResource
   
   The idiom getClass().getResource() is unsafe for classes that may be 
extended.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/10874)



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

Reply via email to