Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inconsistent use of GnuPG #569

Open
lukpueh opened this issue Mar 22, 2023 · 1 comment
Open

inconsistent use of GnuPG #569

lukpueh opened this issue Mar 22, 2023 · 1 comment
Labels
X41 Informational findings from X41 source code audit

Comments

@lukpueh
Copy link
Member

lukpueh commented Mar 22, 2023

[from X41 source code audit informational note]

The Python implementation of in-toto supports the use of PGP keys via GnuPG.

When specifying a PGP key (via its ID) to be added to the layout, the key’s metadata is fetched from GnuPG and added to the key object in the layout. The metadata includes some (but not all) attributes of the key. It also includes subkeys of the specified key, which are accepted in place of the specified key during verification.

in-toto re-implements some (but not all) of GnuPG's validations when adding the key and during verification, however only the key metadata from the layout is used during verification and GnuPG is not invoked in the process.

X41 understands that in-toto’s goal is not to provide a re-implementation of GnuPG and therefore considers it an unnecessary risk – and avoidable complexity – to evade GnuPG's validations in the verification process.

Solution Advice
X41 recommends to only specify the key ID in the layout, and to leave all other steps involved with key management, signing, and verification to GnuPG.

@lukpueh lukpueh changed the title Inconsistent Use of GnuPG inconsistent use of GnuPG Mar 22, 2023
@lukpueh
Copy link
Member Author

lukpueh commented Mar 22, 2023

An alternative (preferred) solution is to discard all information related to the PGP trust model (validity period, subkeys, etc.), when adding the key to the layout, and make it clear in usage documentation that the layout defines the ultimate trust and is thus responsible to expire a key or define trust hierarchies.

A non-backwards-compatible consistent GPG signer/verifier, which implements this solution, is available in securesystemslib, and becomes available to in-toto via #532, #533.

Once it is adopted a deprecation/replacement of legacy GPG signer/verifier can be considered.

@lukpueh lukpueh added the X41 Informational findings from X41 source code audit label Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
X41 Informational findings from X41 source code audit
Projects
None yet
Development

No branches or pull requests

1 participant