Skip to content
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
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
permissions:
contents: write
security-events: write
attestations: write
id-token: write

steps:
- name: "Harden the runner (Block egress traffic: Only allow calls to allowed endpoints)"
Expand All @@ -42,6 +44,9 @@ jobs:
community.chocolatey.org:80
packages.chocolatey.org:443
api.nuget.org:443
fulcio.sigstore.dev:443
rekor.sigstore.dev:443
tuf-repo-cdn.sigstore.dev:443

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
Expand Down Expand Up @@ -117,6 +122,22 @@ jobs:
path: ${{ github.workspace }}\.clcache
key: ${{ steps.clcache-restore.outputs.cache-primary-key }}

- name: Find SBOM path
id: find-sbom
shell: bash
run: |
SBOM=$(find build/dfetch-package -name '*.cdx.json' -maxdepth 1 | head -1)
echo "path=$SBOM" >> "$GITHUB_OUTPUT"
- name: Attest binary packages with SBOM
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
with:
subject-path: |
build/dfetch-package/*.deb
build/dfetch-package/*.rpm
build/dfetch-package/*.pkg
build/dfetch-package/*.msi
predicate-type: 'https://cyclonedx.org/bom'
predicate-path: ${{ steps.find-sbom.outputs.path }}
- name: Store the distribution packages
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
permissions:
contents: write
security-events: write
attestations: write
id-token: write
with:
release_id: ${{ needs.prep-release.outputs.release_id }}

Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest
permissions:
contents: read
attestations: write
id-token: write

steps:
- name: "Harden the runner (Block egress traffic: Only allow calls to allowed endpoints)"
Expand All @@ -30,6 +34,9 @@ jobs:
release-assets.githubusercontent.com:443
pypi.org:443
files.pythonhosted.org:443
fulcio.sigstore.dev:443
rekor.sigstore.dev:443
tuf-repo-cdn.sigstore.dev:443

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
Expand All @@ -50,6 +57,17 @@ jobs:
with:
name: python-package-distributions
path: dist/
- name: Find SBOM path
id: find-sbom
run: |
SBOM=$(find dist-sbom -name '*.cdx.json' -maxdepth 1 | head -1)
echo "path=$SBOM" >> "$GITHUB_OUTPUT"
- name: Attest Python distribution with SBOM
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
with:
subject-path: 'dist/*.whl,dist/*.tar.gz'
predicate-type: 'https://cyclonedx.org/bom'
predicate-path: ${{ steps.find-sbom.outputs.path }}
- name: Store the SBOM
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
Expand Down
16 changes: 16 additions & 0 deletions doc/tutorials/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,19 @@ Run the following command to verify the installation
$ dfetch environment

.. asciinema:: ../asciicasts/environment.cast

Verifying release integrity
---------------------------

Every dfetch release artifact is published with a `cryptographic attestation`_ that ties
it to the SBOM describing its dependencies. You can verify any downloaded artifact using
the GitHub CLI:

.. code-block:: console

$ gh attestation verify dfetch-<version>-nix.deb --repo dfetch-org/dfetch

See `GitHub artifact attestations`_ for more information on how attestations work.

.. _`cryptographic attestation`: https://docs.github.com/en/actions/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-to-establish-provenance-for-builds
.. _`GitHub artifact attestations`: https://docs.github.com/en/actions/security-for-github-actions/using-artifact-attestations
Loading