summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicolargo <nicolas@nicolargo.com>2021-04-20 19:25:41 +0200
committernicolargo <nicolas@nicolargo.com>2021-04-20 19:25:41 +0200
commit2e56ccac42a3c39332bb30c0f39c3a8f4bdc5df0 (patch)
treeff3d28c350e9e850c08359e7c4f9aea3372ab156
parentca3695ca4dd2eee5d28718fc3bbd9bb905751923 (diff)
Add Bandit to test
-rw-r--r--.bandit2
-rw-r--r--.github/workflows/test.yml12
2 files changed, 11 insertions, 3 deletions
diff --git a/.bandit b/.bandit
new file mode 100644
index 00000000..eb7ce63c
--- /dev/null
+++ b/.bandit
@@ -0,0 +1,2 @@
+[bandit]
+exclude: ./docs,./glances/outputs/static/node_modules
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 702a263b..a0cd40dc 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -5,7 +5,7 @@ name: test
on: [push]
jobs:
- build:
+ test:
runs-on: ubuntu-latest
strategy:
@@ -30,10 +30,16 @@ jobs:
- name: Lint with flake8
run: |
# Stop the build if there are Python syntax errors or undefined names
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=.git,./glances/outputs/static
+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=.git,./docs,./glances/outputs/static
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=.git,./glances/outputs/static
+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=.git,./docs,./glances/outputs/static
- name: Unitary tests
run: |
python ./unitest.py
+
+ - name: Security issues with Bandit
+ uses: jpetrucciani/bandit-check@master
+ with:
+ #path: '-r --exit-zero --skip B104 ./glances/'
+ path: '-r --exit-zero --skip B104 ./glances/' \ No newline at end of file