uschindler commented on code in PR #14811: URL: https://github.com/apache/lucene/pull/14811#discussion_r2156654935
########## gradle/validation/forbidden-apis/defaults.all.txt: ########## @@ -76,3 +76,15 @@ java.lang.Math#fma(float,float,float) java.lang.Math#fma(double,double,double) java.lang.Thread#sleep(**) @ Thread.sleep makes inefficient use of resources, introduces weird race conditions and slows down the code/tests. Not a scalable and good practice so we should prevent it creeping into lucene code + +@defaultMessage Using dangerous ClassLoader APIs may deserialize untrusted user input into bytecode, leading to remote code execution vulnerabilities +java.lang.ClassLoader#defineClass(**) +jdk.internal.misc.Unsafe#defineClass(**) +jdk.internal.access.JavaLangAccess#defineClass(**) +# forbidden complains it can't find this enclosed class +# java.lang.invoke.MethodHandles.Lookup#defineClass(**) Review Comment: All fine. I think thats documented somewhere. But basically the signatures files need the "binary name" of all classes. I will add the [wiki](https://github.com/policeman-tools/forbidden-apis/wiki/SignaturesSyntax) page to explicitely give an example (in addition to `java.lang.String`). -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org