From ba72f79990259db7c9f59745f94de1beb9420726 Mon Sep 17 00:00:00 2001 From: fab Date: Fri, 3 Jan 2025 13:45:28 +0100 Subject: [PATCH] Update update_patterns.yml --- .github/workflows/update_patterns.yml | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/.github/workflows/update_patterns.yml b/.github/workflows/update_patterns.yml index 52adec7..3301679 100644 --- a/.github/workflows/update_patterns.yml +++ b/.github/workflows/update_patterns.yml @@ -65,30 +65,14 @@ jobs: run: | python badbots.py continue-on-error: false - - - name: 📊 Count Rules for Each Web Server - id: count_rules - run: | - NGINX_RULES=$(grep -c '^' waf_patterns/nginx/*.conf || echo 0) - APACHE_RULES=$(grep -c '^' waf_patterns/apache/*.conf || echo 0) - TRAEFIK_RULES=$(grep -c '^' waf_patterns/traefik/*.conf || echo 0) - HAPROXY_RULES=$(grep -c '^' waf_patterns/haproxy/*.conf || echo 0) - echo "nginx_rules=$NGINX_RULES" >> $GITHUB_OUTPUT - echo "apache_rules=$APACHE_RULES" >> $GITHUB_OUTPUT - echo "traefik_rules=$TRAEFIK_RULES" >> $GITHUB_OUTPUT - echo "haproxy_rules=$HAPROXY_RULES" >> $GITHUB_OUTPUT - + # Ensure conf files are pushed even if no changes detected - name: 🚀 Commit and Push OWASP WAF patterns run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git add . - git commit -m "Update: [$(date)] - Nginx Rules: ${{ steps.count_rules.outputs.nginx_rules }} - Apache Rules: ${{ steps.count_rules.outputs.apache_rules }} - Traefik Rules: ${{ steps.count_rules.outputs.traefik_rules }} - HAProxy Rules: ${{ steps.count_rules.outputs.haproxy_rules }}" + git commit -m "Update: [$(date)]" || echo "No changes to commit" git push continue-on-error: true # Continue even if no changes are made