Skip to content

Commit e3d11d4

Browse files
authored
Merge pull request #294 from MerginMaps/pyapi_pipeline_checks
Pyapi pipeline checks
2 parents bdbff66 + 948858a commit e3d11d4

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Python-api QA (Security & Style)
2+
3+
# Trigger the workflow on every push
4+
on: [push]
5+
6+
jobs:
7+
quality-assurance:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v4
12+
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: '3.9'
17+
18+
- name: Install dependencies
19+
run: |
20+
# Upgrade pip and install security/linting tools
21+
python -m pip install --upgrade pip
22+
pip install bandit detect-secrets
23+
24+
# - name: Install dependencies
25+
# run: |
26+
# # Upgrade pip and install security/linting tools
27+
# python -m pip install --upgrade pip
28+
# pip install bandit detect-secrets flake8 flake8-json
29+
30+
- name: Run Bandit (Security Scan)
31+
# Scan the mergin folder for vulnerabilities, excluding the test directory
32+
run: bandit -r ./mergin/ -ll --exclude ./mergin/test
33+
34+
- name: Run Detect Secrets
35+
# Scan the plugin directory for hardcoded secrets/credentials
36+
run: detect-secrets scan ./mergin/ --all-files
37+
38+
# - name: Run Flake8 (Style Check)
39+
# # Style enforcement using MerginMaps standards
40+
# # Ignoring E501 (line length) and W503 (operator line breaks)
41+
# run: |
42+
# flake8 ./mergin/ --max-line-length=120 --ignore=E501,W503 --exclude=test

0 commit comments

Comments
 (0)