-
Notifications
You must be signed in to change notification settings - Fork 33
32 lines (32 loc) · 1.09 KB
/
semgrep-rules-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: semgrep-rules-test
on:
pull_request:
push:
branches:
- main
jobs:
semgrep-rules-test:
name: run semgrep rules tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: installation
run: |
python -m pip install --upgrade pip
python3 -m pip install semgrep
python3 -m pip install jsonschema pyyaml
- name: validations
run: semgrep --validate --config .
- name: tests
run: semgrep --test --test-ignore-todo
- name: metadata-tests
run: |
wget https://raw.githubusercontent.com/returntocorp/semgrep-rules/c5ad4bb0f4c7ee5b8cd47276b582e8bb57bd0a4d/.github/scripts/validate-metadata.py
wget https://raw.githubusercontent.com/returntocorp/semgrep-rules/develop/metadata-schema.yaml.schm
python ./validate-metadata.py -s ./metadata-schema.yaml.schm -f .
- name: rules-tests
run: semgrep --config="r/yaml.semgrep" --severity ERROR .