Skip to content

Commit 27adfc8

Browse files
authored
Merge pull request diffblue#425 from diffblue/webgoat_another_update_of_install_guide
SEC-416: WebGoat: Further updated of the install guide.
2 parents 301bc13 + 87f951a commit 27adfc8

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

benchmarks/GENUINE/README.txt

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ Install guide for Ubuntu:
3737
3. git checkout develop
3838
4. mvn clean install -DskipTests
3939
5. Create the following two files representing the entry point to WebGoat:
40-
./WebGoat/__MAIN__/src/main/java/Main.java:
40+
./__MAIN__/src/main/java/Main.java:
4141
import org.owasp.webgoat.plugin.introduction.SqlInjectionLesson5a;
4242
import org.owasp.webgoat.plugin.introduction.SqlInjectionLesson5b;
4343
import org.owasp.webgoat.plugin.introduction.SqlInjectionLesson6a;
44+
import org.cprover.CProver;
4445

4546
public class Main {
4647

@@ -53,7 +54,7 @@ Install guide for Ubuntu:
5354
/*
5455
{
5556
String test = makeTainted("dave");
56-
SqlInjectionLesson5a obj = new SqlInjectionLesson5a();
57+
SqlInjectionLesson5a obj = CProver.nondetWithNull();
5758
obj.completed(test);
5859
}
5960
*/
@@ -62,7 +63,7 @@ Install guide for Ubuntu:
6263
/*
6364
{
6465
String test = makeTainted("dave");
65-
SqlInjectionLesson5b obj = new SqlInjectionLesson5b();
66+
SqlInjectionLesson5b obj = CProver.nondetWithNull();
6667
try {
6768
obj.completed(test, null);
6869
}
@@ -75,7 +76,7 @@ Install guide for Ubuntu:
7576
/*
7677
{
7778
String test = makeTainted(args[0]);
78-
SqlInjectionLesson6a obj = new SqlInjectionLesson6a();
79+
SqlInjectionLesson6a obj = CProver.nondetWithNull();
7980
try {
8081
obj.completed(test);
8182
}
@@ -87,7 +88,7 @@ Install guide for Ubuntu:
8788
}
8889
Uncomment one of the blocks (depending on what lesson you want to analyse).
8990

90-
./WebGoat/__MAIN__/pom.xml:
91+
./__MAIN__/pom.xml:
9192
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9293
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
9394
<modelVersion>4.0.0</modelVersion>
@@ -118,12 +119,18 @@ Install guide for Ubuntu:
118119
</dependency>
119120
</dependencies>
120121
</project>
122+
123+
And copy CProver's utilities to the build directory:
124+
mkdir -p ./__MAIN__/src/main/java/org/cprover
125+
cp -a <security-scanner-root>/benchmarks/LIBRARIES/models/model/src/main/java/org/cprover ./__MAIN__/src/main/java/org
121126
6. cd __MAIN__
122127
7. mvn package
123-
8. cd ..
124-
9. cd ..
125-
10. rm -rf ./webgoat-container
126-
128+
8. rm -rf ./target/classes/org/
129+
9. Remove directory 'org' inside JAR file: ./target/__MAIN__-8.0.0.M3.jar
130+
10. cd ..
131+
11. cd ..
132+
12. rm -rf ./webgoat-container
133+
127134
The WebGoat does not seem to have a deployment step. Fortunately, the whole
128135
app is relatively small, so we can load everything for each lesson. It means
129136
that we can pass to the Python driver script these options:

0 commit comments

Comments
 (0)