feat(dashboard): implement supply chain dependency diff#46
Merged
ionfwsrijan merged 3 commits intoJun 7, 2026
Merged
Conversation
Contributor
Author
|
hi @ionfwsrijan Kindly review it and let me know any chnges required. Also, while fixing this issue, I had to touch the database schema because the original setup was literally throwing away the specific package names extracted by the scanner, By adding those columns, we made sure our new diff engine actually knows which exact dependency got fixed instead of flying blindly. Hope everyhitngs good. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
Closes #43
What this PR does
Introduces a Supply Chain Diff feature to the dashboard. It calculates and visualizes vulnerabilities introduced or resolved in dependencies between the two most recent scans. This provides immediate visibility into the security impact of package version bumps without requiring manual comparison.
Type of change
ML tier (if applicable)
Changes
Backend
/scanand/scan-urlendpoints inmain.pyto safely extract and store OSV package metadata.get_dependency_diff()indb.pythat queries the two most recent jobs and groups dependency findings intointroduced,resolved, andpersistentarrays based on a(rule_id, package_name)tuple.GET /dependency-diffAPI endpoint.Frontend
getDependencyDiffand strict TypeScript interfaces toapi.ts.dependency-diff.tsx, a new Tailwind component featuring a responsive, scrollable side-by-side grid to handle massive vulnerability lists without breaking vertical layout.Dashboard.tsxbelow the primary analytical charts.Database / schema changes
findingstable schema indb.pyto explicitly includepackage_name(TEXT) andpackage_version(TEXT) columns to prevent data leakage from scanner metadata.Testing
How did you test this?
Nuked the local
patchpilot.dbto verify flawless schema generation on startup. Ran two consecutive GitHub URL scans on a vulnerable target repository to populate baseline and updated data. Verified the backend accurately diffed the states and the frontend UI rendered the scrollable side-by-side red/green threat indicators without console errors.Checklist
console.erroror unhandled Python exceptions introducedrequirements.txt/package.jsonupdated if new dependencies added.pkl,.pt, etc.) are gitignored, not committedScreenshots (if UI changed)