Skip to content

Commit 3171b66

Browse files
authored
Merge pull request #53 from ajinabraham/3.1.4
Make semgrep optional, also update actions.
2 parents 21f98eb + ed4476c commit 3171b66

File tree

7 files changed

+19
-11
lines changed

7 files changed

+19
-11
lines changed

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@v3
27+
uses: actions/checkout@v4.2.2
2828

2929
- name: Initialize CodeQL
3030
uses: github/codeql-action/init@v2

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4.2.2
1414
- name: Set up Python
15-
uses: actions/setup-python@v3
15+
uses: actions/setup-python@v5.3.0
1616
with:
1717
python-version: '3.x'
1818
- name: Install dependencies

.github/workflows/python_test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
python-version: ['3.10', '3.11', '3.12']
2020

2121
steps:
22-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4.2.2
2323
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v3
24+
uses: actions/setup-python@v5.3.0
2525
with:
2626
python-version: ${{ matrix.python-version }}
2727
- name: Install dependencies
@@ -33,7 +33,7 @@ jobs:
3333
tox -e lint
3434
- name: Install libsast
3535
run: |
36-
poetry install --no-interaction --no-ansi
36+
poetry install --no-interaction --no-ansi --with semgrep
3737
- name: Bandit Scan
3838
run: |
3939
poetry run bandit -ll libsast -r

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ Made with ![Love](https://cloud.githubusercontent.com/assets/4301109/16754758/82
1717

1818
## Install
1919

20-
`pip install libsast`
20+
```bash
21+
pip install semgrep==1.86.0 #For semgrep support
22+
pip install libsast
23+
```
2124

2225
Pattern Matcher is cross-platform, but Semgrep supports only Mac and Linux.
2326

libsast/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
__title__ = 'libsast'
1313
__authors__ = 'Ajin Abraham'
1414
__copyright__ = f'Copyright {year} Ajin Abraham, opensecurity.in'
15-
__version__ = '3.1.3'
15+
__version__ = '3.1.4'
1616
__version_info__ = tuple(int(i) for i in __version__.split('.'))
1717
__all__ = [
1818
'Scanner',

poetry.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "libsast"
3-
version = "3.1.3"
3+
version = "3.1.4"
44
description = "A generic SAST library built on top of semgrep and regex"
55
keywords = ["libsast", "SAST", "Python SAST", "SAST API", "Regex SAST", "Pattern Matcher"]
66
authors = ["Ajin Abraham <ajin@opensecurity.in>"]
@@ -26,9 +26,14 @@ libsast = "libsast.__main__:main"
2626
python = "^3.8"
2727
requests = "*"
2828
pyyaml = ">=6.0"
29-
semgrep = {version = "1.86.0", markers = "sys_platform != 'win32'"}
3029
billiard = "^4.2.1"
3130

31+
[tool.poetry.group.semgrep]
32+
optional = true
33+
34+
[tool.poetry.group.semgrep.dependencies]
35+
semgrep = {version = "1.86.0", markers = "sys_platform != 'win32'"}
36+
3237
[tool.poetry.group.dev.dependencies]
3338
bandit = "*"
3439
pytest = "*"

0 commit comments

Comments
 (0)