File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 cache : maven
2222 - name : Build with Maven
2323 run : mvn clean package
24+
25+ - name : Test wavsep
26+ run : |
27+ # Run wavsep, mapping the logs
28+ mkdir logs
29+
30+ # Pre create the logfile we need access to
31+ LOG_FILE=localhost.$(date +%F).log
32+ touch logs/$LOG_FILE
33+ chmod -R a+r logs
34+
35+ docker run --rm -v $(pwd)/logs:/opt/tomcat/logs/:rw -v $(pwd)/target/wavsep.war:/opt/tomcat/webapps/wavsep.war:rw -p 8080:8080 -p 3306:3306 zaproxy/wavsep &
36+
37+ sleep 5
38+
39+ docker run --rm -v $(pwd):/zap/wrk/:rw --network host ghcr.io/zaproxy/zaproxy:nightly zap.sh -cmd -port 9090 -silent -autorun /zap/wrk/test/zap-spider.yaml
40+
41+ sleep 5
42+
43+ echo List logs dir
44+ ls -l logs
45+
46+ cat logs/$LOG_FILE
47+
48+ grep "Unable to compile class" logs/$LOG_FILE >> grepout || true
49+
50+ if [ -s grepout ]; then
51+ echo "Compilation failed"
52+ exit 1
53+ else
54+ echo "Compilation passed"
55+ exit 0
56+ fi
Original file line number Diff line number Diff line change 1+ env :
2+ contexts :
3+ - name : wavsep
4+ urls :
5+ - http://127.0.0.1:8080/wavsep
6+ includePaths :
7+ - http://127.0.0.1:8080/wavsep.*
8+ excludePaths :
9+ # This URL is a test page with a deliberate compilation error
10+ - http://127.0.0.1:8080/wavsep/passive/info/info-server-stack-trace.jsp
11+ authentication :
12+ verification :
13+ method : response
14+ pollFrequency : 60
15+ pollUnits : requests
16+ pollUrl : " "
17+ pollPostData : " "
18+ sessionManagement :
19+ method : cookie
20+ technology :
21+ exclude :
22+ - Windows
23+ structure : {}
24+ parameters : {}
25+ jobs :
26+ - name : spider active
27+ type : spider
28+ parameters :
29+ url : http://127.0.0.1:8080/wavsep/index-active.jsp
30+ maxDepth : 0
31+ tests :
32+ - name : At least 100 URLs found
33+ type : stats
34+ onFail : INFO
35+ statistic : automation.spider.urls.added
36+ operator : ' >='
37+ value : 100
38+ - name : spider passive
39+ type : spider
40+ parameters :
41+ url : http://127.0.0.1:8080/wavsep/index-passive.jsp
You can’t perform that action at this time.
0 commit comments