Skip to content

Commit

Permalink
Merge pull request #1955 from akto-api-security/hotfix/fix_versions
Browse files Browse the repository at this point in the history
update cve versions
  • Loading branch information
notshivansh authored Jan 10, 2025
2 parents 92570ba + a02e4d0 commit 2f09a3f
Show file tree
Hide file tree
Showing 19 changed files with 138 additions and 105 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
IMAGE_TAG: latest
IMAGE_TAG1: testruntime
IMAGE_TAG2: local
IMAGE_TAG3: 1.42.5_local
IMAGE_TAG3: 1.42.6_local
run: |
docker buildx create --use
# Build a docker container and push it to DockerHub
Expand All @@ -86,7 +86,7 @@ jobs:
IMAGE_TAG: latest
IMAGE_TAG1: testruntime
IMAGE_TAG2: local
IMAGE_TAG3: 1.42.5_local
IMAGE_TAG3: 1.42.6_local
run: |
echo $IMAGE_TAG >> $GITHUB_STEP_SUMMARY
docker buildx create --use
Expand Down
10 changes: 10 additions & 0 deletions apps/api-analyser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo</artifactId>
<version>3.2.6</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.akto.libs.dao</groupId>
<artifactId>dao</artifactId>
Expand Down Expand Up @@ -113,4 +120,7 @@
<testSourceDirectory>src/test/java</testSourceDirectory>
</build>




</project>
9 changes: 9 additions & 0 deletions apps/api-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo</artifactId>
<version>3.2.6</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
Expand Down Expand Up @@ -136,6 +143,8 @@
</plugin>
</plugins>
</build>


</profile>

<profile>
Expand Down
12 changes: 11 additions & 1 deletion apps/billing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
<artifactId>struts2-core</artifactId>
<version>2.5.30</version>
</dependency>
<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo</artifactId>
<version>3.2.6</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.akto.libs.dao</groupId>
Expand All @@ -54,7 +60,11 @@
<artifactId>jetty-servlets</artifactId>
<version>9.4.44.v20210927</version>
</dependency>

<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<version>6.1.26</version>
</dependency>

</dependencies>
<build>
Expand Down
7 changes: 7 additions & 0 deletions apps/dashboard/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
</dependencyManagement>

<dependencies>
<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo</artifactId>
<version>3.2.6</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-lambda</artifactId>
Expand Down
73 changes: 0 additions & 73 deletions apps/dashboard/src/main/java/com/akto/action/HarAction.java
Original file line number Diff line number Diff line change
@@ -1,45 +1,26 @@
package com.akto.action;

import com.akto.DaoInit;
import com.akto.analyser.ResourceAnalyser;
import com.akto.dao.ApiCollectionsDao;
import com.akto.dao.BurpPluginInfoDao;
import com.akto.dao.RuntimeFilterDao;
import com.akto.dao.context.Context;
import com.akto.dao.file.FilesDao;
import com.akto.dto.ApiCollection;
import com.akto.dto.HttpResponseParams;
import com.akto.har.HAR;
import com.akto.listener.InitializerListener;
import com.akto.listener.KafkaListener;
import com.akto.parsers.HttpCallParser;
import com.akto.runtime.APICatalogSync;
import com.akto.dto.HttpResponseParams;
import com.akto.dto.ApiToken.Utility;
import com.akto.dto.type.SingleTypeInfo;
import com.akto.har.HAR;
import com.akto.log.LoggerMaker;
import com.akto.usage.UsageMetricCalculator;
import com.akto.dto.ApiToken.Utility;
import com.akto.util.DashboardMode;
import com.akto.utils.GzipUtils;
import com.akto.utils.Utils;
import com.mongodb.BasicDBObject;
import com.mongodb.ConnectionString;
import com.mongodb.client.model.Filters;
import com.opensymphony.xwork2.Action;
import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.sun.jna.*;

import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.UUID;

public class HarAction extends UserAction {
private String harString;
Expand Down Expand Up @@ -195,58 +176,4 @@ public boolean getSkipKafka() {
public void setTcpContent(byte[] tcpContent) {
this.tcpContent = tcpContent;
}

Awesome awesome = null;

public String uploadTcp() {

File tmpDir = FileUtils.getTempDirectory();
String filename = UUID.randomUUID().toString() + ".pcap";
File tcpDump = new File(tmpDir, filename);
try {
FileUtils.writeByteArrayToFile(tcpDump, tcpContent);
Awesome awesome = (Awesome) Native.load("awesome", Awesome.class);
Awesome.GoString.ByValue str = new Awesome.GoString.ByValue();
str.p = tcpDump.getAbsolutePath();
str.n = str.p.length();

Awesome.GoString.ByValue str2 = new Awesome.GoString.ByValue();
str2.p = System.getenv("AKTO_KAFKA_BROKER_URL");
str2.n = str2.p.length();

awesome.readTcpDumpFile(str, str2 , apiCollectionId);

return Action.SUCCESS.toUpperCase();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return Action.ERROR.toUpperCase();
}

}

interface Awesome extends Library {
public static class GoString extends Structure {
/** C type : const char* */
public String p;
public long n;
public GoString() {
super();
}
protected List<String> getFieldOrder() {
return Arrays.asList("p", "n");
}
/** @param p C type : const char* */
public GoString(String p, long n) {
super();
this.p = p;
this.n = n;
}
public static class ByReference extends GoString implements Structure.ByReference {}
public static class ByValue extends GoString implements Structure.ByValue {}
}

public void readTcpDumpFile(GoString.ByValue filepath, GoString.ByValue kafkaURL, long apiCollectionId);

}
}
10 changes: 0 additions & 10 deletions apps/dashboard/src/main/resources/struts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1042,16 +1042,6 @@
</result>
</action>

<action name="api/uploadTcp" class="com.akto.action.HarAction" method="uploadTcp">
<interceptor-ref name="defaultStack"/>
<interceptor-ref name="json"/>
<result name="SUCCESS" type="json">
</result>
<result name="ERROR" type="httpheader">
<param name="status">401</param>
</result>
</action>

<action name="api/createCollection" class="com.akto.action.ApiCollectionsAction" method="createCollection">
<interceptor-ref name="json"/>
<interceptor-ref name="defaultStack" />
Expand Down
14 changes: 13 additions & 1 deletion apps/database-abstractor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,19 @@
</dependencyManagement>

<dependencies>

<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo</artifactId>
<version>3.2.6</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<version>6.1.26</version>
</dependency>

<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
Expand Down
14 changes: 12 additions & 2 deletions apps/internal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@
<artifactId>utils</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<version>6.1.26</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-json-plugin</artifactId>
Expand All @@ -54,7 +58,13 @@
<artifactId>jetty-servlets</artifactId>
<version>9.4.44.v20210927</version>
</dependency>

<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo</artifactId>
<version>3.2.6</version>
<scope>test</scope>
</dependency>


</dependencies>
<build>
Expand Down
9 changes: 9 additions & 0 deletions apps/mini-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo</artifactId>
<version>3.2.6</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
Expand Down Expand Up @@ -136,6 +143,8 @@
</plugin>
</plugins>
</build>


</profile>

<profile>
Expand Down
14 changes: 14 additions & 0 deletions apps/mini-testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@


<dependencies>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<version>6.1.26</version>
</dependency>
<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo</artifactId>
<version>3.2.6</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.akto.libs.dao</groupId>
<artifactId>dao</artifactId>
Expand Down Expand Up @@ -113,6 +125,8 @@
</plugin>
</plugins>
</build>


</profile>

<profile>
Expand Down
9 changes: 9 additions & 0 deletions apps/testing-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@


<dependencies>
<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo</artifactId>
<version>3.2.6</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.akto.libs.dao</groupId>
<artifactId>dao</artifactId>
Expand Down Expand Up @@ -115,6 +122,8 @@
</plugin>
</plugins>
</build>


</profile>

</profiles>
Expand Down
14 changes: 14 additions & 0 deletions apps/testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@


<dependencies>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<version>6.1.26</version>
</dependency>
<dependency>
<groupId>com.akto.libs.dao</groupId>
<artifactId>dao</artifactId>
Expand Down Expand Up @@ -45,6 +50,13 @@
<artifactId>snakeyaml</artifactId>
<version>1.33</version>
</dependency>
<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo</artifactId>
<version>3.2.6</version>
<scope>test</scope>
</dependency>

</dependencies>

<build>
Expand Down Expand Up @@ -113,6 +125,8 @@
</plugin>
</plugins>
</build>


</profile>

<profile>
Expand Down
Loading

0 comments on commit 2f09a3f

Please sign in to comment.