Skip to content

New subject-checksums input param#198

Merged
bdehamer merged 2 commits intomainfrom
bdehamer/subject-checksums
Jan 21, 2025
Merged

New subject-checksums input param#198
bdehamer merged 2 commits intomainfrom
bdehamer/subject-checksums

Conversation

@bdehamer
Copy link
Copy Markdown
Collaborator

Adds support for a new subject-checksums input parameter which allows the user to identify the attestation subjects by passing the path of the checksums file.

This enables direct integration with tools like goreleaser, jreleaser, and the sha*sum suite of tools which generate a checksums file.

@bdehamer bdehamer requested a review from a team as a code owner January 15, 2025 19:17
@bdehamer bdehamer force-pushed the bdehamer/subject-checksums branch from 77a6ee2 to 7802356 Compare January 15, 2025 19:43
Signed-off-by: Brian DeHamer <bdehamer@github.com>
@bdehamer bdehamer force-pushed the bdehamer/subject-checksums branch from 7802356 to d8c307e Compare January 15, 2025 20:17
}

/* istanbul ignore next */
if (stats.size > MAX_SUBJECT_CHECKSUM_SIZE_BYTES) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this check ❤️

return res.filter(item => item).map(pat => pat.trim())
}

const digestAlgorithm = (digest: string): string => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also verify that the digest is of expected format (hex encoded) too, and fail early if not?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Added a check to ensure the digest is a hex string.

Signed-off-by: Brian DeHamer <bdehamer@github.com>
@bdehamer bdehamer merged commit 38bcf9b into main Jan 21, 2025
@bdehamer bdehamer deleted the bdehamer/subject-checksums branch January 21, 2025 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants