Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pylint and fix CI #616

Merged
merged 5 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions .github/workflows/security-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,33 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -U bandit pip-audit setuptools .
- name: Install cid-cmd
run: |
pip install -U .
- name: Bandit Scan
run: |
bandit -r .
- name: Install cid-cmd
run: |
pip install -U .
- name: Pip Audit
run: |
pip-audit
# GHSA-wfm5-v35h-vwf4 gitpython is a dependency of pip-audit not cid-cmd
# GHSA-cwvm-v4w8-q58c gitpython is a dependency of pip-audit not cid-cmd
pip-audit --ignore-vuln GHSA-wfm5-v35h-vwf4 --ignore-vuln GHSA-cwvm-v4w8-q58c

python-pylint-cid:
runs-on: ubuntu-latest
steps:
- name: Git clone the repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install cfn-lint
run: |
pip install pylint
- name: PyLint
run: |
pylint ./cid/

cfn-scan-cid:
runs-on: ubuntu-latest
Expand Down
11 changes: 11 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[MAIN]
fail-under=7.50 # not the same in github actions and on your pc

[FORMAT]
max-line-length=240

[MESSAGES CONTROL]
# Disabling some:
# W1203:logging-fstring-interpolation - No performance cosern
# W0511:fixme - widely used
disable=W1203,W0511