Skip to content

Commit 239a105

Browse files
committed
update(security): bump security tooling versions and parameters
1 parent 4a8faad commit 239a105

File tree

4 files changed

+25
-15
lines changed

4 files changed

+25
-15
lines changed

.github/workflows/security.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ env:
2929
jobs:
3030
check-bandit:
3131
name: "🦹‍♂️ Bandit"
32-
runs-on: ubuntu-22.04
32+
runs-on: ubuntu-latest
3333

3434
steps:
3535
- name: Get source code
@@ -43,8 +43,7 @@ jobs:
4343
cache-dependency-path: "requirements/security.txt"
4444

4545
- name: Install project requirements
46-
run: |
47-
python -m pip install -U pip setuptools wheel
46+
run: python -m pip install -U pip setuptools wheel
4847

4948
- name: Install security dependencies
5049
run: python -m pip install -U -r requirements/security.txt
@@ -54,7 +53,7 @@ jobs:
5453

5554
check-safety:
5655
name: "🛡 Safety PyUp"
57-
runs-on: ubuntu-22.04
56+
runs-on: ubuntu-latest
5857

5958
steps:
6059
- name: Get source code
@@ -68,11 +67,12 @@ jobs:
6867
cache-dependency-path: "requirements/security.txt"
6968

7069
- name: Install project requirements
71-
run: |
72-
python -m pip install -U pip setuptools wheel
70+
run: python -m pip install -U pip setuptools wheel
7371

7472
- name: Install security dependencies
7573
run: python -m pip install -U -r requirements/security.txt
7674

77-
- name: Run Safety check
78-
run: safety check --output text --short-report -r requirements/base.txt
75+
- name: Run Safety scan (pyupio)
76+
uses: pyupio/safety-action@v1
77+
with:
78+
api-key: ${{ secrets.SAFETY_API_KEY }}

.safety-project.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[project]
2+
id = qgis-deployment-cli
3+
url = /codebases/qgis-deployment-cli/findings
4+
name = qgis-deployment-cli

SECURITY.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,22 @@ Then open the `bandit_report.csv` file.
5656

5757
### Run Safety check
5858

59-
In a terminal:
59+
To run Safety CLI locally, an authenticated account is required:
60+
61+
```sh
62+
safety auth
63+
```
64+
65+
Then:
6066

6167
```sh
62-
safety check --full-report --output screen -r requirements/base.txt
68+
safety scan --full-report --output screen -r requirements/base.txt
6369
```
6470

65-
It's also possible to get results in a text format:
71+
It's also possible to get results as HTML:
6672

6773
```sh
68-
safety check --full-report --output text -r requirements/base.txt > safety_report.txt
74+
safety scan --full-report --output html -r requirements/base.txt > safety_report.html
6975
```
7076

71-
Then open the `safety_report.txt` file.
77+
Then open the `safety_report.html` file.

requirements/security.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
bandit>=1.7.5,<1.9
2-
safety>=2.3.5,<3.4
1+
bandit>=1.8.3,<2
2+
safety>=3.3.1,<4

0 commit comments

Comments
 (0)