File tree 3 files changed +36
-0
lines changed
3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Semgrep
2
+
3
+ # Semgrep is a static analysis tool to lint code for patterns we want to forbid
4
+ # https://github.com/returntocorp/semgrep
5
+
6
+ permissions :
7
+ contents : read
8
+
9
+ on : [workflow_dispatch, pull_request, push]
10
+
11
+ concurrency :
12
+ group : ${{ github.workflow }}-${{ github.ref }}
13
+ cancel-in-progress : true
14
+
15
+ jobs :
16
+ lint :
17
+ name : Semgrep - Lint
18
+ runs-on : ubuntu-20.04
19
+ container :
20
+ image : returntocorp/semgrep
21
+ steps :
22
+ - name : Check out ockam repository
23
+ uses : actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
24
+ - name : Run Semgrep
25
+ # .semgrepignore is not processed outside of working directory. See https://github.com/returntocorp/semgrep/issues/5669
26
+ run : |
27
+ mv tools/semgrep/.semgrepignore . & \
28
+ semgrep --verbose --config="r2c" --config="tools/semgrep/rules/example.yaml"
Original file line number Diff line number Diff line change
1
+ .gitignore
Original file line number Diff line number Diff line change
1
+ rules :
2
+ - id : is-comparison
3
+ languages :
4
+ - python
5
+ message : The operator 'is' is for reference equality, not value equality! Use `==` instead!
6
+ pattern : $SOMEVAR is "..."
7
+ severity : ERROR
You can’t perform that action at this time.
0 commit comments