Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
f7d7397 to
d3a5dfb
Compare
8eff64f to
4368a7a
Compare
No uber jar support yet!
| } | ||
|
|
||
| public static void clear() { | ||
| PACKAGES.clear(); |
There was a problem hiding this comment.
If we clean packages every heartbeat, jar is only reported in the heartbeat where its first class loads, after that it stays loaded but never gets reported again
By default ui only shows deps seen in the last 24h
If application runs for more than a day, all reported dependencies will disappear from the dashboard. I think that's misleading
| HostnamesStore.clear(); | ||
| RoutesStore.clear(); | ||
| UsersStore.clear(); | ||
| RuntimePackagesStore.clear(); |
There was a problem hiding this comment.
🟡 Medium - Heartbeat drops the dependency inventory after the first report
RuntimePackagesStore is cleared on every heartbeat, but RuntimePackageCollector only ever enqueues a JAR location the first time it is seen because OBSERVED_LOCATIONS is never reset. That means already-loaded libraries disappear from all later heartbeats, and even a transient failure on the first report permanently loses the inventory because those locations will not be scanned again. The backend will therefore miss still-loaded dependencies and any vulnerability analysis built on this heartbeat data becomes incomplete.
Show fix
Do not treat loaded dependencies as per-heartbeat deltas. Keep RuntimePackagesStore persistent across heartbeats, or rebuild it from the full set of loaded classes before clearing anything; if you need delta reporting, only delete entries after a successful report and also make the collector able to repopulate them.
More info - Reply on this comment to give feedback or ignore the issue.
No uber jar support yet!