Skip to content

calm-hub: getFileAtVersion silently serves HEAD content mislabeled as a historic SHA on a non-200 response #3089

Description

@jpgough-ms

GitHubVersionService.getFileAtVersion returns null on a non-200 API response (rate limit, transient network error, unknown SHA). Callers that treat null as "fall back to the local HEAD clone" then silently serve current HEAD content back, labelled as the historic version the caller asked for — no way to distinguish "this is really version X" from "the fetch for X failed and this is HEAD".

Fix: throw a checked exception on API failure instead of returning null, so callers can decide whether to surface an error rather than silently substituting HEAD.

(Independent security review finding on #3066, Fable.)

Activity

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

    calm-hubAffects `calm-hub`

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions