Skip to content

Commit 0b64c65

Browse files
committed
feat: swap to syft/grype
1 parent eae498c commit 0b64c65

2 files changed

Lines changed: 22 additions & 9 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,18 @@ jobs:
3838
poetry version ${{ github.ref_name }}
3939
poetry publish --build
4040
poetry install --no-interaction --no-root --with dev,docs --extras "asyncio"
41-
poetry run jake ddt --output-format json -o bom.json --whitelist whitelist.json
4241
- name: update version
4342
uses: stefanzweifel/git-auto-commit-action@v4
4443
with:
4544
commit_message: Automatic version bump
4645
branch: main
4746
file_pattern: pyproject.toml
47+
- name: make sbom
48+
uses: anchore/sbom-action@v0
49+
with:
50+
file: poetry.lock
51+
format: cyclonedx-json
52+
output-file: "${{ github.event.repository.name }}-sbom.json"
4853
- name: build docs
4954
run: |
5055
mkdir gh-pages
@@ -58,10 +63,3 @@ jobs:
5863
with:
5964
branch: gh-pages
6065
folder: gh-pages
61-
- name: sbom
62-
uses: svenstaro/upload-release-action@v2
63-
with:
64-
repo_token: ${{ secrets.GITHUB_TOKEN }}
65-
file: bom.json
66-
asset_name: bom.json
67-
tag: ${{ github.ref }}

.github/workflows/test.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,22 @@ jobs:
5252
- name: run extra sanity checks
5353
run: |
5454
poetry run mypy
55-
poetry run jake ddt --whitelist whitelist.json
55+
# poetry run jake ddt --whitelist whitelist.json
56+
scan:
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: check out repository
60+
uses: actions/checkout@v4
61+
- name: make sbom
62+
uses: anchore/sbom-action@v0
63+
with:
64+
file: poetry.lock
65+
format: cyclonedx-json
66+
output-file: "${{ github.event.repository.name }}-sbom.json"
67+
- name: scan sbom
68+
uses: anchore/scan-action@v6
69+
with:
70+
sbom: "${{ github.event.repository.name }}-sbom.json"
5671
prerelease:
5772
runs-on: ubuntu-latest
5873
if: github.ref == 'refs/heads/main'

0 commit comments

Comments
 (0)