Skip to content

Conversation

LogFlames
Copy link
Member

See #1281.

@LogFlames LogFlames linked an issue Jul 31, 2025 that may be closed by this pull request
@LogFlames LogFlames requested a review from algomaster99 July 31, 2025 13:26
@LogFlames LogFlames changed the title 🦺 feat: Force local checksum mode on validate 🦺 fix: Force local checksum mode on validate Jul 31, 2025
@LogFlames LogFlames mentioned this pull request Jul 31, 2025
@LogFlames LogFlames force-pushed the 1281-validate-should-always-compare-to-local-checksum branch from 6af6233 to ec15b59 Compare August 20, 2025 12:02
@algomaster99
Copy link
Member

As far as I understand, the validate goal would compare the checksum of the dependency in lockfile with the ones on Maven central (remote) or m2 (local). Shouldn't both be enforced for validation?

@LogFlames
Copy link
Member Author

Currently validate uses the check that was used to generate the lockfile. That if, if the lockfile is local it will check against the m2 folder, if the lockfile is remote it will check against maven central.

If you generated the lockfile only using your m2 folder, I think the check also only needs to be local.
However, if you generate the lockfile using remote, the validate check checks that they are the same on maven central. Which (since we must trust maven central) from my understanding they will always be. Thus we want to verify that noone has tampered with our local m2 folder.

Running checks aganist both m2 and central for remote lockfiles could be an alternative. However, I don't what we would catch by running it against remote at all, thus my proposal to only check against m2.

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.

Validate should always compare to local checksum
2 participants