Skip to content

Imports: an apt import without a public key re-signs whatever the connection delivered #753

Open

Description

@schmitch

Problem

An apt import (#644) checks each Packages index against Release, and each .deb against its index entry. Without public_key, which is optional (crates/server/src/admin/imports.rs:519), nothing checks Release itself (crates/server/src/import/apt.rs:249-300). The documented sources are often plain http://.

Scenario

An import of http://apt.example.com/debian without a key goes through a network that alters it. The man in the middle controls Release, so it controls every index and .deb too. Forge stores them and then signs its own indexes with the hosted repository's key. Clients that trust that key install the altered packages with no warning.

apt itself refuses such a source unless it is marked trusted=yes. The import turns an unauthenticated source into a signed one. This is documented, but it is the default.

Expected

An apt import needs the source's public key, or an explicit opt-in ("allow_unsigned": true) that the web UI's Import form shows with a warning. Refusing it at least for http:// sources would close the common case. The opt-in is recorded in the audit line.

Found in the 2.2.0 release review.

Activity

  1. added this to the 2.3.0 milestone on Nov 2, 2026
  2. added
    enhancement
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions