Skip to content

Commit

Permalink
remove semgrep because it is not executable without cloud account any…
Browse files Browse the repository at this point in the history
…more
  • Loading branch information
ekneg54 committed Nov 17, 2023
1 parent 31a686b commit b2b1004
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 86 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.devcontainer
.github
.venv
.semgrep_rules
.vscode
htmlcov
logs
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,6 @@ jobs:
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v2

- name: Check semgrep rules
if: steps.changed-files.outputs.all_changed_files
run: semgrep -c .semgrep_rules -c r/python --error --skip-unknown-extensions ${{ steps.changed-files.outputs.all_changed_files }}

containerbuild:
strategy:
matrix:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,3 @@ jobs:

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v2

- name: Check semgrep rules
if: steps.changed-files.outputs.all_changed_files
run: semgrep -c .semgrep_rules -c r/python --error --skip-unknown-extensions ${{ steps.changed-files.outputs.all_changed_files }}
39 changes: 0 additions & 39 deletions .semgrep_rules/logprep_specific/processor-rules.yml

This file was deleted.

1 change: 0 additions & 1 deletion .semgrepignore

This file was deleted.

14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,20 +311,6 @@ In case the requirements change, the test environments must be rebuilt with the
tox -e py310 -e py311 -e py312 -r
```
### Semgrep
If you want to run semgrep rules run
```
pip install semgrep
```
Afterwards you can just call the tox environment with for example
```
tox -e py310-semgrep
```
### Running Logprep
Depending on how you have installed Logprep you have different choices to run Logprep as well.
Expand Down
1 change: 0 additions & 1 deletion requirements_dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ pylint
pytest
pytest-cov
responses
semgrep
jinja2
9 changes: 1 addition & 8 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ attrs==23.1.0
# via
# -r ./requirements.txt
# aiohttp
# semgrep
black==23.11.0
# via -r ./requirements_dev.in
boto3==1.29.4
Expand Down Expand Up @@ -58,9 +57,7 @@ click==8.1.7
# black
# uvicorn
colorama==0.4.6
# via
# -r ./requirements.txt
# semgrep
# via -r ./requirements.txt
confluent-kafka==2.3.0
# via -r ./requirements.txt
coverage[toml]==7.3.2
Expand Down Expand Up @@ -213,7 +210,6 @@ pyyaml==6.0.1
# via
# -r ./requirements.txt
# responses
# semgrep
regex==2023.10.3
# via
# -r ./requirements.txt
Expand All @@ -225,7 +221,6 @@ requests==2.31.0
# opensearch-py
# requests-file
# responses
# semgrep
# tldextract
requests-file==1.5.1
# via
Expand All @@ -251,8 +246,6 @@ scipy==1.11.4
# via
# -r ./requirements.txt
# scikit-learn
semgrep==0.9.0
# via -r ./requirements_dev.in
six==1.16.0
# via
# -r ./requirements.txt
Expand Down
20 changes: 6 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[tox]
envlist = py{39,310,311}
envlist = py{310,311,312}
minversion = 3.9

[testenv]
deps = -rrequirements_dev.txt


[testenv:py{39,310,311}-unit]
[testenv:py{310,311,312}-unit]
description = Run unit-tests
usedevelop = True
deps = {[testenv]deps}
commands =
pytest -vv tests/unit {posargs}


[testenv:py{39,310,311}-acceptance]
[testenv:py{310,311,312}-acceptance]
description = Run acceptance-tests
usedevelop = True
deps =
Expand All @@ -24,7 +24,7 @@ commands =
pytest -vv -s tests/acceptance {posargs}


[testenv:py{39,310,311}-lint]
[testenv:py{310,311,312}-lint]
description = Run pylint to determine code-quality
usedevelop = True
deps = pylint
Expand All @@ -34,15 +34,7 @@ commands =
- pylint logprep


[testenv:py{37,38,39}-semgrep]
description = Run semgrep to detect any code issues
usedevelop = True
deps = semgrep
commands =
semgrep -c .semgrep_rules -c r/python --error --emacs


[testenv:py{39,310,311}-docs]
[testenv:py{310,311,312}-docs]
description = Build sphinx HTML documentation
changedir = doc
usedevelop = True
Expand All @@ -54,7 +46,7 @@ commands =
sphinx-apidoc -fT -o source/module_reference ../logprep
make clean html

[testenv:py{39,310,311}-all]
[testenv:py{310,311,312}-all]
description = Run all tests with coverage and lint
usedevelop = True
deps =
Expand Down

0 comments on commit b2b1004

Please sign in to comment.