Skip to content

Secure cabal-install installation method #7639

Closed
@AlistairB

Description

@AlistairB

👋 Haskell docker is exploring some alternative installation methods as https://downloads.haskell.org/debian/ is increasingly slow to be updated. This includes cabal-install which is currently installed via the debian package.

The direction we are thinking of going is directly installing ghc / cabal based on the releases on haskell.org. For example, we can download and GPG verify ghc releases.

Cabal on the other hand do not include GPG sig files that we can use for verification - https://downloads.haskell.org/~cabal/cabal-install-3.6.0.0/

May relate to #6616

Options

1. Cabal to provide GPG signature files

This would be ideal and is the simplest for us and the most secure. GHC has some doco about how this is done - https://gitlab.haskell.org/ghc/ghc/-/wikis/making-releases#sign-and-hash-the-release-artifacts . Perhaps Cabal releases can include a step like this?

2. Verify SHA256SUMS.sig

Cabal does include SHA256SUMS.sig + SHA256SUMS. The process would be something like:

  1. GPG verify SHA256SUMS.sig
  2. Fetch SHA from SHA256SUMS.
  3. Verify SHA256 of the release tar.

The current issue with this is I don't know what GPG key I need to verify SHA256SUMS.sig - https://downloads.haskell.org/~cabal/cabal-install-3.6.0.0/SHA256SUMS.sig.

$ gpg -vv SHA256SUMS.sig
gpg: WARNING: no command supplied.  Trying to guess what you mean ...
# off=0 ctb=89 tag=2 hlen=3 plen=435
:signature packet: algo 1, keyid B3D9F94B8DCAE210
	version 4, created 1631239102, md5len 0, sigclass 0x00
	digest algo 10, begin of digest 39 ed
	hashed subpkt 33 len 21 (issuer fpr v4 A970DF3AC3B9709706D74544B3D9F94B8DCAE210)
	hashed subpkt 2 len 4 (sig created 2021-09-10)
	subpkt 16 len 8 (issuer key ID B3D9F94B8DCAE210)
	data: [3071 bits]
gpg: assuming signed data in 'SHA256SUMS'
gpg: Signature made Fri 10 Sep 2021 11:58:22 AEST
gpg:                using RSA key A970DF3AC3B9709706D74544B3D9F94B8DCAE210
gpg: Can't check signature: No public key

I cannot find key B3D9F94B8DCAE210 anywhere. If this is the preferred option, can details of the key be given and can it be uploaded to some keysevers?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions