Skip to content

chg: add rule parse check #36

chg: add rule parse check

chg: add rule parse check #36

name: Rule parse error check
on:
pull_request:
workflow_call:
jobs:
rule-parse-error-check:
runs-on: ubuntu-latest
steps:
- name: clone hayabusa rule repo
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
path: hayabusa-rules
- name: clone hayabusa
uses: actions/checkout@v3
with:
repository: Yamato-Security/hayabusa
submodules: recursive
path: hayabusa
- name: clone hayabusa-sample-evtx
uses: actions/checkout@v3
with:
repository: Yamato-Security/hayabusa-sample-evtx
path: hayabusa-sample-evtx

Check failure on line 29 in .github/workflows/rule-parse-error-check.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/rule-parse-error-check.yaml

Invalid workflow file

You have an error in your yaml syntax on line 29
- name: run csv-timeline
run: |
cd hayabusa
git fetch --prune --unshallow
LATEST_VER=`git describe --tags --abbrev=0`
URL="https://github.com/Yamato-Security/hayabusa/releases/download/${LATEST_VER}/hayabusa-${LATEST_VER#v}-linux.zip"
mkdir tmp
cd tmp
curl -OL $URL
unzip *.zip
chmod +x hayabusa-${LATEST_VER#v}-lin-x64-gnu
./hayabusa-${LATEST_VER#v}-lin-x64-gnu csv-timeline -d ../../hayabusa-sample-evtx -r ../../hayabusa-rules -w -o out.csv
  if [ ! -f "out.csv" ]; then exit 1 ; fi
./hayabusa-${LATEST_VER#v}-lin-x64-gnu csv-timeline -d ../../hayabusa-sample-evtx -r ../../hayabusa-rules -w -o out.csv -C | grep "Rule parsing error" | wc -l | grep 0