Skip to content

Commit 1a8c39c

Browse files
authored
Merge pull request #106 from Gallaecio/bandit
Add bandit to CI
2 parents ffb931c + 83941be commit 1a8c39c

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

.bandit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
skips:
2+
- B101

.github/workflows/checks.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Checks
2+
on: [push, pull_request]
3+
4+
jobs:
5+
checks:
6+
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
include:
10+
- python-version: 3
11+
env:
12+
TOXENV: security
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
22+
- name: Run check
23+
env: ${{ matrix.env }}
24+
run: |
25+
pip install -U pip
26+
pip install -U tox
27+
tox

tox.ini

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
[tox]
2-
envlist = py
2+
envlist = security,py
33

44
[testenv]
55
deps=
66
-r tests/requirements.txt
77

88
commands =
99
py.test --cov-report term --cov=cssselect
10+
11+
[testenv:security]
12+
deps =
13+
bandit
14+
commands =
15+
bandit -r -c .bandit.yml {posargs:cssselect}

0 commit comments

Comments
 (0)