Summary
For backward compatibility, kas still accepts abbreviated commit IDs, i.e. SHA1 IDs shorter than 40 hex characters or SHA256 IDs shorter than 64 hex characters. However, it only warns about associated risks if the commit ID is shorter than 40 characters. This is means abbreviated SHA256 commit IDs longer than 39 characters will not be detected as such, and no warning will be issued.
kas furthermore fails to highlight the fact that shortened commit IDs ease supply chain attacks where a repository may get rewritten and filled with colliding commits, or extended with branches or tags that are named like the abbreviated commit ID.
Finally, kas-internal measures to avoid that commit-like branches or tags are accepted in place of original commit IDs are not applied to shortened IDs, further simplifying supply chain attacks.
Patches
Commits 56e5e6a closes the warning gap and underlines the problem of abbreviated commit IDs. Commit cf43ab2 additionally refuses to check out commits that deviate suspiciously from the specified ID.
Workarounds / Risk Avoidance
Manually check if any kas configuration file is currently using abbreviated commit IDs and, if so, replace them with full-length IDs.
Summary
For backward compatibility, kas still accepts abbreviated commit IDs, i.e. SHA1 IDs shorter than 40 hex characters or SHA256 IDs shorter than 64 hex characters. However, it only warns about associated risks if the commit ID is shorter than 40 characters. This is means abbreviated SHA256 commit IDs longer than 39 characters will not be detected as such, and no warning will be issued.
kas furthermore fails to highlight the fact that shortened commit IDs ease supply chain attacks where a repository may get rewritten and filled with colliding commits, or extended with branches or tags that are named like the abbreviated commit ID.
Finally, kas-internal measures to avoid that commit-like branches or tags are accepted in place of original commit IDs are not applied to shortened IDs, further simplifying supply chain attacks.
Patches
Commits 56e5e6a closes the warning gap and underlines the problem of abbreviated commit IDs. Commit cf43ab2 additionally refuses to check out commits that deviate suspiciously from the specified ID.
Workarounds / Risk Avoidance
Manually check if any kas configuration file is currently using abbreviated commit IDs and, if so, replace them with full-length IDs.