r/coolgithubprojects • u/cookiengineer • 15m ago
patchmap - CLI tool that maps CycloneDX SBOMs to the exact callsites in the codebase and shows how to migrate breaking changes
https://github.com/cookiengineer/patchmap
1
Upvotes
1
u/cookiengineer 10m ago
Built this over the last couple of days, and it turned out to be a pretty useful tool for me when I want to upgrade dependencies of my codebases and don't know where to start.
It features a couple of modes:
"patchmap scan" shows which vulnerabilities, updates, and breaking changes happen along the way, mapped correctly to your codebase and how you used that dependency in the first place.
"patchmap lint" shows which callsites and data types you have to modify to stay update-compatible. Meaning it diffs and shows which signatures have changed or "will change" when you decide to update your dependencies.
"patchmap sbom" is using CycloneDX's SBOM generator library, and can be used standalone, too.
Overall the linter mode is my favorite way to use it, because this helped me already a LOT during migrations. Thought this tool might be useful for someone else, too. It uses OSV's API behind the scenes, the rest is done 100% offline.
Screenshots: https://imgur.com/a/dTrLUdc
Also check out the examples folder in the repository, which shows typical scenarios and how to use the LSP servers for other programming languages so that it can also parse/lint/verify/map the vulnerabilities to your own codebase.