Skip to content

Bug: Incorrect handling of GitHub release asset checksums in getChecksums function #801

@ghost

Description

Summary

The function getChecksums in src/utils/githubChecksums.ts assumes that each asset returned by the GitHub Releases API contains a digest property. However, the GitHub API does not include a digest field in asset objects, which causes the generated checksums mapping to contain undefined values and likely breaks checksum validation.

How to Reproduce

  1. Trigger the getChecksums function (e.g., by running the site in production mode).
  2. Observe the returned mapping from asset name to digest—values are undefined for each asset.

Expected Behavior

The code should extract the correct checksum values for assets. This might involve parsing a separate checksum file attached to releases or another method, since the API does not natively provide a digest field.

Relevant Code

src/utils/githubChecksums.ts:

for (const asset of assets) {
  checksums[asset.name] = asset.digest
}

Additional Notes

Labels

bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions