Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Add bandit to CI

Adrián Chavesb8ef12cd4707
diff --git a/.bandit.yml b/.bandit.yml
new file mode 100644
index 000000000..00554587a
--- /dev/null
+++ b/.bandit.yml
@@ -0,0 +1,16 @@
+skips:
+- B101
+- B105
+- B303
+- B306
+- B307
+- B311
+- B320
+- B321
+- B402
+- B404
+- B406
+- B410
+- B503
+- B603
+- B605
diff --git a/.travis.yml b/.travis.yml
index 0e77af9fd..9f477e860 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,6 +7,8 @@ branches:
- /^\d\.\d+\.\d+(rc\d+|\.dev\d+)?$/
matrix:
include:
+ - env: TOXENV=security
+ python: 3.8
- env: TOXENV=flake8
python: 3.8
- env: TOXENV=pypy3
diff --git a/tox.ini b/tox.ini
index 3668058c3..cd575f3c5 100644
--- a/tox.ini
+++ b/tox.ini
@@ -62,6 +62,13 @@ basepython = pypy3
commands =
py.test {posargs:docs scrapy tests}
+[testenv:security]
+basepython = python3.8
+deps =
+ bandit
+commands =
+ bandit -r -c .bandit.yml {posargs:scrapy}
+
[testenv:flake8]
basepython = python3.8
deps =