Skip to content

Verifier.__init__ raises unhandled IndexError when the trusted root has no transparency logs #1822

Description

@lsd-cat

If a trusted_root with no tlog entries is provided, the verfier crashes with a standard python error.

See:

# this is an ugly hack needed for verifying "detached" materials
# In reality we should be choosing the rekor instance based on the logid
url = trusted_root._inner.tlogs[0].base_url

Since the verifier documents its failures as VerificationError, a caller catching only VerificationError gets an uncaught crash. It's not security relevant both because the crash is blocking, and because it assume a likely malformed trusted_root (or is it supported to do a private sigstore deploy with no logs?).

The other verifiers (js/rs/go) seem to throw different failed verification errors for the same test case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions