Skip to content

fix: only use Reference as the commit if it does not have a dot for Packagist packages#342

Merged
G-Rath merged 1 commit intomainfrom
fix-composerlock
Nov 12, 2025
Merged

fix: only use Reference as the commit if it does not have a dot for Packagist packages#342
G-Rath merged 1 commit intomainfrom
fix-composerlock

Conversation

@G-Rath
Copy link
Owner

@G-Rath G-Rath commented Nov 12, 2025

Its possible for the reference field to contain values other than commits, such as for Drupal packages it holds a tag-type value.

Because I'm not sure all of the details behind when this will be the case, I've gone with having us blank the commit if the value has a dot in it since that is not a valid character in a SHA anyway, but this might not cover all situations e.g. if a branch-type value could be used.

This is cherry-picked from google/osv-scalibr#958

@G-Rath G-Rath added the bug Something isn't working label Nov 12, 2025
@G-Rath G-Rath merged commit 2e6f740 into main Nov 12, 2025
13 checks passed
@G-Rath G-Rath deleted the fix-composerlock branch November 12, 2025 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant