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/10 13:09:42 UTC

[GitHub] [skywalking] sonatype-lift[bot] commented on a change in pull request #7431: Banyandb integration

sonatype-lift[bot] commented on a change in pull request #7431:
URL: https://github.com/apache/skywalking/pull/7431#discussion_r686000695



##########
File path: oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/SQLExecutor.java
##########
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.oap.server.storage.plugin.jdbc;
+
+import org.apache.skywalking.oap.server.library.client.request.InsertRequest;
+import org.apache.skywalking.oap.server.library.client.request.UpdateRequest;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.util.List;
+
+/**
+ * A SQL executor.
+ */
+public class SQLExecutor implements InsertRequest, UpdateRequest {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(SQLExecutor.class);
+
+    private String sql;
+    private List<Object> param;
+
+    public SQLExecutor(String sql, List<Object> param) {
+        this.sql = sql;
+        this.param = param;
+    }
+
+    public void invoke(Connection connection) throws SQLException {
+        PreparedStatement preparedStatement = connection.prepareStatement(sql);

Review comment:
       *SQL_INJECTION_JDBC:*  This use of java/sql/Connection.prepareStatement(Ljava/lang/String;)Ljava/sql/PreparedStatement; can be vulnerable to SQL injection (with JDBC) [(details)](https://find-sec-bugs.github.io/bugs.htm#SQL_INJECTION_JDBC)
   (at-me [in a reply](https://help.sonatype.com/lift) with `help` or `ignore`)

##########
File path: oap-server/server-storage-plugin/storage-banyandb-plugin/pom.xml
##########
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>server-storage-plugin</artifactId>
+        <groupId>org.apache.skywalking</groupId>
+        <version>8.8.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>storage-banyandb-plugin</artifactId>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>server-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>library-client</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>

Review comment:
       *Critical OSS Vulnerability:*  &nbsp;
   ### pkg:maven/com.h2database/h2
   1 Critical, 1 Severe, 0 Moderate and 0 Unknown vulnerabilities have been found in a direct dependency 
   
   
   
   <!-- Lift_Details -->
   <details>
   <summary><b>CRITICAL Vulnerabilities (1)</b></summary>
   
   <ul>
   
     ***
     <details>
       <summary>CVE-2018-10054</summary>
   
     > #### [CVE-2018-10054]  Improper Input Validation
     > H2 1.4.197, as used in Datomic before 0.9.5697 and other products, allows remote code execution because CREATE ALIAS can execute arbitrary Java code.
     >
     > **CVSS Score:** 8.8
     >
     > **CVSS Vector:** CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
     </details>
   
     ***
   </ul>
   
   </details>
   
   <details>
   <summary><b>SEVERE Vulnerabilities (1)</b></summary>
   
   <ul>
   
     ***
     <details>
       <summary>CVE-2018-14335</summary>
   
     > #### [CVE-2018-14335] An issue was discovered in H2 1.4.197. Insecure handling of permissions in the b...
     > An issue was discovered in H2 1.4.197. Insecure handling of permissions in the backup function allows attackers to read sensitive files (outside of their permissions) via a symlink to a fake database file.
     >
     > **CVSS Score:** 6.5
     >
     > **CVSS Vector:** CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
     </details>
   
     ***
   </ul>
   
   </details>
   
   (at-me [in a reply](https://help.sonatype.com/lift) with `help` or `ignore`)




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