Update nginx.yml

This commit is contained in:
fab
2025-01-07 19:06:41 +01:00
committed by GitHub
parent c7b9ec7241
commit bae9ce6bb3

View File

@@ -26,18 +26,18 @@ jobs:
run: | run: |
unzip nginx_waf.zip -d waf_rules unzip nginx_waf.zip -d waf_rules
echo "Extracted WAF rules into waf_rules directory" echo "Extracted WAF rules into waf_rules directory"
ls -lh waf_rules ls -lh waf_rules/waf_patterns/nginx/
- name: Verify WAF rules extraction - name: Verify WAF rules extraction
run: | run: |
if [ ! -d "waf_rules" ]; then if [ ! -d "waf_rules/waf_patterns/nginx" ]; then
echo "Error: WAF rules directory not found after extraction!" echo "Error: WAF rules directory not found after extraction!"
exit 1 exit 1
fi fi
if [ -z "$(ls -A waf_rules/*.conf 2>/dev/null)" ]; then if [ -z "$(ls -A waf_rules/waf_patterns/nginx/*.conf 2>/dev/null)" ]; then
echo "Error: No .conf files found in waf_rules!" echo "Error: No .conf files found in waf_rules/waf_patterns/nginx/"
echo "Contents of waf_rules:" echo "Contents of waf_rules/waf_patterns/nginx/:"
ls -l waf_rules ls -l waf_rules/waf_patterns/nginx/
exit 1 exit 1
fi fi
@@ -50,7 +50,7 @@ jobs:
- name: Combine Nginx configuration - name: Combine Nginx configuration
run: | run: |
cat tests/nginx.conf waf_rules/*.conf > combined_nginx.conf cat tests/nginx.conf waf_rules/waf_patterns/nginx/*.conf > combined_nginx.conf
echo "Combined Nginx configuration:" echo "Combined Nginx configuration:"
cat combined_nginx.conf cat combined_nginx.conf