hex-audit 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +105 -0
- package/DEMO.md +141 -0
- package/README.md +378 -0
- package/dashboard/.next/BUILD_ID +1 -0
- package/dashboard/.next/app-build-manifest.json +99 -0
- package/dashboard/.next/app-path-routes-manifest.json +1 -0
- package/dashboard/.next/build-manifest.json +32 -0
- package/dashboard/.next/cache/.tsbuildinfo +1 -0
- package/dashboard/.next/cache/webpack/client-production/0.pack +0 -0
- package/dashboard/.next/cache/webpack/client-production/index.pack +0 -0
- package/dashboard/.next/cache/webpack/edge-server-production/0.pack +0 -0
- package/dashboard/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/dashboard/.next/cache/webpack/server-production/0.pack +0 -0
- package/dashboard/.next/cache/webpack/server-production/1.pack +0 -0
- package/dashboard/.next/cache/webpack/server-production/2.pack +0 -0
- package/dashboard/.next/cache/webpack/server-production/index.pack +0 -0
- package/dashboard/.next/cache/webpack/server-production/index.pack.old +0 -0
- package/dashboard/.next/export-marker.json +1 -0
- package/dashboard/.next/images-manifest.json +1 -0
- package/dashboard/.next/next-minimal-server.js.nft.json +1 -0
- package/dashboard/.next/next-server.js.nft.json +1 -0
- package/dashboard/.next/package.json +1 -0
- package/dashboard/.next/prerender-manifest.js +1 -0
- package/dashboard/.next/prerender-manifest.json +1 -0
- package/dashboard/.next/react-loadable-manifest.json +300 -0
- package/dashboard/.next/required-server-files.json +1 -0
- package/dashboard/.next/routes-manifest.json +1 -0
- package/dashboard/.next/server/app/_not-found/page.js +1 -0
- package/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/_not-found.html +1 -0
- package/dashboard/.next/server/app/_not-found.meta +6 -0
- package/dashboard/.next/server/app/_not-found.rsc +12 -0
- package/dashboard/.next/server/app/access/page.js +1 -0
- package/dashboard/.next/server/app/access/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/access/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/access.html +1 -0
- package/dashboard/.next/server/app/access.meta +5 -0
- package/dashboard/.next/server/app/access.rsc +8 -0
- package/dashboard/.next/server/app/api/code/route.js +1 -0
- package/dashboard/.next/server/app/api/code/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/flows/route.js +1 -0
- package/dashboard/.next/server/app/api/flows/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/flows.body +1 -0
- package/dashboard/.next/server/app/api/flows.meta +1 -0
- package/dashboard/.next/server/app/api/github-status/route.js +1 -0
- package/dashboard/.next/server/app/api/github-status/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/issues/[id]/move/route.js +1 -0
- package/dashboard/.next/server/app/api/issues/[id]/move/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/issues/[id]/route.js +1 -0
- package/dashboard/.next/server/app/api/issues/[id]/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/mermaid/route.js +1 -0
- package/dashboard/.next/server/app/api/mermaid/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/progress/route.js +1 -0
- package/dashboard/.next/server/app/api/progress/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/watch/route.js +3 -0
- package/dashboard/.next/server/app/api/watch/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/calls/page.js +1 -0
- package/dashboard/.next/server/app/calls/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/calls/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/calls.html +1 -0
- package/dashboard/.next/server/app/calls.meta +5 -0
- package/dashboard/.next/server/app/calls.rsc +8 -0
- package/dashboard/.next/server/app/conformance/page.js +1 -0
- package/dashboard/.next/server/app/conformance/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/conformance/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/conformance.html +1 -0
- package/dashboard/.next/server/app/conformance.meta +5 -0
- package/dashboard/.next/server/app/conformance.rsc +8 -0
- package/dashboard/.next/server/app/diagram/page.js +1 -0
- package/dashboard/.next/server/app/diagram/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/diagram/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/diagram.html +1 -0
- package/dashboard/.next/server/app/diagram.meta +5 -0
- package/dashboard/.next/server/app/diagram.rsc +10 -0
- package/dashboard/.next/server/app/flows/page.js +1 -0
- package/dashboard/.next/server/app/flows/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/flows/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/flows.html +1 -0
- package/dashboard/.next/server/app/flows.meta +5 -0
- package/dashboard/.next/server/app/flows.rsc +10 -0
- package/dashboard/.next/server/app/functions/page.js +1 -0
- package/dashboard/.next/server/app/functions/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/functions/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/functions.html +1 -0
- package/dashboard/.next/server/app/functions.meta +5 -0
- package/dashboard/.next/server/app/functions.rsc +8 -0
- package/dashboard/.next/server/app/icon.svg/route.js +12 -0
- package/dashboard/.next/server/app/icon.svg/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/icon.svg.body +18 -0
- package/dashboard/.next/server/app/icon.svg.meta +1 -0
- package/dashboard/.next/server/app/index.html +1 -0
- package/dashboard/.next/server/app/index.meta +5 -0
- package/dashboard/.next/server/app/index.rsc +9 -0
- package/dashboard/.next/server/app/issues/page.js +1 -0
- package/dashboard/.next/server/app/issues/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/issues/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/issues.html +1 -0
- package/dashboard/.next/server/app/issues.meta +5 -0
- package/dashboard/.next/server/app/issues.rsc +8 -0
- package/dashboard/.next/server/app/page.js +20 -0
- package/dashboard/.next/server/app/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/progress/page.js +1 -0
- package/dashboard/.next/server/app/progress/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/progress/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/progress.html +1 -0
- package/dashboard/.next/server/app/progress.meta +5 -0
- package/dashboard/.next/server/app/progress.rsc +8 -0
- package/dashboard/.next/server/app/stats/page.js +1 -0
- package/dashboard/.next/server/app/stats/page.js.nft.json +1 -0
- package/dashboard/.next/server/app/stats/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/stats.html +1 -0
- package/dashboard/.next/server/app/stats.meta +5 -0
- package/dashboard/.next/server/app/stats.rsc +8 -0
- package/dashboard/.next/server/app-paths-manifest.json +22 -0
- package/dashboard/.next/server/chunks/431.js +1 -0
- package/dashboard/.next/server/chunks/557.js +1 -0
- package/dashboard/.next/server/chunks/645.js +6 -0
- package/dashboard/.next/server/chunks/649.js +2 -0
- package/dashboard/.next/server/chunks/665.js +13 -0
- package/dashboard/.next/server/chunks/786.js +12 -0
- package/dashboard/.next/server/chunks/818.js +6 -0
- package/dashboard/.next/server/chunks/916.js +2 -0
- package/dashboard/.next/server/chunks/font-manifest.json +1 -0
- package/dashboard/.next/server/font-manifest.json +1 -0
- package/dashboard/.next/server/functions-config-manifest.json +1 -0
- package/dashboard/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/dashboard/.next/server/middleware-build-manifest.js +1 -0
- package/dashboard/.next/server/middleware-manifest.json +6 -0
- package/dashboard/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/dashboard/.next/server/next-font-manifest.js +1 -0
- package/dashboard/.next/server/next-font-manifest.json +1 -0
- package/dashboard/.next/server/pages/404.html +1 -0
- package/dashboard/.next/server/pages/500.html +1 -0
- package/dashboard/.next/server/pages/_app.js +1 -0
- package/dashboard/.next/server/pages/_app.js.nft.json +1 -0
- package/dashboard/.next/server/pages/_document.js +1 -0
- package/dashboard/.next/server/pages/_document.js.nft.json +1 -0
- package/dashboard/.next/server/pages/_error.js +1 -0
- package/dashboard/.next/server/pages/_error.js.nft.json +1 -0
- package/dashboard/.next/server/pages-manifest.json +1 -0
- package/dashboard/.next/server/server-reference-manifest.js +1 -0
- package/dashboard/.next/server/server-reference-manifest.json +1 -0
- package/dashboard/.next/server/webpack-runtime.js +1 -0
- package/dashboard/.next/static/0IZAlhEwk5-v4myUvWKBd/_buildManifest.js +1 -0
- package/dashboard/.next/static/0IZAlhEwk5-v4myUvWKBd/_ssgManifest.js +1 -0
- package/dashboard/.next/static/chunks/1.8868c4d131111be7.js +36 -0
- package/dashboard/.next/static/chunks/1015.3ab89142e5f44120.js +226 -0
- package/dashboard/.next/static/chunks/1151.b6ef5c786e587ed7.js +1 -0
- package/dashboard/.next/static/chunks/1199.a072929dbec89965.js +148 -0
- package/dashboard/.next/static/chunks/1375.d4d2f7fc9c9c2ff1.js +43 -0
- package/dashboard/.next/static/chunks/1799.83206776abbbf1fc.js +9 -0
- package/dashboard/.next/static/chunks/20154aaa.ccc347c04ab5ad4a.js +1 -0
- package/dashboard/.next/static/chunks/2077.7011a570c87aa7b1.js +1 -0
- package/dashboard/.next/static/chunks/2166.cc0fabeb2e89b840.js +215 -0
- package/dashboard/.next/static/chunks/2291.85a70cb0c228157b.js +29 -0
- package/dashboard/.next/static/chunks/2325.2c55cb9a6282ae3f.js +24 -0
- package/dashboard/.next/static/chunks/2383.62c035a052272594.js +1 -0
- package/dashboard/.next/static/chunks/2694.92bbe252063e4786.js +1 -0
- package/dashboard/.next/static/chunks/275.0d761aa0e5b030b8.js +34 -0
- package/dashboard/.next/static/chunks/2781.8536b644a480aede.js +93 -0
- package/dashboard/.next/static/chunks/2805.a8d71d2f92bb6ba9.js +1 -0
- package/dashboard/.next/static/chunks/2879.51436986f93981d9.js +1 -0
- package/dashboard/.next/static/chunks/3017.e55781da9dd32d37.js +1 -0
- package/dashboard/.next/static/chunks/3205-728c260fbb4f89c6.js +2 -0
- package/dashboard/.next/static/chunks/3236.dff44fa7961d9d5e.js +1 -0
- package/dashboard/.next/static/chunks/3480.9451396ad7ee7613.js +1 -0
- package/dashboard/.next/static/chunks/3626.ba1cf848a9f2e93d.js +64 -0
- package/dashboard/.next/static/chunks/3865.a432a7910a2f5281.js +90 -0
- package/dashboard/.next/static/chunks/3887.c22cbfa3f095826c.js +1 -0
- package/dashboard/.next/static/chunks/3924-4a05057b5450abe1.js +1 -0
- package/dashboard/.next/static/chunks/3948.fe3c7d758568d98b.js +287 -0
- package/dashboard/.next/static/chunks/4728.07d87640a3e7dd0d.js +24 -0
- package/dashboard/.next/static/chunks/4787.4e5f6a0e0e40a583.js +23 -0
- package/dashboard/.next/static/chunks/5060.baca226af35ed016.js +1 -0
- package/dashboard/.next/static/chunks/5284.f949ac90c95ff143.js +1 -0
- package/dashboard/.next/static/chunks/5715.1524bcc9591e180b.js +115 -0
- package/dashboard/.next/static/chunks/6014.700ae4969b64d728.js +104 -0
- package/dashboard/.next/static/chunks/6024.4d23707c65514679.js +79 -0
- package/dashboard/.next/static/chunks/6052.033a6f1013c666eb.js +141 -0
- package/dashboard/.next/static/chunks/6177.e5c84cfc4c0dea51.js +1 -0
- package/dashboard/.next/static/chunks/618f8807-547c5614e1318888.js +1 -0
- package/dashboard/.next/static/chunks/6434.9481771c33195d29.js +1 -0
- package/dashboard/.next/static/chunks/6468.f4a3e8fa6accc6da.js +77 -0
- package/dashboard/.next/static/chunks/6540.86f367d7390738d4.js +1 -0
- package/dashboard/.next/static/chunks/6549.4d0d472df96429a5.js +1 -0
- package/dashboard/.next/static/chunks/690f35d0.3e40ca0930e4bbdb.js +119 -0
- package/dashboard/.next/static/chunks/7020.831e16e26d91abc1.js +166 -0
- package/dashboard/.next/static/chunks/7397-f6f4dddc7a20bfc1.js +1 -0
- package/dashboard/.next/static/chunks/7498-ea83cb9e30ec5491.js +1 -0
- package/dashboard/.next/static/chunks/7802.89aec9ee11680850.js +80 -0
- package/dashboard/.next/static/chunks/7973.8b526f589aca5d84.js +79 -0
- package/dashboard/.next/static/chunks/7a04ac15.1c6cea694301806c.js +62 -0
- package/dashboard/.next/static/chunks/8216.1bead812eb126c35.js +5 -0
- package/dashboard/.next/static/chunks/8233babc.780b8e272eda298f.js +92 -0
- package/dashboard/.next/static/chunks/8452-e616b5f43bceb95f.js +13 -0
- package/dashboard/.next/static/chunks/8645.a5ca76f11edc9633.js +1 -0
- package/dashboard/.next/static/chunks/8928-60c623ee89d2e6ad.js +1 -0
- package/dashboard/.next/static/chunks/9173.2486ffca31131ec5.js +1 -0
- package/dashboard/.next/static/chunks/9178.469341860bf8caec.js +1 -0
- package/dashboard/.next/static/chunks/9466.e904660d38c03eea.js +1 -0
- package/dashboard/.next/static/chunks/9660.84a85811380c5f33.js +1 -0
- package/dashboard/.next/static/chunks/9717.6cf5c8c89403b651.js +1 -0
- package/dashboard/.next/static/chunks/9720.67d4d0d15a96d691.js +1 -0
- package/dashboard/.next/static/chunks/9811.65e1d080c2d256af.js +1 -0
- package/dashboard/.next/static/chunks/app/_not-found/page-548ab392d0e890d1.js +1 -0
- package/dashboard/.next/static/chunks/app/access/page-3668562e7464eb5d.js +1 -0
- package/dashboard/.next/static/chunks/app/calls/page-d07f5b8664cc8303.js +1 -0
- package/dashboard/.next/static/chunks/app/conformance/page-2fede1d7b5f9265d.js +1 -0
- package/dashboard/.next/static/chunks/app/diagram/page-b228444265546495.js +1 -0
- package/dashboard/.next/static/chunks/app/flows/page-fa67783d8cd79cab.js +1 -0
- package/dashboard/.next/static/chunks/app/functions/page-686f0296639133a3.js +1 -0
- package/dashboard/.next/static/chunks/app/issues/page-dc110d4cc0a5c398.js +1 -0
- package/dashboard/.next/static/chunks/app/layout-e7b50543ba216d12.js +1 -0
- package/dashboard/.next/static/chunks/app/page-a0f25953d4457935.js +1 -0
- package/dashboard/.next/static/chunks/app/progress/page-f07ac39d1d27b480.js +1 -0
- package/dashboard/.next/static/chunks/app/stats/page-db81f600a086f252.js +1 -0
- package/dashboard/.next/static/chunks/b7167ec1.7afbab6f609e3326.js +153 -0
- package/dashboard/.next/static/chunks/c7ea4e13.5effeeba6618bdb7.js +1 -0
- package/dashboard/.next/static/chunks/framework-cf6f5bdca6ba0184.js +33 -0
- package/dashboard/.next/static/chunks/main-70c6d841ad572657.js +1 -0
- package/dashboard/.next/static/chunks/main-app-9d2f6b8a47133e9b.js +1 -0
- package/dashboard/.next/static/chunks/pages/_app-6ad2b50514c24ab4.js +1 -0
- package/dashboard/.next/static/chunks/pages/_error-d5eb11c5c4626811.js +1 -0
- package/dashboard/.next/static/chunks/polyfills-78c92fac7aa8fdd8.js +1 -0
- package/dashboard/.next/static/chunks/webpack-08869f2b18792e51.js +1 -0
- package/dashboard/.next/static/css/e6cb67f77f13ae8e.css +3 -0
- package/dashboard/.next/static/media/0aa834ed78bf6d07-s.woff2 +0 -0
- package/dashboard/.next/static/media/438aa629764e75f3-s.woff2 +0 -0
- package/dashboard/.next/static/media/4c9affa5bc8f420e-s.p.woff2 +0 -0
- package/dashboard/.next/static/media/51251f8b9793cdb3-s.woff2 +0 -0
- package/dashboard/.next/static/media/67957d42bae0796d-s.woff2 +0 -0
- package/dashboard/.next/static/media/875ae681bfde4580-s.woff2 +0 -0
- package/dashboard/.next/static/media/886030b0b59bc5a7-s.woff2 +0 -0
- package/dashboard/.next/static/media/939c4f875ee75fbb-s.woff2 +0 -0
- package/dashboard/.next/static/media/bb3ef058b751a6ad-s.p.woff2 +0 -0
- package/dashboard/.next/static/media/cc978ac5ee68c2b6-s.woff2 +0 -0
- package/dashboard/.next/static/media/e857b654a2caa584-s.woff2 +0 -0
- package/dashboard/.next/static/media/f911b923c6adde36-s.woff2 +0 -0
- package/dashboard/.next/trace +80 -0
- package/dashboard/.next/types/app/access/page.ts +79 -0
- package/dashboard/.next/types/app/api/code/route.ts +343 -0
- package/dashboard/.next/types/app/api/flows/route.ts +343 -0
- package/dashboard/.next/types/app/api/github-status/route.ts +343 -0
- package/dashboard/.next/types/app/api/issues/[id]/move/route.ts +343 -0
- package/dashboard/.next/types/app/api/issues/[id]/route.ts +343 -0
- package/dashboard/.next/types/app/api/mermaid/route.ts +343 -0
- package/dashboard/.next/types/app/api/progress/route.ts +343 -0
- package/dashboard/.next/types/app/api/watch/route.ts +343 -0
- package/dashboard/.next/types/app/calls/page.ts +79 -0
- package/dashboard/.next/types/app/conformance/page.ts +79 -0
- package/dashboard/.next/types/app/diagram/page.ts +79 -0
- package/dashboard/.next/types/app/flows/page.ts +79 -0
- package/dashboard/.next/types/app/functions/page.ts +79 -0
- package/dashboard/.next/types/app/issues/page.ts +79 -0
- package/dashboard/.next/types/app/page.ts +79 -0
- package/dashboard/.next/types/app/progress/page.ts +79 -0
- package/dashboard/.next/types/app/stats/page.ts +79 -0
- package/dashboard/.next/types/package.json +1 -0
- package/dashboard/app/access/AccessClient.tsx +402 -0
- package/dashboard/app/access/ReadOnlyFunctions.tsx +114 -0
- package/dashboard/app/access/page.tsx +118 -0
- package/dashboard/app/api/code/route.ts +35 -0
- package/dashboard/app/api/flows/route.ts +28 -0
- package/dashboard/app/api/github-status/route.ts +23 -0
- package/dashboard/app/api/issues/[id]/move/route.ts +74 -0
- package/dashboard/app/api/issues/[id]/route.ts +109 -0
- package/dashboard/app/api/mermaid/route.ts +25 -0
- package/dashboard/app/api/progress/route.ts +36 -0
- package/dashboard/app/api/watch/route.ts +52 -0
- package/dashboard/app/calls/CallsClient.tsx +170 -0
- package/dashboard/app/calls/page.tsx +50 -0
- package/dashboard/app/conformance/ConformanceTable.tsx +214 -0
- package/dashboard/app/conformance/page.tsx +179 -0
- package/dashboard/app/diagram/page.tsx +65 -0
- package/dashboard/app/flows/page.tsx +102 -0
- package/dashboard/app/functions/FunctionsClient.tsx +167 -0
- package/dashboard/app/functions/page.tsx +171 -0
- package/dashboard/app/globals.css +157 -0
- package/dashboard/app/icon.svg +18 -0
- package/dashboard/app/issues/IssuesBoardClient.tsx +636 -0
- package/dashboard/app/issues/page.tsx +239 -0
- package/dashboard/app/layout.tsx +40 -0
- package/dashboard/app/page.tsx +259 -0
- package/dashboard/app/progress/ProgressClient.tsx +333 -0
- package/dashboard/app/progress/page.tsx +118 -0
- package/dashboard/app/stats/StatsClient.tsx +452 -0
- package/dashboard/app/stats/page.tsx +43 -0
- package/dashboard/components/AutoRefresh.tsx +37 -0
- package/dashboard/components/CodeReference.tsx +129 -0
- package/dashboard/components/CommandPalette.tsx +135 -0
- package/dashboard/components/ConfidenceBadge.tsx +53 -0
- package/dashboard/components/DashboardLayout.tsx +450 -0
- package/dashboard/components/FilterableTable.tsx +293 -0
- package/dashboard/components/LiveStatus.tsx +99 -0
- package/dashboard/components/MarkdownRenderer.tsx +40 -0
- package/dashboard/components/MermaidViewer.tsx +267 -0
- package/dashboard/components/NotYetGenerated.tsx +32 -0
- package/dashboard/components/SeverityBadge.tsx +28 -0
- package/dashboard/components/SignalBars.tsx +27 -0
- package/dashboard/components/SortableTable.tsx +122 -0
- package/dashboard/lib/conformance-tokens.ts +49 -0
- package/dashboard/lib/data.ts +102 -0
- package/dashboard/lib/watcher.ts +45 -0
- package/dashboard/next-env.d.ts +5 -0
- package/dashboard/next.config.mjs +9 -0
- package/dashboard/postcss.config.cjs +6 -0
- package/dashboard/tailwind.config.ts +79 -0
- package/dashboard/tsconfig.json +21 -0
- package/dist/analysis/access-control.d.ts +24 -0
- package/dist/analysis/access-control.d.ts.map +1 -0
- package/dist/analysis/access-control.js +378 -0
- package/dist/analysis/access-control.js.map +1 -0
- package/dist/analysis/attack-surface.d.ts +51 -0
- package/dist/analysis/attack-surface.d.ts.map +1 -0
- package/dist/analysis/attack-surface.js +206 -0
- package/dist/analysis/attack-surface.js.map +1 -0
- package/dist/analysis/constraint-extraction.d.ts +25 -0
- package/dist/analysis/constraint-extraction.d.ts.map +1 -0
- package/dist/analysis/constraint-extraction.js +398 -0
- package/dist/analysis/constraint-extraction.js.map +1 -0
- package/dist/analysis/context-assembler.d.ts +16 -0
- package/dist/analysis/context-assembler.d.ts.map +1 -0
- package/dist/analysis/context-assembler.js +88 -0
- package/dist/analysis/context-assembler.js.map +1 -0
- package/dist/analysis/dependency-graph.d.ts +31 -0
- package/dist/analysis/dependency-graph.d.ts.map +1 -0
- package/dist/analysis/dependency-graph.js +223 -0
- package/dist/analysis/dependency-graph.js.map +1 -0
- package/dist/analysis/erc-detection.d.ts +16 -0
- package/dist/analysis/erc-detection.d.ts.map +1 -0
- package/dist/analysis/erc-detection.js +81 -0
- package/dist/analysis/erc-detection.js.map +1 -0
- package/dist/analysis/external-calls.d.ts +8 -0
- package/dist/analysis/external-calls.d.ts.map +1 -0
- package/dist/analysis/external-calls.js +124 -0
- package/dist/analysis/external-calls.js.map +1 -0
- package/dist/analysis/nsloc.d.ts +46 -0
- package/dist/analysis/nsloc.d.ts.map +1 -0
- package/dist/analysis/nsloc.js +106 -0
- package/dist/analysis/nsloc.js.map +1 -0
- package/dist/analysis/pattern-detection.d.ts +20 -0
- package/dist/analysis/pattern-detection.d.ts.map +1 -0
- package/dist/analysis/pattern-detection.js +236 -0
- package/dist/analysis/pattern-detection.js.map +1 -0
- package/dist/analysis/state-variables.d.ts +33 -0
- package/dist/analysis/state-variables.d.ts.map +1 -0
- package/dist/analysis/state-variables.js +179 -0
- package/dist/analysis/state-variables.js.map +1 -0
- package/dist/commands/access.d.ts +3 -0
- package/dist/commands/access.d.ts.map +1 -0
- package/dist/commands/access.js +99 -0
- package/dist/commands/access.js.map +1 -0
- package/dist/commands/ai-status.d.ts +3 -0
- package/dist/commands/ai-status.d.ts.map +1 -0
- package/dist/commands/ai-status.js +172 -0
- package/dist/commands/ai-status.js.map +1 -0
- package/dist/commands/analyze.d.ts +3 -0
- package/dist/commands/analyze.d.ts.map +1 -0
- package/dist/commands/analyze.js +101 -0
- package/dist/commands/analyze.js.map +1 -0
- package/dist/commands/calls.d.ts +3 -0
- package/dist/commands/calls.d.ts.map +1 -0
- package/dist/commands/calls.js +92 -0
- package/dist/commands/calls.js.map +1 -0
- package/dist/commands/claude.d.ts +3 -0
- package/dist/commands/claude.d.ts.map +1 -0
- package/dist/commands/claude.js +42 -0
- package/dist/commands/claude.js.map +1 -0
- package/dist/commands/constraints.d.ts +3 -0
- package/dist/commands/constraints.d.ts.map +1 -0
- package/dist/commands/constraints.js +32 -0
- package/dist/commands/constraints.js.map +1 -0
- package/dist/commands/context.d.ts +3 -0
- package/dist/commands/context.d.ts.map +1 -0
- package/dist/commands/context.js +57 -0
- package/dist/commands/context.js.map +1 -0
- package/dist/commands/dashboard.d.ts +3 -0
- package/dist/commands/dashboard.d.ts.map +1 -0
- package/dist/commands/dashboard.js +95 -0
- package/dist/commands/dashboard.js.map +1 -0
- package/dist/commands/deps.d.ts +3 -0
- package/dist/commands/deps.d.ts.map +1 -0
- package/dist/commands/deps.js +67 -0
- package/dist/commands/deps.js.map +1 -0
- package/dist/commands/doctor.d.ts +17 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +154 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +330 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/patterns.d.ts +3 -0
- package/dist/commands/patterns.d.ts.map +1 -0
- package/dist/commands/patterns.js +40 -0
- package/dist/commands/patterns.js.map +1 -0
- package/dist/commands/state.d.ts +3 -0
- package/dist/commands/state.d.ts.map +1 -0
- package/dist/commands/state.js +92 -0
- package/dist/commands/state.js.map +1 -0
- package/dist/commands/stats.d.ts +3 -0
- package/dist/commands/stats.d.ts.map +1 -0
- package/dist/commands/stats.js +347 -0
- package/dist/commands/stats.js.map +1 -0
- package/dist/commands/surface.d.ts +3 -0
- package/dist/commands/surface.d.ts.map +1 -0
- package/dist/commands/surface.js +45 -0
- package/dist/commands/surface.js.map +1 -0
- package/dist/commands/update-skills.d.ts +3 -0
- package/dist/commands/update-skills.d.ts.map +1 -0
- package/dist/commands/update-skills.js +40 -0
- package/dist/commands/update-skills.js.map +1 -0
- package/dist/commands/update.d.ts +3 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +157 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/core/config.d.ts +24 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +70 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/errors.d.ts +17 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +113 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/external-tools.d.ts +39 -0
- package/dist/core/external-tools.d.ts.map +1 -0
- package/dist/core/external-tools.js +151 -0
- package/dist/core/external-tools.js.map +1 -0
- package/dist/core/logger.d.ts +16 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +22 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/output.d.ts +13 -0
- package/dist/core/output.d.ts.map +1 -0
- package/dist/core/output.js +45 -0
- package/dist/core/output.js.map +1 -0
- package/dist/core/paths.d.ts +21 -0
- package/dist/core/paths.d.ts.map +1 -0
- package/dist/core/paths.js +32 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/progress.d.ts +34 -0
- package/dist/core/progress.d.ts.map +1 -0
- package/dist/core/progress.js +119 -0
- package/dist/core/progress.js.map +1 -0
- package/dist/core/schema.d.ts +3197 -0
- package/dist/core/schema.d.ts.map +1 -0
- package/dist/core/schema.js +420 -0
- package/dist/core/schema.js.map +1 -0
- package/dist/core/skills.d.ts +28 -0
- package/dist/core/skills.d.ts.map +1 -0
- package/dist/core/skills.js +82 -0
- package/dist/core/skills.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/parsers/lcov.d.ts +27 -0
- package/dist/parsers/lcov.d.ts.map +1 -0
- package/dist/parsers/lcov.js +68 -0
- package/dist/parsers/lcov.js.map +1 -0
- package/dist/parsers/slither.d.ts +63 -0
- package/dist/parsers/slither.d.ts.map +1 -0
- package/dist/parsers/slither.js +160 -0
- package/dist/parsers/slither.js.map +1 -0
- package/dist/parsers/solc.d.ts +19 -0
- package/dist/parsers/solc.d.ts.map +1 -0
- package/dist/parsers/solc.js +43 -0
- package/dist/parsers/solc.js.map +1 -0
- package/dist/parsers/solidity-parser.d.ts +77 -0
- package/dist/parsers/solidity-parser.d.ts.map +1 -0
- package/dist/parsers/solidity-parser.js +357 -0
- package/dist/parsers/solidity-parser.js.map +1 -0
- package/dist/skills/generate-overleaf.md +326 -0
- package/dist/skills/generate-poc.md +186 -0
- package/dist/skills/ingest-aa-report.md +172 -0
- package/dist/skills/init-audit.md +271 -0
- package/dist/skills/sync-issues.md +266 -0
- package/dist/skills/validate-issue.md +149 -0
- package/dist/skills/write-finding.md +142 -0
- package/dist/types/index.d.ts +30 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +81 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { readJsonFile, readNestedJsonFile, listSubdirs } from '@/lib/data';
|
|
2
|
+
import { NotYetGenerated } from '@/components/NotYetGenerated';
|
|
3
|
+
import { IssuesBoardClient, type BoardIssue } from './IssuesBoardClient';
|
|
4
|
+
|
|
5
|
+
interface FindingsFile {
|
|
6
|
+
findings: Array<{
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
severity: 'Critical' | 'High' | 'Medium' | 'Low' | 'Info';
|
|
10
|
+
description?: string;
|
|
11
|
+
recommendation?: string;
|
|
12
|
+
resolution?: string;
|
|
13
|
+
update_from_client?: string;
|
|
14
|
+
root_cause?: { locations?: Array<{ file: string; snippet?: string }> };
|
|
15
|
+
poc?: { status?: string; file?: string | null; validation_memo?: string | null };
|
|
16
|
+
github?: { issue_number?: number; issue_url?: string; state?: string };
|
|
17
|
+
category?: string;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface TrackingFile {
|
|
22
|
+
findings: Array<{
|
|
23
|
+
id: string;
|
|
24
|
+
title: string;
|
|
25
|
+
severity: 'Critical' | 'High' | 'Medium' | 'Low' | 'Info';
|
|
26
|
+
source?: string;
|
|
27
|
+
status?: string;
|
|
28
|
+
poc_status?: string;
|
|
29
|
+
poc_file?: string | null;
|
|
30
|
+
duplicates?: string[];
|
|
31
|
+
duplicate_of?: string | null;
|
|
32
|
+
notes?: string;
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface ComparisonFile {
|
|
37
|
+
duplicates?: Array<{
|
|
38
|
+
ai_finding: string;
|
|
39
|
+
matches: string;
|
|
40
|
+
confidence?: string;
|
|
41
|
+
match_signals?: Record<string, boolean | string>;
|
|
42
|
+
reasoning?: string;
|
|
43
|
+
}>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface AiResultFile {
|
|
47
|
+
tool: string;
|
|
48
|
+
findings: Array<{
|
|
49
|
+
id: string;
|
|
50
|
+
title: string;
|
|
51
|
+
severity: 'Critical' | 'High' | 'Medium' | 'Low' | 'Info';
|
|
52
|
+
description?: string;
|
|
53
|
+
affected_code?: Array<{ file: string; snippet?: string }>;
|
|
54
|
+
category?: string;
|
|
55
|
+
}>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
interface SpecConformanceFile {
|
|
59
|
+
items?: Array<{
|
|
60
|
+
id: string;
|
|
61
|
+
spec_text: string;
|
|
62
|
+
spec_location?: Record<string, unknown>;
|
|
63
|
+
status: 'CONFORMS' | 'DEVIATES' | 'PARTIAL' | 'UNVERIFIABLE' | 'UNDOCUMENTED';
|
|
64
|
+
finding: string;
|
|
65
|
+
code_location?: { file: string; line_start?: number; line_end?: number };
|
|
66
|
+
severity_hint?: 'Critical' | 'High' | 'Medium' | 'Low' | 'Info';
|
|
67
|
+
}>;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function statusToColumn(status: string | undefined): BoardIssue['column'] {
|
|
71
|
+
switch (status) {
|
|
72
|
+
case 'verified':
|
|
73
|
+
return 'verified';
|
|
74
|
+
case 'rejected':
|
|
75
|
+
return 'invalid';
|
|
76
|
+
case 'duplicate':
|
|
77
|
+
return 'duplicate';
|
|
78
|
+
case 'pending_validation':
|
|
79
|
+
case 'unverified':
|
|
80
|
+
default:
|
|
81
|
+
return 'potential';
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function buildBoardIssues(): BoardIssue[] {
|
|
86
|
+
const findings = readJsonFile<FindingsFile>('findings.json') ?? { findings: [] };
|
|
87
|
+
const tracking = readJsonFile<TrackingFile>('tracking.json') ?? { findings: [] };
|
|
88
|
+
const comparison = readJsonFile<ComparisonFile>('comparison.json') ?? { duplicates: [] };
|
|
89
|
+
const spec = readJsonFile<SpecConformanceFile>('spec-conformance.json') ?? { items: [] };
|
|
90
|
+
|
|
91
|
+
const findingById = new Map(findings.findings.map((f) => [f.id, f]));
|
|
92
|
+
const specById = new Map((spec.items ?? []).map((s) => [s.id, s]));
|
|
93
|
+
|
|
94
|
+
// AI results: enumerate all subdirs under ai-results/ so future tools (or
|
|
95
|
+
// legacy projects) still surface. Today only auditagent is officially
|
|
96
|
+
// supported.
|
|
97
|
+
const aiTools = listSubdirs('ai-results');
|
|
98
|
+
const aiById = new Map<string, AiResultFile['findings'][number] & { tool: string }>();
|
|
99
|
+
for (const tool of aiTools) {
|
|
100
|
+
const file = readNestedJsonFile<AiResultFile>(`ai-results/${tool}/findings.json`);
|
|
101
|
+
if (!file) continue;
|
|
102
|
+
for (const f of file.findings ?? []) {
|
|
103
|
+
aiById.set(f.id, { ...f, tool: file.tool ?? tool });
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// External github findings live under external/<source>/findings.json.
|
|
108
|
+
const externalSources = listSubdirs('external');
|
|
109
|
+
for (const source of externalSources) {
|
|
110
|
+
const file = readNestedJsonFile<AiResultFile>(`external/${source}/findings.json`);
|
|
111
|
+
if (!file) continue;
|
|
112
|
+
for (const f of file.findings ?? []) {
|
|
113
|
+
aiById.set(f.id, { ...f, tool: file.tool ?? source });
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const matchByLocalId = new Map<string, NonNullable<ComparisonFile['duplicates']>[number]>();
|
|
118
|
+
for (const dup of comparison.duplicates ?? []) {
|
|
119
|
+
// The schema field is named `ai_finding` historically but the dedup direction
|
|
120
|
+
// depends on source — for github-canonical hits, ai_finding is actually the
|
|
121
|
+
// local id that became the duplicate.
|
|
122
|
+
matchByLocalId.set(dup.ai_finding, dup);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const issues: BoardIssue[] = [];
|
|
126
|
+
|
|
127
|
+
// Pass 1: every tracking entry (canonical source for status + source).
|
|
128
|
+
for (const t of tracking.findings) {
|
|
129
|
+
const finding = findingById.get(t.id);
|
|
130
|
+
const aiFinding = aiById.get(t.id);
|
|
131
|
+
const specItem = specById.get(t.id);
|
|
132
|
+
|
|
133
|
+
const description = finding?.description ?? aiFinding?.description ?? specItem?.finding ?? '';
|
|
134
|
+
const recommendation = finding?.recommendation ?? '';
|
|
135
|
+
const resolution = finding?.resolution;
|
|
136
|
+
const updateFromClient = finding?.update_from_client;
|
|
137
|
+
|
|
138
|
+
const locations: BoardIssue['code_locations'] = [];
|
|
139
|
+
if (finding?.root_cause?.locations) {
|
|
140
|
+
for (const loc of finding.root_cause.locations) {
|
|
141
|
+
locations.push({ file: loc.file, snippet: loc.snippet });
|
|
142
|
+
}
|
|
143
|
+
} else if (aiFinding?.affected_code) {
|
|
144
|
+
for (const loc of aiFinding.affected_code) {
|
|
145
|
+
locations.push({ file: loc.file, snippet: loc.snippet });
|
|
146
|
+
}
|
|
147
|
+
} else if (specItem?.code_location?.file) {
|
|
148
|
+
locations.push({ file: specItem.code_location.file });
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
const dup = matchByLocalId.get(t.id);
|
|
152
|
+
const matchSignals = dup?.match_signals
|
|
153
|
+
? {
|
|
154
|
+
contract: Boolean(dup.match_signals.contract),
|
|
155
|
+
function: Boolean(dup.match_signals.function),
|
|
156
|
+
root_cause: String(dup.match_signals.root_cause ?? ''),
|
|
157
|
+
attack_vector: String(dup.match_signals.attack_vector ?? ''),
|
|
158
|
+
}
|
|
159
|
+
: undefined;
|
|
160
|
+
|
|
161
|
+
issues.push({
|
|
162
|
+
id: t.id,
|
|
163
|
+
title: t.title || finding?.title || aiFinding?.title || specItem?.spec_text || t.id,
|
|
164
|
+
severity: t.severity,
|
|
165
|
+
source: (t.source as BoardIssue['source']) ?? 'manual',
|
|
166
|
+
status: (t.status as BoardIssue['status']) ?? 'pending_validation',
|
|
167
|
+
column: statusToColumn(t.status),
|
|
168
|
+
description,
|
|
169
|
+
recommendation,
|
|
170
|
+
resolution,
|
|
171
|
+
update_from_client: updateFromClient,
|
|
172
|
+
code_locations: locations,
|
|
173
|
+
github_synced: Boolean(finding?.github?.issue_number),
|
|
174
|
+
github_issue_url: finding?.github?.issue_url,
|
|
175
|
+
github_state: finding?.github?.state,
|
|
176
|
+
duplicate_of: t.duplicate_of ?? dup?.matches ?? null,
|
|
177
|
+
match_signals: matchSignals,
|
|
178
|
+
reasoning: dup?.reasoning,
|
|
179
|
+
has_finding_record: Boolean(finding),
|
|
180
|
+
category: finding?.category ?? aiFinding?.category,
|
|
181
|
+
poc_status: t.poc_status as BoardIssue['poc_status'],
|
|
182
|
+
poc_file: t.poc_file ?? finding?.poc?.file ?? null,
|
|
183
|
+
notes: t.notes ?? '',
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Pass 2: findings.json entries that have no tracking row (legacy data).
|
|
188
|
+
// Render them as verified so we don't drop them silently.
|
|
189
|
+
const seen = new Set(issues.map((i) => i.id));
|
|
190
|
+
for (const f of findings.findings) {
|
|
191
|
+
if (seen.has(f.id)) continue;
|
|
192
|
+
issues.push({
|
|
193
|
+
id: f.id,
|
|
194
|
+
title: f.title,
|
|
195
|
+
severity: f.severity,
|
|
196
|
+
source: 'manual',
|
|
197
|
+
status: 'verified',
|
|
198
|
+
column: 'verified',
|
|
199
|
+
description: f.description ?? '',
|
|
200
|
+
recommendation: f.recommendation ?? '',
|
|
201
|
+
resolution: f.resolution,
|
|
202
|
+
update_from_client: f.update_from_client,
|
|
203
|
+
code_locations: f.root_cause?.locations ?? [],
|
|
204
|
+
github_synced: Boolean(f.github?.issue_number),
|
|
205
|
+
github_issue_url: f.github?.issue_url,
|
|
206
|
+
github_state: f.github?.state,
|
|
207
|
+
duplicate_of: null,
|
|
208
|
+
match_signals: undefined,
|
|
209
|
+
reasoning: undefined,
|
|
210
|
+
has_finding_record: true,
|
|
211
|
+
category: f.category,
|
|
212
|
+
poc_status: f.poc?.status as BoardIssue['poc_status'],
|
|
213
|
+
poc_file: f.poc?.file ?? null,
|
|
214
|
+
notes: '',
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
return issues;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export default function IssuesPage() {
|
|
222
|
+
const issues = buildBoardIssues();
|
|
223
|
+
|
|
224
|
+
if (issues.length === 0) {
|
|
225
|
+
return (
|
|
226
|
+
<div>
|
|
227
|
+
<header className="mb-6">
|
|
228
|
+
<h1 className="text-title font-semibold text-text-primary">Issues</h1>
|
|
229
|
+
<p className="mt-1 text-body text-text-secondary">
|
|
230
|
+
Potential, Verified, Invalid, and Duplicate issues across all sources.
|
|
231
|
+
</p>
|
|
232
|
+
</header>
|
|
233
|
+
<NotYetGenerated command="/init-audit (then /write-finding or /ingest-aa-report)" />
|
|
234
|
+
</div>
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
return <IssuesBoardClient issues={issues} />;
|
|
239
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Metadata } from 'next';
|
|
2
|
+
import { Manrope, JetBrains_Mono } from 'next/font/google';
|
|
3
|
+
import { ThemeProvider } from 'next-themes';
|
|
4
|
+
import { DashboardLayout } from '@/components/DashboardLayout';
|
|
5
|
+
import { CommandPalette } from '@/components/CommandPalette';
|
|
6
|
+
import './globals.css';
|
|
7
|
+
|
|
8
|
+
const manrope = Manrope({
|
|
9
|
+
subsets: ['latin'],
|
|
10
|
+
variable: '--font-sans',
|
|
11
|
+
display: 'swap',
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const jetbrainsMono = JetBrains_Mono({
|
|
15
|
+
subsets: ['latin'],
|
|
16
|
+
variable: '--font-mono',
|
|
17
|
+
display: 'swap',
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const metadata: Metadata = {
|
|
21
|
+
title: 'Hex',
|
|
22
|
+
description: 'Local dashboard for Solidity smart contract audits',
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default function RootLayout({
|
|
26
|
+
children,
|
|
27
|
+
}: {
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
}) {
|
|
30
|
+
return (
|
|
31
|
+
<html lang="en" suppressHydrationWarning>
|
|
32
|
+
<body className={`${manrope.variable} ${jetbrainsMono.variable} min-h-screen bg-surface-0 text-text-primary font-sans`}>
|
|
33
|
+
<ThemeProvider attribute="data-theme" defaultTheme="dark" enableSystem={false}>
|
|
34
|
+
<CommandPalette />
|
|
35
|
+
<DashboardLayout>{children}</DashboardLayout>
|
|
36
|
+
</ThemeProvider>
|
|
37
|
+
</body>
|
|
38
|
+
</html>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import Link from 'next/link';
|
|
2
|
+
import { readJsonFile, readMarkdownFile } from '@/lib/data';
|
|
3
|
+
import { NotYetGenerated } from '@/components/NotYetGenerated';
|
|
4
|
+
import { MarkdownRenderer } from '@/components/MarkdownRenderer';
|
|
5
|
+
|
|
6
|
+
interface ProjectConfig {
|
|
7
|
+
project: {
|
|
8
|
+
name: string;
|
|
9
|
+
commit: string;
|
|
10
|
+
chain: string;
|
|
11
|
+
solidity_version: string;
|
|
12
|
+
scope: string[];
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface Stats {
|
|
17
|
+
totals: {
|
|
18
|
+
files: number;
|
|
19
|
+
contracts: number;
|
|
20
|
+
interfaces: number;
|
|
21
|
+
libraries: number;
|
|
22
|
+
abstract_contracts: number;
|
|
23
|
+
total_lines: number;
|
|
24
|
+
nsloc: number;
|
|
25
|
+
comment_lines: number;
|
|
26
|
+
blank_lines: number;
|
|
27
|
+
assembly_lines: number;
|
|
28
|
+
};
|
|
29
|
+
per_contract: {
|
|
30
|
+
external_functions: number;
|
|
31
|
+
}[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface FindingsData {
|
|
35
|
+
findings: { id: string; severity: string }[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface ExternalCallsData {
|
|
39
|
+
calls: unknown[];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const NAV_LINKS = [
|
|
43
|
+
{
|
|
44
|
+
href: '/stats',
|
|
45
|
+
label: 'Stats',
|
|
46
|
+
description: 'Contract metrics, nSLOC, coverage',
|
|
47
|
+
icon: (
|
|
48
|
+
<svg
|
|
49
|
+
className="h-5 w-5"
|
|
50
|
+
aria-hidden="true"
|
|
51
|
+
fill="none"
|
|
52
|
+
viewBox="0 0 24 24"
|
|
53
|
+
stroke="currentColor"
|
|
54
|
+
strokeWidth={1.5}
|
|
55
|
+
>
|
|
56
|
+
<path
|
|
57
|
+
strokeLinecap="round"
|
|
58
|
+
strokeLinejoin="round"
|
|
59
|
+
d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"
|
|
60
|
+
/>
|
|
61
|
+
</svg>
|
|
62
|
+
),
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
href: '/access',
|
|
66
|
+
label: 'Access Control',
|
|
67
|
+
description: 'Roles, permissions, visibility',
|
|
68
|
+
icon: (
|
|
69
|
+
<svg
|
|
70
|
+
className="h-5 w-5"
|
|
71
|
+
aria-hidden="true"
|
|
72
|
+
fill="none"
|
|
73
|
+
viewBox="0 0 24 24"
|
|
74
|
+
stroke="currentColor"
|
|
75
|
+
strokeWidth={1.5}
|
|
76
|
+
>
|
|
77
|
+
<path
|
|
78
|
+
strokeLinecap="round"
|
|
79
|
+
strokeLinejoin="round"
|
|
80
|
+
d="M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"
|
|
81
|
+
/>
|
|
82
|
+
</svg>
|
|
83
|
+
),
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
href: '/calls',
|
|
87
|
+
label: 'External Calls',
|
|
88
|
+
description: 'Cross-contract calls, trust levels',
|
|
89
|
+
icon: (
|
|
90
|
+
<svg
|
|
91
|
+
className="h-5 w-5"
|
|
92
|
+
aria-hidden="true"
|
|
93
|
+
fill="none"
|
|
94
|
+
viewBox="0 0 24 24"
|
|
95
|
+
stroke="currentColor"
|
|
96
|
+
strokeWidth={1.5}
|
|
97
|
+
>
|
|
98
|
+
<path
|
|
99
|
+
strokeLinecap="round"
|
|
100
|
+
strokeLinejoin="round"
|
|
101
|
+
d="M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"
|
|
102
|
+
/>
|
|
103
|
+
</svg>
|
|
104
|
+
),
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
href: '/issues',
|
|
108
|
+
label: 'Issues',
|
|
109
|
+
description: 'Potential, verified, invalid, and duplicate issues',
|
|
110
|
+
icon: (
|
|
111
|
+
<svg
|
|
112
|
+
className="h-5 w-5"
|
|
113
|
+
aria-hidden="true"
|
|
114
|
+
fill="none"
|
|
115
|
+
viewBox="0 0 24 24"
|
|
116
|
+
stroke="currentColor"
|
|
117
|
+
strokeWidth={1.5}
|
|
118
|
+
>
|
|
119
|
+
<path
|
|
120
|
+
strokeLinecap="round"
|
|
121
|
+
strokeLinejoin="round"
|
|
122
|
+
d="M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"
|
|
123
|
+
/>
|
|
124
|
+
</svg>
|
|
125
|
+
),
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
href: '/diagram',
|
|
129
|
+
label: 'Diagram',
|
|
130
|
+
description: 'Contract architecture visualization',
|
|
131
|
+
icon: (
|
|
132
|
+
<svg
|
|
133
|
+
className="h-5 w-5"
|
|
134
|
+
aria-hidden="true"
|
|
135
|
+
fill="none"
|
|
136
|
+
viewBox="0 0 24 24"
|
|
137
|
+
stroke="currentColor"
|
|
138
|
+
strokeWidth={1.5}
|
|
139
|
+
>
|
|
140
|
+
<path
|
|
141
|
+
strokeLinecap="round"
|
|
142
|
+
strokeLinejoin="round"
|
|
143
|
+
d="M7.5 3.75H6A2.25 2.25 0 0 0 3.75 6v1.5M16.5 3.75H18A2.25 2.25 0 0 1 20.25 6v1.5m0 9V18A2.25 2.25 0 0 1 18 20.25h-1.5m-9 0H6A2.25 2.25 0 0 1 3.75 18v-1.5M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
|
|
144
|
+
/>
|
|
145
|
+
</svg>
|
|
146
|
+
),
|
|
147
|
+
},
|
|
148
|
+
];
|
|
149
|
+
|
|
150
|
+
export default function HomePage() {
|
|
151
|
+
const config = readJsonFile<ProjectConfig>('config.json');
|
|
152
|
+
const overview = readMarkdownFile('overview.md');
|
|
153
|
+
const stats = readJsonFile<Stats>('stats.json');
|
|
154
|
+
const findingsData = readJsonFile<FindingsData>('findings.json');
|
|
155
|
+
const externalCallsData = readJsonFile<ExternalCallsData>('external-calls.json');
|
|
156
|
+
|
|
157
|
+
const totalExternalFunctions = stats
|
|
158
|
+
? stats.per_contract.reduce((sum, c) => sum + c.external_functions, 0)
|
|
159
|
+
: null;
|
|
160
|
+
const totalFindings = findingsData?.findings?.length ?? null;
|
|
161
|
+
const totalExternalCalls = externalCallsData?.calls?.length ?? null;
|
|
162
|
+
|
|
163
|
+
return (
|
|
164
|
+
<div>
|
|
165
|
+
{/* Project header */}
|
|
166
|
+
<div className="mb-6">
|
|
167
|
+
<h1 className="text-title font-semibold text-text-primary">
|
|
168
|
+
{config?.project.name ?? 'Hex Dashboard'}
|
|
169
|
+
</h1>
|
|
170
|
+
{config && (
|
|
171
|
+
<div className="mt-2 flex flex-wrap items-center gap-2">
|
|
172
|
+
<span className="rounded-md bg-accent-subtle px-2.5 py-1 text-caption font-medium text-accent">
|
|
173
|
+
{config.project.chain}
|
|
174
|
+
</span>
|
|
175
|
+
<span className="rounded-md bg-surface-2 px-2.5 py-1 text-caption text-text-tertiary">
|
|
176
|
+
{config.project.commit.slice(0, 8)}
|
|
177
|
+
</span>
|
|
178
|
+
<span className="text-caption text-text-tertiary">
|
|
179
|
+
Solidity {config.project.solidity_version}
|
|
180
|
+
</span>
|
|
181
|
+
<span className="text-caption text-text-tertiary">
|
|
182
|
+
{config.project.scope.length} file{config.project.scope.length !== 1 ? 's' : ''} in
|
|
183
|
+
scope
|
|
184
|
+
</span>
|
|
185
|
+
</div>
|
|
186
|
+
)}
|
|
187
|
+
</div>
|
|
188
|
+
|
|
189
|
+
{/* KPI cards */}
|
|
190
|
+
<div className="mb-6 grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5 stagger">
|
|
191
|
+
<KpiCard label="Contracts" value={stats?.totals.contracts} href="/stats" />
|
|
192
|
+
<KpiCard label="nSLOC" value={stats?.totals.nsloc?.toLocaleString()} href="/stats" />
|
|
193
|
+
<KpiCard label="Functions" value={totalExternalFunctions} href="/functions" />
|
|
194
|
+
<KpiCard label="Ext Calls" value={totalExternalCalls} href="/calls" />
|
|
195
|
+
<KpiCard label="Issues" value={totalFindings} href="/issues" />
|
|
196
|
+
</div>
|
|
197
|
+
|
|
198
|
+
{/* Overview */}
|
|
199
|
+
<div className="mb-6">
|
|
200
|
+
{overview ? (
|
|
201
|
+
<div className="rounded-lg border border-border-subtle bg-surface-1 p-6">
|
|
202
|
+
<div className="mx-auto max-w-3xl">
|
|
203
|
+
<MarkdownRenderer content={overview} />
|
|
204
|
+
</div>
|
|
205
|
+
</div>
|
|
206
|
+
) : (
|
|
207
|
+
<NotYetGenerated command="hex overview" />
|
|
208
|
+
)}
|
|
209
|
+
</div>
|
|
210
|
+
|
|
211
|
+
{/* Quick nav tiles */}
|
|
212
|
+
<div className="grid gap-3 sm:grid-cols-2 lg:grid-cols-3 stagger">
|
|
213
|
+
{NAV_LINKS.map((item) => (
|
|
214
|
+
<Link
|
|
215
|
+
key={item.href}
|
|
216
|
+
href={item.href}
|
|
217
|
+
className="group flex items-start gap-3 rounded-lg border border-border-subtle bg-surface-1 p-4 hover:border-border-default hover:bg-surface-2"
|
|
218
|
+
>
|
|
219
|
+
<div className="shrink-0 text-text-tertiary group-hover:text-accent">{item.icon}</div>
|
|
220
|
+
<div>
|
|
221
|
+
<h3 className="text-heading font-medium text-text-primary group-hover:text-accent">
|
|
222
|
+
{item.label}
|
|
223
|
+
</h3>
|
|
224
|
+
<p className="mt-0.5 text-caption text-text-secondary">{item.description}</p>
|
|
225
|
+
</div>
|
|
226
|
+
</Link>
|
|
227
|
+
))}
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function KpiCard({
|
|
234
|
+
label,
|
|
235
|
+
value,
|
|
236
|
+
href,
|
|
237
|
+
}: {
|
|
238
|
+
label: string;
|
|
239
|
+
value: string | number | null | undefined;
|
|
240
|
+
href?: string;
|
|
241
|
+
}) {
|
|
242
|
+
const isMuted = value == null;
|
|
243
|
+
const inner = (
|
|
244
|
+
<div
|
|
245
|
+
className={`rounded-lg border border-border-subtle bg-surface-1 p-4 ${href ? 'hover:border-border-default hover:bg-surface-2 cursor-pointer' : ''}`}
|
|
246
|
+
>
|
|
247
|
+
<div
|
|
248
|
+
className={`text-display scale-in ${isMuted ? 'text-text-tertiary' : 'text-text-primary'}`}
|
|
249
|
+
>
|
|
250
|
+
{value ?? '--'}
|
|
251
|
+
</div>
|
|
252
|
+
<div className="mt-1 text-caption text-text-secondary">{label}</div>
|
|
253
|
+
</div>
|
|
254
|
+
);
|
|
255
|
+
if (href) {
|
|
256
|
+
return <Link href={href}>{inner}</Link>;
|
|
257
|
+
}
|
|
258
|
+
return inner;
|
|
259
|
+
}
|