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
2 changes: 2 additions & 0 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ jobs:
--oci build/sovereign-image/evidence/oci/pihole-arm64.oci.tar \
--llama-env image-builder/sovereign/llama-image.env \
--llama-oci build/sovereign-image/evidence/oci/llama-arm64.oci.tar \
--searxng-env image-builder/sovereign/searxng-image.env \
--searxng-oci build/sovereign-image/evidence/oci/searxng-arm64.oci.tar \
--output-dir build/update-release \
--key-id "$UPDATE_KEY_ID" \
--artifact-base-url "https://github.com/sovereignfs/sovereign-os/releases/download/v${RELEASE_VERSION}" \
Expand Down
15 changes: 15 additions & 0 deletions docs/research/searxng-signed-release-qualification-assessment.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,21 @@ pass tests real gaps, not ones already known and fixable from a desk.
900-second per-image timeout, and real rollback behavior on a real
failure mid-multi-image-import are all unverified.

**Finding 5 (2026-08-22, found while preparing to actually trigger a real
qualification build) — `build-image.yml` itself would have failed
`build_update_candidate=true` outright.** `create-update-release.py`'s
`--searxng-env`/`--searxng-oci` are `required=True` (added alongside
Finding 4's fix), but the workflow's "Package unsigned appliance update
candidate" step was never updated to pass them — it still only passed
`--pihole-env`/`--oci`/`--llama-env`/`--llama-oci`. A real
`workflow_dispatch` run would have hit an `argparse` error and failed
before producing anything. Fixed by adding the two missing flags to the
workflow step; guarded against recurring with
`test_workflow_passes_every_image_component_flag_to_create_update_release`,
which diffs the script's actual required arguments against the
workflow's invocation rather than hardcoding a fixed flag list (so a
future fourth component gets the same protection automatically).

## Recommendation

Treat this as sufficient prep work for now; do not attempt the CI
Expand Down
26 changes: 26 additions & 0 deletions tests/test_update_release.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import base64
import json
import os
import re
import shutil
import stat
import subprocess
Expand Down Expand Up @@ -325,6 +326,31 @@ def test_workflow_packages_update_before_upload(self):
workflow[image_upload:update_upload],
)

def test_workflow_passes_every_image_component_flag_to_create_update_release(self):
# create-update-release.py's --searxng-env/--searxng-oci are
# required=True (see test_creates_and_signs_installable_release_inputs),
# but nothing enforced that build-image.yml's own invocation
# actually passed them -- SearXNG was wired into the script
# without the workflow step ever being updated to match, which
# would have failed workflow_dispatch outright the first time
# build_update_candidate=true was ever exercised for real. This
# asserts the workflow step and the script's required arguments
# can never drift apart silently again.
workflow = (ROOT / ".github/workflows/build-image.yml").read_text()
package_start = workflow.index("Package unsigned appliance update candidate")
package_end = workflow.index("\n\n #", package_start)
package_step = workflow[package_start:package_end]

script = (ROOT / "scripts/create-update-release.py").read_text()
required_flags = re.findall(
r'parser\.add_argument\("(--[a-z-]+)", (?:type=pathlib\.Path, )?required=True\)',
script,
)
self.assertIn("--searxng-env", required_flags)
self.assertIn("--searxng-oci", required_flags)
for flag in required_flags:
self.assertIn(flag, package_step, f"{flag} is required but missing from build-image.yml")

def test_workflow_builds_and_packages_base_os_candidate_before_upload(self):
workflow = (ROOT / ".github/workflows/build-image.yml").read_text()

Expand Down
Loading