Skip to content

Commit

Permalink
ci: add security scan (#5068)
Browse files Browse the repository at this point in the history
  • Loading branch information
lengau authored Sep 30, 2024
1 parent 5ea2c39 commit 040b66c
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 4 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/security-scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Security scan
on:
pull_request:
push:
branches:
- main
- hotfix/*
- work/secscan # For development

jobs:
python-scans:
name: Scan Python project
uses: canonical/starflow/.github/workflows/scan-python.yaml@main
with:
packages: python-apt-dev
osv-extra-args: '--config=source/osv-scanner.toml'
trivy-extra-args: '--severity HIGH,CRITICAL --ignore-unfixed --skip-dirs "tests/spread/**"'
4 changes: 4 additions & 0 deletions osv-scanner.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[[IgnoredVulns]]
id = "CVE-2024-35195"
ignoreUntil = "2025-01-01T00:00:00Z"
reason = "Needed for requests-unixsocket, which we're replacing with requests-unixsocket2"
2 changes: 1 addition & 1 deletion requirements-devel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -199,5 +199,5 @@ yamllint==1.35.1
zipp==3.20.2
zope.deprecation==5.0
zope.interface==7.0.3
python-apt @ https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/python-apt/2.4.0ubuntu1/python-apt_2.4.0ubuntu1.tar.xz; sys.platform == "linux"
python-apt @ https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/python-apt/2.4.0ubuntu1/python-apt_2.4.0ubuntu1.tar.xz ; sys.platform == "linux"
pyinstaller==5.13.2; sys.platform == "win32"
2 changes: 1 addition & 1 deletion requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,4 @@ websockets==12.0
wheel==0.44.0
ws4py==0.5.1
zipp==3.20.2
python-apt @ https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/python-apt/2.4.0ubuntu1/python-apt_2.4.0ubuntu1.tar.xz; sys.platform == "linux"
python-apt @ https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/python-apt/2.4.0ubuntu1/python-apt_2.4.0ubuntu1.tar.xz ; sys.platform == "linux"
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ wadllib==1.3.6
wheel==0.44.0
ws4py==0.5.1
zipp==3.20.2
python-apt @ https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/python-apt/2.4.0ubuntu1/python-apt_2.4.0ubuntu1.tar.xz; sys.platform == "linux"
python-apt @ https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/python-apt/2.4.0ubuntu1/python-apt_2.4.0ubuntu1.tar.xz ; sys.platform == "linux"
2 changes: 1 addition & 1 deletion tools/freeze-requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ requirements_fixups() {

# Python apt library pinned to source.
sed -i '/python-apt=*/d' "$req_file"
echo 'python-apt @ https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/python-apt/2.4.0ubuntu1/python-apt_2.4.0ubuntu1.tar.xz; sys.platform == "linux"' >> "$req_file"
echo 'python-apt @ https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/python-apt/2.4.0ubuntu1/python-apt_2.4.0ubuntu1.tar.xz ; sys.platform == "linux"' >> "$req_file"

# https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1635463
sed -i '/pkg[-_]resources==0.0.0/d' "$req_file"
Expand Down

0 comments on commit 040b66c

Please sign in to comment.