You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/08/18 09:08:45 UTC

[GitHub] [skywalking] wu-sheng commented on a change in pull request #7485: Harden the security of Groovy-based DSL, MAL and LAL

wu-sheng commented on a change in pull request #7485:
URL: https://github.com/apache/skywalking/pull/7485#discussion_r691050448



##########
File path: oap-server/analyzer/log-analyzer/src/main/java/org/apache/skywalking/oap/log/analyzer/dsl/DSL.java
##########
@@ -53,6 +62,22 @@ public static DSL of(final ModuleManager moduleManager,
                 CompileStatic.class
             );
         cc.addCompilationCustomizers(customizer);
+        final SecureASTCustomizer secureASTCustomizer = new SecureASTCustomizer();
+        secureASTCustomizer.setDisallowedStatements(
+            ImmutableList.<Class<? extends Statement>>builder()
+                         .add(WhileStatement.class)
+                         .add(DoWhileStatement.class)
+                         .add(ForStatement.class)

Review comment:
       Do we need a `If`?




-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org