We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f32be70 commit 686a741Copy full SHA for 686a741
.github/workflows/ci.yml
@@ -49,4 +49,14 @@ jobs:
49
run: |
50
sudo systemctl restart apache2.service
51
sudo cat /var/log/apache2/error.log
52
-
+ - name: Check error.log
53
+ run: |
54
+ # Send requests & check log format
55
+ # Valid request
56
+ curl -s http://127.0.01/ > /dev/null || echo $?
57
+ # Invalid request
58
+ curl -s http://127.0.01/%2e%2f > /dev/null || echo $?
59
+ # Check log format
60
+ grep -F ModSecurity < /var/log/apache2/error.log | grep -vP "^\[[^\]]+\] \[security2:[a-z]+\] \[pid [0-9]+:tid [0-9]+\] (?:\[client [0-9.:]+\] )?ModSecurity" || exit 0
61
+ # grep -v succeeded => found some lines with invalid format
62
+ exit 1
0 commit comments