mirror of
https://github.com/fabriziosalmi/patterns.git
synced 2025-12-18 10:15:51 +00:00
Update nginx.yml
This commit is contained in:
parent
96c634addc
commit
5b72b65ab9
16
.github/workflows/nginx.yml
vendored
16
.github/workflows/nginx.yml
vendored
@ -34,7 +34,7 @@ jobs:
|
|||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -r patterns/requirements.txt
|
pip install -r requirements.txt # <-- Correct path to requirements.txt
|
||||||
|
|
||||||
# Step 5: Validate Python dependencies
|
# Step 5: Validate Python dependencies
|
||||||
- name: Validate Python dependencies
|
- name: Validate Python dependencies
|
||||||
@ -45,36 +45,30 @@ jobs:
|
|||||||
# Step 6: Run OWASP scraper
|
# Step 6: Run OWASP scraper
|
||||||
- name: Run OWASP scraper
|
- name: Run OWASP scraper
|
||||||
run: python owasp.py
|
run: python owasp.py
|
||||||
working-directory: patterns
|
|
||||||
continue-on-error: false # Fail the workflow if this step fails
|
|
||||||
|
|
||||||
# Step 7: Validate OWASP scraper output
|
# Step 7: Validate OWASP scraper output
|
||||||
- name: Validate OWASP scraper output
|
- name: Validate OWASP scraper output
|
||||||
run: |
|
run: |
|
||||||
if [ -f "patterns/waf_patterns/nginx/*.conf" ]; then
|
if [ -f "waf_patterns/nginx/*.conf" ]; then
|
||||||
echo "OWASP scraper output validated successfully."
|
echo "OWASP scraper output validated successfully."
|
||||||
else
|
else
|
||||||
echo "Error: No Nginx configuration files found."
|
echo "Error: No Nginx configuration files found."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
working-directory: patterns
|
|
||||||
|
|
||||||
# Step 8: Convert OWASP rules to Nginx config
|
# Step 8: Convert OWASP rules to Nginx config
|
||||||
- name: Convert OWASP rules to Nginx config
|
- name: Convert OWASP rules to Nginx config
|
||||||
run: python owasp2nginx.py
|
run: python owasp2nginx.py
|
||||||
working-directory: patterns
|
|
||||||
continue-on-error: false # Fail the workflow if this step fails
|
|
||||||
|
|
||||||
# Step 9: Validate Nginx config files
|
# Step 9: Validate Nginx config files
|
||||||
- name: Validate Nginx config files
|
- name: Validate Nginx config files
|
||||||
run: |
|
run: |
|
||||||
if [ -f "patterns/waf_patterns/nginx/*.conf" ]; then
|
if [ -f "waf_patterns/nginx/*.conf" ]; then
|
||||||
echo "Nginx configuration files validated successfully."
|
echo "Nginx configuration files validated successfully."
|
||||||
else
|
else
|
||||||
echo "Error: No Nginx configuration files found."
|
echo "Error: No Nginx configuration files found."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
working-directory: patterns
|
|
||||||
|
|
||||||
# Step 10: Install Nginx
|
# Step 10: Install Nginx
|
||||||
- name: Install Nginx
|
- name: Install Nginx
|
||||||
@ -90,9 +84,7 @@ jobs:
|
|||||||
|
|
||||||
# Step 12: Import Nginx config
|
# Step 12: Import Nginx config
|
||||||
- name: Import Nginx config
|
- name: Import Nginx config
|
||||||
run: python import2nginx.py
|
run: python import_nginx_waf.py # <-- Correct script name
|
||||||
working-directory: patterns
|
|
||||||
continue-on-error: false # Fail the workflow if this step fails
|
|
||||||
|
|
||||||
# Step 13: Validate Nginx configuration
|
# Step 13: Validate Nginx configuration
|
||||||
- name: Validate Nginx configuration
|
- name: Validate Nginx configuration
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user