Skip to content

[VW-269] Add network flow data + visualize this #137

Merged
0xcad merged 7 commits into
mainfrom
VW-269
May 22, 2026
Merged

[VW-269] Add network flow data + visualize this #137
0xcad merged 7 commits into
mainfrom
VW-269

Conversation

@0xcad
Copy link
Copy Markdown
Collaborator

@0xcad 0xcad commented May 21, 2026

  • Add new API endpoint that will proxy to a future VL endpoint
  • Using this VL proxy, enrich the data with VIPER asset information in a new internal endpoint
  • Visualize network flow data in a Sankey diagram in asset inventory
  • Modify seed data with new assets + seeded flow
image

@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
viper Ready Ready Preview, Comment May 21, 2026 11:40pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
viper-demo Ignored Ignored May 21, 2026 11:40pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

Warning

Rate limit exceeded

@0xcad has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 58 minutes and 30 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1664dfa3-ed88-4f1b-974f-1d3189cb5421

📥 Commits

Reviewing files that changed from the base of the PR and between d1d9da0 and b859762.

📒 Files selected for processing (7)
  • .env.example
  • prisma/flow.json
  • prisma/seed.ts
  • src/features/assets/components/asset-drawer.tsx
  • src/features/network/server/router.ts
  • src/features/network/types.ts
  • src/trpc/routers/_app.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch VW-269

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread prisma/flow.json
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Seeded network flow information. Eventually, we'll anticipate getting this info from Virta Labs.

So to make the architecture more realistic / write code now that'll be used later, when testing I just serve this from some other server as a static file. There's an env var, NETWORK_FLOW_URL, that we configure to pull data from this static file server. Eventually, NETWORK_FLOW_URL with point to a Blueflow endpoint

Comment thread prisma/seed.ts
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

added static id's to get this to work with flow.json

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Network flow gets visualized for assets in a 1-hop neighborhood, in the device asset drawer

// Network Flow Section
// ============================================================================

const PORT_PROTOCOL_MAP: Record<number, string> = {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Visualize using a Sankey diagram. We point from source (Asset) -> app traffic (e.g, HTTP, HTTPS, DICOM, etc) -> dest (another asset, show that asset's IP address in a tooltip)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Copied from flow.json comment:

Seeded network flow information. Eventually, we'll anticipate getting this info from Virta Labs.

So to make the architecture more realistic / write code now that'll be used later, when testing I just serve this from some other server as a static file. There's an env var, NETWORK_FLOW_URL, that we configure to pull data from this static file server. Eventually, NETWORK_FLOW_URL with point to a Blueflow endpoint

We have an API endpoint that essentially just proxies this data, and an internal API endpoint that enriches asset data with VIPER asset information, and returns only data in a 1-hop neighborhood for a provided VIPER asset. internal api endpint used in visualization

@0xcad 0xcad merged commit ef12445 into main May 22, 2026
7 checks passed
@0xcad 0xcad deleted the VW-269 branch May 22, 2026 16:50
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.

2 participants