Skip to content

Attestation Verification Buffer Size #9199

Description

@Forrin

Describe the bug

Attestations that are too large will throw the following error during verification.

Error: bundles could not be loaded from JSON lines file: bufio.Scanner: token too long

Steps to reproduce the behavior

gh attestation verify oci://ghcr.io/forrin/in-toto-workflows:15f5ca8c47ad7ffca1d7cc7e9996c57010b024e7 -o Forrin --bundle sha256:05efdf15a77731613ea7f9267c2f0ca4543d8d5763f22d90f994bb5f52a48368.jsonl

Expected vs actual behavior

Expected to pass verification. Actual is an error due to bufio scanner buffer limits.

Logs

Loaded digest sha256:05efdf15a77731613ea7f9267c2f0ca4543d8d5763f22d90f994bb5f52a48368 for oci://ghcr.io/forrin/in-toto-workflows:15f5ca8c47ad7ffca1d7cc7e9996c57010b024e7
✗ Loading attestations from oci://ghcr.io/forrin/in-toto-workflows:15f5ca8c47ad7ffca1d7cc7e9996c57010b024e7 failed

Error: bundles could not be loaded from JSON lines file: bufio.Scanner: token too long

Activity

  1. added
    gh-attestationrelated to the gh attestation command
    priority-2Affects more than a few users but doesn't prevent core functions
    and removed on Jun 12, 2024
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

    bugSomething isn't workinggh-attestationrelated to the gh attestation commandpriority-2Affects more than a few users but doesn't prevent core functions

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions