Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify how we generate sbom files #6211

Merged
merged 4 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions .github/workflows/package-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ jobs:
run: python packaging/wheel/wheel_it.py . --output dist --skip-wheel

# Install syft
- uses: taiki-e/install-action@486baeb8af63bc3d9ec3ec66db5af6ba0ca78774 # pin v2.11.6
- uses: taiki-e/install-action@8984d603c208823d3c1a1b796f4081736f3ae3f9 # pin v2.11.6
with:
tool: syft@0.84.0
tool: syft@0.101.1

- name: Generate SBOM
run: syft packages --config=.syft.yaml --output=spdx-json=dist/Parsec-SBOM-Wheel-${{ matrix.platform }}.spdx.json .
run: syft scan --config=.syft.yaml --output=spdx-json=dist/Parsec-SBOM-${{ matrix.platform }}-Wheel.spdx.json --output=cyclonedx-json=dist/Parsec-SBOM-${{ matrix.platform }}-Wheel.cyclonedx.json .

- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin v3.1.2
with:
Expand Down Expand Up @@ -209,19 +209,20 @@ jobs:
run: snapcraft --destructive-mode

# Install syft
- uses: taiki-e/install-action@486baeb8af63bc3d9ec3ec66db5af6ba0ca78774 # pin v2.11.6
- uses: taiki-e/install-action@8984d603c208823d3c1a1b796f4081736f3ae3f9 # pin v2.11.6
with:
tool: syft@0.84.0
tool: syft@0.101.1

- name: Generate SBOM
run: syft packages --config=.syft.yaml --output=spdx-json=${{ runner.temp }}/Parsec-SBOM-linux-snap.spdx.json .
run: syft scan --config=.syft.yaml --output=spdx-json=${{ runner.temp }}/Parsec-SBOM-linux-snap.spdx.json --output=cyclonedx-json=${{ runner.temp }}/Parsec-SBOM-linux-snap.cyclonedx.json .

- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin v3.1.2
with:
name: ${{ runner.os }}-${{ runner.arch }}-snap
path: |
${{ runner.temp }}/parsec*.snap
${{ runner.temp }}/Parsec-SBOM-linux-snap.spdx.json
${{ runner.temp }}/Parsec-SBOM-linux-snap.cyclonedx.json
if-no-files-found: error

package-linux-test-snap:
Expand Down Expand Up @@ -322,19 +323,20 @@ jobs:
working-directory: ${{ runner.temp }}

# Install syft
- uses: taiki-e/install-action@486baeb8af63bc3d9ec3ec66db5af6ba0ca78774 # pin v2.11.6
- uses: taiki-e/install-action@8984d603c208823d3c1a1b796f4081736f3ae3f9 # pin v2.11.6
with:
tool: syft@0.84.0
tool: syft@0.101.1

- name: Generate SBOM
run: syft packages --config=.syft.yaml --output=spdx-json=${{ runner.temp }}/Parsec-SBOM-windows-app.spdx.json .
run: syft scan --config=.syft.yaml --output=spdx-json=${{ runner.temp }}/Parsec-SBOM-windows-app.spdx.json --output=cyclonedx-json=${{ runner.temp }}/Parsec-SBOM-windows-app.cyclonedx.json .

- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin v3.1.2
with:
name: ${{ runner.os }}-${{ runner.arch }}-installer
path: |
${{ runner.temp }}/${{ steps.names.outputs.archive }}
${{ runner.temp }}/Parsec-SBOM-windows-app.spdx.json
${{ runner.temp }}/Parsec-SBOM-windows-app.cyclonedx.json
if-no-files-found: error

package-macos-build-app:
Expand Down Expand Up @@ -378,19 +380,20 @@ jobs:
working-directory: ${{ runner.temp }}

# Install syft
- uses: taiki-e/install-action@486baeb8af63bc3d9ec3ec66db5af6ba0ca78774 # pin v2.11.6
- uses: taiki-e/install-action@8984d603c208823d3c1a1b796f4081736f3ae3f9 # pin v2.11.6
with:
tool: syft@0.84.0
tool: syft@0.101.1

- name: Generate SBOM
run: syft packages --config=.syft.yaml --output=spdx-json=${{ runner.temp }}/Parsec-SBOM-macos-app.spdx.json .
run: syft scan --config=.syft.yaml --output=spdx-json=${{ runner.temp }}/Parsec-SBOM-macos-app.spdx.json --output=cyclonedx-json=${{ runner.temp }}/Parsec-SBOM-macos-app.cyclonedx.json .

- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin v3.1.2
with:
name: ${{ runner.os }}-${{ runner.arch }}-installer
path: |
${{ runner.temp }}/parsec-unsigned-v${{ env.WHEEL_VERSION }}-macos-amd64.tar.bz2
${{ runner.temp }}/Parsec-SBOM-macos-app.spdx.json
${{ runner.temp }}/Parsec-SBOM-macos-app.cyclonedx.json
if-no-files-found: error

package-macos-test-app:
Expand Down
51 changes: 36 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ outcome = "^1.1"
# Backend-only requirements

async_generator = { version="^1.10", optional=true }
jinja2 = { version="^3.0", optional=true }
jinja2 = {version = "3.1.3", optional = true}
# Quart
quart-trio = { version="^0.10.0", optional=true }
quart = { version="^0.18.1", optional=true }
Expand Down Expand Up @@ -192,6 +192,9 @@ test-command = "parsec --version && parsec core list_devices"
# For this reason we force $PATH to contain Rust bin dir.
PATH = "$PATH:$HOME/.cargo/bin"

[tool.cibuildwheel.linux]
before-build = "python -m pip install -U pip && yum install -y perl-IPC-Cmd"

[tool.ruff]
line-length = 100
target-version = "py39"
Expand Down
Loading