File tree Expand file tree Collapse file tree 12 files changed +505
-435
lines changed Expand file tree Collapse file tree 12 files changed +505
-435
lines changed Original file line number Diff line number Diff line change 18
18
run: |
19
19
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python3 -
20
20
~/.local/bin/poetry config virtualenvs.create false
21
- ~/.local/bin/poetry install
21
+ ~/.local/bin/poetry sync
22
22
wget https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-amd64_linux.tar.xz
23
23
tar -xvf upx-4.0.2-amd64_linux.tar.xz
24
24
cp upx-4.0.2-amd64_linux/upx /usr/local/bin/
Original file line number Diff line number Diff line change 25
25
- name : Install poetry
26
26
run : |
27
27
python3 -m pip install poetry
28
- poetry install
28
+ poetry install --all-groups --all-extras
29
29
- name : Test binaries
30
30
run : |
31
31
mkdir -p bintests gobintests rusttests
Original file line number Diff line number Diff line change 28
28
python3 -m pip install setuptools pyinstaller poetry
29
29
cd blint
30
30
poetry config virtualenvs.create false
31
- poetry install --no-cache
31
+ poetry install --all-groups --all-extras -- no-cache
32
32
- name : Binary gnu build
33
33
run : |
34
34
cd blint
40
40
--add-data="blint/data/annotations:blint/data/annotations" \
41
41
--collect-submodules blint \
42
42
--collect-submodules symbolic \
43
+ --collect-submodules oras \
43
44
--noupx
44
45
./dist/blint -i dist/blint -o /tmp/reports
45
46
sha256sum ./dist/blint > ./dist/blint.sha256
Original file line number Diff line number Diff line change 41
41
run: |
42
42
python3 -m pip install twine setuptools wheel
43
43
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python3 -
44
- poetry install
44
+ poetry install --all-groups --all-extras
45
45
- name: Binary darwin build
46
46
run: |
47
47
poetry run pyinstaller blint/cli.py --noconfirm --log-level=WARN --nowindow --onefile --name blint --collect-all blint --osx-bundle-identifier ${PRODUCT_IDENTIFIER} --target-architecture x86_64 --codesign-identity ${CODESIGN_ID} --osx-entitlements-file Entitlements.plist --icon ./blint.icns
Original file line number Diff line number Diff line change 87
87
- name : Release PyPI
88
88
if : startsWith(github.ref, 'refs/tags/')
89
89
uses : pypa/gh-action-pypi-publish@release/v1
90
+
91
+ - name : Generate SBOM with cdxgen
92
+ run : |
93
+ npm install -g @cyclonedx/cdxgen
94
+ cdxgen -t python -o bom.json $(pwd) --profile research -p
95
+
96
+ - name : Upload bom to release
97
+ if : startsWith(github.ref, 'refs/tags/')
98
+ uses : softprops/action-gh-release@v2
99
+ with :
100
+ files : |
101
+ bom.json
102
+ env :
103
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 35
35
- name : Install poetry
36
36
run : |
37
37
python3 -m pip install poetry
38
- poetry install
38
+ poetry install --all-groups --all-extras
39
39
- name : Test with pytest
40
40
run : |
41
41
poetry run pytest --cov=blint tests
Original file line number Diff line number Diff line change @@ -28,11 +28,11 @@ jobs:
28
28
python -m pip install setuptools pyinstaller tzdata poetry
29
29
cd blint
30
30
poetry config virtualenvs.create false
31
- poetry install --no-cache --without dev
31
+ poetry install --all-groups --all-extras --no-cache
32
32
- name : Binary windows build
33
33
run : |
34
34
cd blint
35
- pyinstaller blint/cli.py --noconfirm --log-level=WARN --nowindow --onefile --name blint --add-data="blint/data;blint/data" --add-data="blint/data/annotations;blint/data/annotations" --collect-submodules blint --disable-windowed-traceback -i blint.ico --version-file=file_version_info.txt --noupx
35
+ pyinstaller blint/cli.py --noconfirm --log-level=WARN --nowindow --onefile --name blint --add-data="blint/data;blint/data" --add-data="blint/data/annotations;blint/data/annotations" --collect-submodules blint --collect-submodules oras -- disable-windowed-traceback -i blint.ico --version-file=file_version_info.txt --noupx
36
36
(Get-FileHash .\dist\blint.exe).hash | Out-File -FilePath .\dist\blint.exe.sha256
37
37
set PYTHONIOENCODING=UTF-8
38
38
.\dist\blint.exe -i .\dist\blint.exe -o reports --no-banner
Original file line number Diff line number Diff line change @@ -180,9 +180,11 @@ def build_parser():
180
180
choices = ["ghcr.io/appthreat/blintdb-vcpkg:v1" ,
181
181
"ghcr.io/appthreat/blintdb-vcpkg-arm64:v1" ,
182
182
"ghcr.io/appthreat/blintdb-vcpkg-darwin-arm64:v1" ,
183
+ "ghcr.io/appthreat/blintdb-vcpkg-musl:v1" ,
183
184
"ghcr.io/appthreat/blintdb-meson:v1" ,
184
185
"ghcr.io/appthreat/blintdb-meson-arm64:v1" ,
185
- "ghcr.io/appthreat/blintdb-meson-darwin-arm64:v1"
186
+ "ghcr.io/appthreat/blintdb-meson-darwin-arm64:v1" ,
187
+ "ghcr.io/appthreat/blintdb-meson-musl:v1" ,
186
188
],
187
189
default = BLINTDB_IMAGE_URL ,
188
190
help = f"Blintdb image url. Defaults to { BLINTDB_IMAGE_URL } . The environment variable `BLINTDB_IMAGE_URL` is an alternative way to set this value." ,
Original file line number Diff line number Diff line change 35
35
Technique ,
36
36
)
37
37
from blint .logger import console , LOG
38
- # This is different from generic ConnectionError
39
- from requests .exceptions import ConnectionError as RequestConnectionError
40
38
41
39
import oras .client
42
40
from oras .logger import setup_logger
@@ -245,7 +243,7 @@ def blintdb_setup(args):
245
243
)
246
244
os .environ ["USE_BLINTDB" ] = "true"
247
245
LOG .debug (f"Blintdb stored at { BLINTDB_HOME } " )
248
- except RequestConnectionError as e :
246
+ except Exception as e :
249
247
LOG .error (f"Blintdb Download failed: { e } " )
250
248
251
249
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- # poetry install
3
+ # poetry install --all-groups --all-extras
4
4
5
5
poetry run pyinstaller blint/cli.py --noconfirm --log-level=WARN --nowindow --onefile --name blint --collect-all blint --osx-bundle-identifier io.owasp-dep-scan.blint --target-architecture x86_64 --codesign-identity ${CODESIGN_ID} --osx-entitlements-file .builds/Entitlements.plist
You can’t perform that action at this time.
0 commit comments