mirror of
https://github.com/RobustaStudio/semsec.git
synced 2026-11-27 07:47:03 +01:00
31 lines
677 B
YAML
31 lines
677 B
YAML
name: rules
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
- run: pip install semgrep
|
|
- name: Validate
|
|
run: |
|
|
for f in *.yaml; do
|
|
semgrep --validate --metrics=off --config "$f"
|
|
done
|
|
- name: Test
|
|
run: |
|
|
rc=0
|
|
for t in tests/*; do
|
|
rules="$(basename "${t%.*}").yaml"
|
|
echo "== $t -> $rules"
|
|
semgrep --test --metrics=off --config "$rules" "$t" || rc=1
|
|
done
|
|
exit $rc
|