Skip to content

Conversation

@almet
Copy link
Member

@almet almet commented Feb 11, 2025

This pull request introduces "independent container updates": sandbox images can now be updated without issuing a new release, allowing the reduce the time to patch the sandbox in use by Dangerzone users.

You can read more about the rationale at #1006.

Sandbox signatures are done via a hardware key, for which the public key is packaged alongside the shipped application.

On container installation, sandbox signatures are stored locally and checked against a known public key just before doing the conversion of the documents. Behind the curtain, it uses cosign, which enables us to have auditable signatures (so if somebody is to impersonate us, they would need to do so in public).

Graphical interface

The graphical interface has been updated to ask users if they want Dangerzone to check for container updates and apply them on their behalf. The updater_check setting is now deprecated and replaced by updater_icu_check.

image

image

Command-line interface

It adds a dangerzone-image CLI providing tooling to check for remote new images, verification of the attestations and signatures, also with the ability to create and use archives, for air-gapped environments.

$ dangerzone-image --help

  attest-provenance  Look up the image attestation to see if the image...
  get-manifest       Retrieves a remote manifest for a given image and...
  list-remote-tags   List the tags available for a given image.
  load-archive       Upgrade the local image to the one in the archive.
  prepare-archive    Prepare an archive to upgrade the dangerzone image...
  upgrade            Upgrade the image to the latest signed version.
  verify-local       Verify the local image signature against a public...

It is fixing the following issues:

Current progress

Before being ready to be shipped, we still need to:

Sorry, something went wrong.

@apyrgio
Copy link
Contributor

apyrgio commented Feb 19, 2025

I'm in the final stages of the review Alexis, but I just wanted to say: ✨ freaking awesome work ✨ ! There were several places in the code where I was like "oh neat!", but I didn't track them I'm afraid 😞 .

(there should be a 🤩 reaction or something for specific lines of code. it's a shame if reviews are just "here's one comment, and here's another one", and let good decisions not be rewarded or anything. Anyway, food for thought...)

Anyways, what I haven't reviewed yet is the airgapped logic, the docs, and the tests. I'll switch to updating the reproduce image script based on the repro-build work that I did, if that's ok with you.

@almet almet force-pushed the independent-container-updates branch 2 times, most recently from 2a56c7f to c39cd4e Compare April 16, 2025 11:14
@almet almet force-pushed the independent-container-updates branch 22 times, most recently from 11ff9f0 to 0a6492b Compare April 23, 2025 13:36
@almet almet force-pushed the independent-container-updates branch 2 times, most recently from bb8dd23 to cfc6a62 Compare July 29, 2025 12:01
almet and others added 19 commits July 30, 2025 14:01

Verified

This commit was signed with the committer’s verified signature.
almet Alexis M

Verified

This commit was signed with the committer’s verified signature.
almet Alexis M

Verified

This commit was signed with the committer’s verified signature.
almet Alexis M
- Update the release instructions
- Create a `RELEASE-SANDBOX.md` file documenting the sandbox release process

Verified

This commit was signed with the committer’s verified signature.
almet Alexis M

Verified

This commit was signed with the committer’s verified signature.
almet Alexis M
To avoid computing it twice in the same run

Verified

This commit was signed with the committer’s verified signature.
almet Alexis M

Verified

This commit was signed with the committer’s verified signature.
almet Alexis M
It's originally intended as a way to help the users debug any issues
with the registry, but isn't otherwise used in Dangerzone itself.

Rather than taking this route, we are thinking about embedding a tool
like crane or regctl inside Dangerzone.

The discussion can be followed at #1186.

Verified

This commit was signed with the committer’s verified signature.
almet Alexis M
When doing `dangerzone-image prepare-archive`, ensure the downloaded
archive matches the expected public key, and bail out if not.

Verified

This commit was signed with the committer’s verified signature.
almet Alexis M

Verified

This commit was signed with the committer’s verified signature.
almet Alexis M
This helps to understand all the logic.

Verified

This commit was signed with the committer’s verified signature.
almet Alexis M

Verified

This commit was signed with the committer’s verified signature.
almet Alexis M

Verified

This commit was signed with the committer’s verified signature.
almet Alexis M

Verified

This commit was signed with the committer’s verified signature.
almet Alexis M
Add an environment variable (DANGERZONE_BYPASS_SIG_CHECKS) that
instructs Dangerzone to bypass any signature checking. This way, we can
use local image builds for testing, which have not been signed with
`cosign`, nor uploaded to a container registry.

Verified

This commit was signed with the committer’s verified signature.
almet Alexis M

Verified

This commit was signed with the committer’s verified signature.
almet Alexis M

Verified

This commit was signed with the committer’s verified signature.
almet Alexis M

Verified

This commit was signed with the committer’s verified signature.
almet Alexis M

Verified

This commit was signed with the committer’s verified signature.
almet Alexis M
@almet almet force-pushed the independent-container-updates branch from a03d44b to 29a3a9b Compare July 30, 2025 12:02
@almet almet changed the base branch from main to test/main-icu July 30, 2025 12:06
@almet
Copy link
Member Author

almet commented Jul 30, 2025

✔️ The CI for the Independent Container Updates is now green.

I've just updated the base branch to be test/main-icu, which will be the base branch for all ICU-related changes starting now, and so I believe we're good to merge this.

@apyrgio let me know if I can merge!

@apyrgio
Copy link
Contributor

apyrgio commented Jul 31, 2025

BlueGreen is the warmest color 🥹

The diff from the stored version of ICU that I had locally looks ok to me. If there's anything CI-related that you wanna bring to my attention, let me know. Else, feel free to merge!

@almet almet merged commit d4c267a into test/main-icu Jul 31, 2025
63 checks passed
@almet almet deleted the independent-container-updates branch July 31, 2025 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

None yet

4 participants