Skip to content

Commit

Permalink
ci: move semgrep rules out of repo (backport #28067)
Browse files Browse the repository at this point in the history
* ci: move semgrep rules out of repo (#28067)

Moving semgrep rules out of repos as it's unnecessary to maintain
same ruleset for different repos and different branches.

(cherry picked from commit cc1baae)

# Conflicts:
#	.github/helper/semgrep_rules/frappe_correctness.py
#	.github/helper/semgrep_rules/frappe_correctness.yml
#	.github/helper/semgrep_rules/report.py
#	.github/helper/semgrep_rules/ux.py
#	.github/workflows/linters.yml

* fix: resolve conflicts

Co-authored-by: Ankush Menat <ankush@frappe.io>
  • Loading branch information
mergify[bot] and ankush authored Oct 22, 2021
1 parent 60620fe commit a082d70
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 304 deletions.
38 changes: 0 additions & 38 deletions .github/helper/semgrep_rules/README.md

This file was deleted.

34 changes: 0 additions & 34 deletions .github/helper/semgrep_rules/report.yml

This file was deleted.

6 changes: 0 additions & 6 deletions .github/helper/semgrep_rules/security.py

This file was deleted.

10 changes: 0 additions & 10 deletions .github/helper/semgrep_rules/security.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/helper/semgrep_rules/translate.js

This file was deleted.

61 changes: 0 additions & 61 deletions .github/helper/semgrep_rules/translate.py

This file was deleted.

64 changes: 0 additions & 64 deletions .github/helper/semgrep_rules/translate.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .github/helper/semgrep_rules/ux.js

This file was deleted.

30 changes: 0 additions & 30 deletions .github/helper/semgrep_rules/ux.yml

This file was deleted.

20 changes: 12 additions & 8 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: returntocorp/semgrep-action@v1
env:
SEMGREP_TIMEOUT: 120
with:
config: >-
r/python.lang.correctness
.github/helper/semgrep_rules

- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install and Run Pre-commit
uses: pre-commit/action@v2.0.0
uses: pre-commit/action@v2.0.3

- name: Download Semgrep rules
run: git clone --depth 1 https://github.com/frappe/frappe-semgrep-rules.git

- uses: returntocorp/semgrep-action@v1
env:
SEMGREP_TIMEOUT: 120
with:
config: >-
r/python.lang.correctness
./frappe-semgrep-rules/rules

0 comments on commit a082d70

Please sign in to comment.