]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
github-ci: check for duplicate SIDs in rules/
authorJason Ish <jason.ish@oisf.net>
Fri, 20 Nov 2020 15:15:37 +0000 (09:15 -0600)
committerVictor Julien <victor@inliniac.net>
Tue, 24 Nov 2020 14:07:40 +0000 (15:07 +0100)
.github/workflows/builds.yml

index dab8cfa69d8d35d4064cfade0ea436a52f5b1c72..f7a68210b0a12ac211e37f883d890966202cc41e 100644 (file)
@@ -116,6 +116,15 @@ jobs:
 
       - uses: actions/checkout@v2
 
+      # Prebuild check for duplicat SIDs
+      - name: Check for duplicate SIDs
+        run: |
+          dups=$(sed -n 's/^alert.*sid:\([[:digit:]]*\);.*/\1/p' ./rules/*.rules|sort|uniq -d|tr '\n' ' ')
+          if [[ "${dups}" != "" ]]; then
+            echo "::error::Duplicate SIDs found:${dups}"
+            exit 1
+          fi
+
       # Download and extract dependency archives created during prep
       # job.
       - uses: actions/download-artifact@v2