Skip to content

Harden Mysterium APT repository configuration and legacy source detection - #6235

Open
eflipper13 wants to merge 2 commits into
mysteriumnetwork:masterfrom
eflipper13:fix/6234-apt-repository-hardening
Open

eflipper13 wants to merge 2 commits into
mysteriumnetwork:masterfrom
eflipper13:fix/6234-apt-repository-hardening

Conversation

@eflipper13

Copy link
Copy Markdown

Closes #6234

Summary

  • Configure the official Mysterium APT repository over HTTPS.
  • Verify the expected primary signing-key fingerprint.
  • Use a dedicated APT keyring with signed-by.
  • Support stable, snapshot and testnet3 channels.
  • Preserve unrelated Launchpad repositories.
  • Detect active legacy HTTP Mysterium sources before apt-get update.
  • Fail closed with an actionable error when a legacy source is detected.
  • Add isolated Bash installer tests and Go updater regression tests.

Existing installations

The updater does not rewrite system APT configuration. Existing installations with legacy HTTP sources require explicit operator migration.

Security

  • Reject invalid fingerprints, private keys and unexpected additional primary keys.
  • Keep legacy-source detection read-only.
  • Preserve existing origin, artifact, SHA256 and downgrade validation.
  • No automatic package upgrade or service restart.

Validation

  • gofmt -d — PASS
  • go test ./updater/deb/... — PASS
  • bash -n install.sh — PASS
  • bash -n tests/test_install.sh — PASS
  • bash tests/test_install.sh — PASS
  • git diff --check — PASS

Full go test ./... remains blocked by a sandbox networking restriction in an existing test.

Known limitations

  • Keyring and source activation are not a single atomic transaction.
  • Deb822 detection is intentionally limited.
  • Installer tests use mocks rather than live APT.
  • Existing installations are not automatically migrated.

@eflipper13

Copy link
Copy Markdown
Author

I'm actively working on addressing the remaining requirements:

  • Configuring verified commit signatures for both commits.
  • Investigating the required GitHub Actions checks that are still waiting to report their status.

I'll update this PR as soon as these items are resolved.

Thanks for your patience!

@eflipper13
eflipper13 force-pushed the fix/6234-apt-repository-hardening branch from f437e10 to 55666b5 Compare November 2, 2026 14:31

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate existing installations from legacy Launchpad APT source to authenticated HTTPS repository

1 participant