Skip to content

(in-progress) first commit vulnerability-database.mdx created#70

Open
juliankepka wants to merge 62 commits intomainfrom
vulnerability-database
Open

(in-progress) first commit vulnerability-database.mdx created#70
juliankepka wants to merge 62 commits intomainfrom
vulnerability-database

Conversation

@juliankepka
Copy link
Collaborator

No description provided.

@seb-kw
Copy link
Member

seb-kw commented Feb 2, 2026

Looks pretty fancy - like that chart (remember to check with backend team to provide you with actual data) 🚀

Copy link
Member

@timbastin timbastin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job for splitting into container and presentational components. Cool that you already used tanstack table and shadcn ui!

}

export default function VulnDBHero({ searchTerm, setSearchTerm, onSearch }: VulnDBHeroProps) {
const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not really accessible. I think you get exactly the behavior you are aiming for by wrapping your input in a form element and use onSubmit

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed accessibility issue by wrapping input in form element with onSubmit

<div
style={{
width: '100%',
height: '1000px',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to avoid such hardcoded values. There needs to be a different value for mobile devices probably. You are only able to change this through JavaScript. CSS solutions are simpler and easier to maintain and get correct. I think h-100vh is what you are looking for. Vh = viewport height

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the hardcoded values and switched to viewport height and width.

const diffMs = now.getTime() - date.getTime()
const diffMins = Math.floor(diffMs / (1000 * 60))
const diffHours = Math.floor(diffMs / (1000 * 60 * 60))
const diffDays = Math.floor(diffMs / (1000 * 60 * 60 * 24))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should either use a library or extract this logic into a helper function. Date-fns is pretty good

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed Date and installed Date-fns.


const handleSearch = async () => {
setIsLoading(true)
const response = await fetch(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add a try catch statement around this

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added try catch.

@juliankepka juliankepka marked this pull request as ready for review March 5, 2026 07:31
@juliankepka juliankepka requested a review from Copilot March 5, 2026 07:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces new product pages for a vulnerability database, package inspector, and reachability analysis, along with supporting UI components, API routes, and sitemap/robots assets to improve navigation and indexing.

Changes:

  • Added new pages (MDX routes) and React components for Vulnerability Database, CVE detail, Package Inspector, and Reachability Analysis.
  • Implemented API endpoints to generate sitemap indexes and per-page CVE sitemaps.
  • Added shared UI primitives (table, skeleton, chart, card, container) plus global styling/assets (icons, robots.txt, sitemap.xml) and new dependencies.

Reviewed changes

Copilot reviewed 55 out of 66 changed files in this pull request and generated 26 comments.

Show a summary per file
File Description
src/types/api.ts Adds API types for affected components (used by CVE detail).
src/styles/globals.scss Adds theme variables for grid line color.
src/pages/vulnerability-database/[ID].mdx Adds CVE detail route wrapper.
src/pages/vulnerability-database.mdx Adds vulnerability database landing page route.
src/pages/reachability-analysis/[purl].mdx Adds reachability package-detail route wrapper.
src/pages/reachability-analysis.mdx Adds reachability analysis landing page route.
src/pages/package-inspector/_meta.ts Configures Nextra layout/display for package inspector section.
src/pages/package-inspector/[purl].mdx Adds package inspector purl-detail route wrapper.
src/pages/package-inspector.mdx Adds package inspector landing page route and frontmatter.
src/pages/api/sitemap.xml.ts Adds sitemap index API endpoint.
src/pages/api/cve/[page].ts Adds per-page CVE sitemap API endpoint.
src/pages/_meta.ts Adds new top-level navigation entries for the new pages.
src/lib/utils.ts Adds extractPackageName helper (used by package inspector).
src/lib/fetcher.js Adds shared SWR fetcher helper.
src/lib/api/vulndb.ts Adds SWR hook for vulnerability radar chart data.
src/components/vulnerability-database/vulnerability-database-page.tsx Implements vulnerability database search + results table page.
src/components/vulnerability-database/vulnerability-data-table/data-table.tsx Adds table component with loading + pagination + row navigation.
src/components/vulnerability-database/vulnerability-data-table/columns.tsx Defines vulnerability table columns and formatting.
src/components/vulnerability-database/radar-chart.tsx Adds radar chart card for ecosystem distribution.
src/components/vulnerability-database/light-rays.tsx Adds WebGL light rays visual effect component.
src/components/vulnerability-database/hero.tsx Adds vulnerability database hero + chart section.
src/components/vulnerability-database/cve-detail.tsx Implements CVE detail page UI and data fetching.
src/components/ui/table.tsx Adds reusable table UI primitives.
src/components/ui/skeleton.tsx Adds skeleton loading component.
src/components/ui/input.tsx Adds styled input component (with icon).
src/components/ui/hero-input.tsx Adds hero section wrapper used by multiple pages.
src/components/ui/container.tsx Adds page container with optional decorative grid bars.
src/components/ui/chart.tsx Adds chart container + tooltip/legend utilities for Recharts.
src/components/ui/card.tsx Adds reusable card UI primitives.
src/components/ui/animated-content.tsx Adds GSAP/ScrollTrigger animation wrapper.
src/components/ui/Searchbar.tsx Adds a reusable search bar component.
src/components/reachabilityAnalysis/reachability-types.tsx Adds types for reachability analysis API response.
src/components/reachabilityAnalysis/reachability-analysis-results-table.tsx Adds reachability results table component.
src/components/reachabilityAnalysis/reachability-analysis-page.tsx Implements reachability analysis search + results page.
src/components/reachabilityAnalysis/reachability-analysis-package-details.tsx Implements reachability package detail view.
src/components/reachabilityAnalysis/reachability-analysis-hero.tsx Adds reachability hero/search UI.
src/components/reachabilityAnalysis/columns.tsx Defines reachability results table columns.
src/components/package-inspector/types.ts Adds types for package inspector API response.
src/components/package-inspector/purlPage.tsx Implements package inspector detail page.
src/components/package-inspector/particels.tsx Adds WebGL particles background effect.
src/components/package-inspector/VulnerabilityList.tsx Adds vulnerability list UI for package inspector.
src/components/package-inspector/SearchResultCard.tsx Adds search result card linking to package inspector detail route.
src/components/package-inspector/ScoreCardChart.tsx Adds OpenSSF scorecard visualization.
src/components/package-inspector/ProjectStats.tsx Adds project metadata/stats UI.
src/components/package-inspector/PackageInspectorPage.tsx Implements package inspector landing/search page.
src/components/package-inspector/PackageHeroCard.tsx Adds hero summary card for a package.
src/components/package-inspector/OverallScoreIcon.tsx Adds overall score gauge/badge for scorecard.
src/components/package-inspector/Hero.tsx Implements package inspector hero UI (guided vs direct purl modes).
src/components/animated-blocks/center-flow.tsx Adds animated center-flow visual block used by package inspector.
src/components/SwaggerReference.tsx Fixes useRef typing for keyRef.
sitemap.xml Adds static sitemap index file at repo root.
public/sitemap.xml Adds public sitemap index file.
public/robots.txt Adds robots.txt pointing to sitemap.
public/icons/eco-logos/python-programming-language-icon.svg Adds ecosystem icon asset.
public/icons/eco-logos/npm-icon.svg Adds ecosystem icon asset.
public/icons/eco-logos/go-programming-language-icon.svg Adds ecosystem icon asset.
public/icons/eco-logos/debian-logo-icon.svg Adds ecosystem icon asset.
public/icons/eco-logos/Red_Hat_logo.svg Adds ecosystem icon asset.
public/icons/eco-logos/Git_icon.svg Adds ecosystem icon asset.
public/icons/eco-logos/Alpine_logo.svg Adds ecosystem icon asset.
package.json Adds dependencies and updates postbuild to copy sitemap output into public/.
.gitignore Updates ignored env/type artifacts and other files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

6 participants