From c999dba7b2504b4c2ddefa2d483c74daa806f050 Mon Sep 17 00:00:00 2001 From: Iakov GAN <82834333+iakov-aws@users.noreply.github.com> Date: Tue, 5 Sep 2023 12:25:16 +0300 Subject: [PATCH] Add pylint and fix CI (#616) --- .github/workflows/security-scan.yml | 26 ++++++++++++++++++++++---- .pylintrc | 11 +++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 .pylintrc diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml index d81f05b9..91a5e02b 100644 --- a/.github/workflows/security-scan.yml +++ b/.github/workflows/security-scan.yml @@ -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 diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 00000000..1cf145a3 --- /dev/null +++ b/.pylintrc @@ -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 \ No newline at end of file