-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat/integrate-with-builder
- Loading branch information
Showing
65 changed files
with
1,418 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -171,3 +171,4 @@ Migrations/ | |
*.DS_Store | ||
/e2e-tests/emb-json/target/ | ||
/process_data/ | ||
/e2e-tests/spring-rest-multidb/target/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FROM amazoncorretto:21-alpine-jdk | ||
|
||
COPY core/target/evomaster.jar . | ||
|
||
ENTRYPOINT [ \ | ||
"java", \ | ||
"-Xmx4G", \ | ||
"-jar", "evomaster.jar", \ | ||
"--runningInDocker", "true" \ | ||
] | ||
|
||
|
||
################### | ||
###### NOTES ###### | ||
################### | ||
# Build | ||
# docker build -t webfuzzing/evomaster . | ||
# | ||
# Run | ||
# docker run webfuzzing/evomaster <options> | ||
# | ||
# Publish (latest, otherwise tag with :TAG) | ||
# docker login | ||
# docker push webfuzzing/evomaster | ||
# | ||
# Example remote BB | ||
# docker run -v "/$(pwd)/generated_tests":/generated_tests webfuzzing/evomaster --blackBox true --bbSwaggerUrl https://api.apis.guru/v2/openapi.yaml --outputFormat JAVA_JUNIT_4 --maxTime 10s --ratePerMinute 60 | ||
# | ||
# Example local BB | ||
# docker run -v "/$(pwd)/generated_tests":/generated_tests webfuzzing/evomaster --blackBox true --bbSwaggerUrl http://host.docker.internal:8080/v3/api-docs --maxTime 5s | ||
# | ||
# Example WB (NOT IMPLEMENTED YET) | ||
# docker run -v "/$(pwd)/generated_tests":/generated_tests webfuzzing/evomaster --dockerLocalhost true | ||
# | ||
# Setting for existing em.yaml | ||
# -v "/$(pwd)/em.yaml":/em.yaml | ||
# | ||
# Debugging | ||
# docker run -it --entrypoint sh webfuzzing/evomaster | ||
# | ||
# | ||
# | ||
# | ||
# | ||
# | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...ava/sql/src/main/java/org/evomaster/client/java/sql/internal/SqlHeuristicsCalculator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.evomaster.client.java.sql.internal; | ||
|
||
import net.sf.jsqlparser.expression.Expression; | ||
import net.sf.jsqlparser.statement.Statement; | ||
import net.sf.jsqlparser.statement.select.FromItem; | ||
import org.evomaster.client.java.controller.api.dto.database.schema.DbInfoDto; | ||
import org.evomaster.client.java.sql.QueryResult; | ||
|
||
import static org.evomaster.client.java.sql.internal.SqlParserUtils.getFrom; | ||
import static org.evomaster.client.java.sql.internal.SqlParserUtils.getWhere; | ||
|
||
public class SqlHeuristicsCalculator { | ||
|
||
public static SqlDistanceWithMetrics computeDistance(String sqlCommand, | ||
DbInfoDto schema, | ||
TaintHandler taintHandler, | ||
QueryResult... data) { | ||
|
||
Statement parsedSqlCommand = SqlParserUtils.parseSqlCommand(sqlCommand); | ||
Expression whereClause= getWhere(parsedSqlCommand); | ||
FromItem fromItem = getFrom(parsedSqlCommand); | ||
|
||
if (fromItem == null && whereClause == null) { | ||
return new SqlDistanceWithMetrics(0.0,0,false); | ||
} | ||
|
||
|
||
return null; | ||
} | ||
} |
Oops, something went wrong.