-
Notifications
You must be signed in to change notification settings - Fork 19
50 lines (47 loc) · 1.96 KB
/
semgrep-rule-lints.yaml
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Based off https://github.com/returntocorp/semgrep-rules/blob/develop/.github/workflows/semgrep-rule-lints.yaml
name: semgrep-rule-lints
on:
pull_request:
push:
branches: [main]
jobs:
semgrep:
runs-on: ubuntu-latest
name: semgrep-rule-lints
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: install semgrep
run: pip3 install semgrep
- name: lints for semgrep rules
run: |
semgrep \
--error \
--config r/yaml.semgrep.duplicate-id \
--config r/yaml.semgrep.duplicate-pattern \
--config r/yaml.semgrep.unsatisfiable \
--config r/yaml.semgrep.empty-message \
--config r/yaml.semgrep.missing-message-field \
--config r/yaml.semgrep.missing-language-field \
--config r/yaml.semgrep.metadata-confidence \
--config r/yaml.semgrep.metadata-likelihood \
--config r/yaml.semgrep.metadata-impact \
--config r/yaml.semgrep.metadata-subcategory \
--config r/yaml.semgrep.metadata-confidence-incorrect-value \
--config r/yaml.semgrep.metadata-likelihood-incorrect-value \
--config r/yaml.semgrep.metadata-impact-incorrect-value \
--config r/yaml.semgrep.metadata-subcategory-incorrect-value \
--config r/yaml.semgrep.metadata-technology \
--config r/yaml.semgrep.metadata-category \
--config r/yaml.semgrep.multi-line-message \
--config r/yaml.semgrep.message-whitespace \
--config r/yaml.semgrep.metadata-deepsemgrep \
--config r/yaml.semgrep.slow-pattern-top-ellipsis \
--config r/yaml.semgrep.rule-missing-deconstructed-value \
--exclude *.test.yaml \
--exclude contrib/ \
--exclude stats/ \
--exclude fingerprints/ \
--exclude yaml/semgrep/