next.js
1a6a32cc - Show security upgrade insights in DevTools (#99002)

Commit
31 days ago
Show security upgrade insights in DevTools (#99002) Stacked on #99222. ### Why? Developers running `next dev` with `agenticAutoUpgrade` enabled need a browser reminder when their installed Next.js version is affected by a security advisory. ### How? Assess upgrades once during dev startup and share the result with the CLI nudge. The existing HMR `SYNC` message carries the security advisory to DevTools, which shows a Vulnerability Insight in the existing Insights overlay with a copyable upgrade prompt. The Insight applies to the `security`, `latest`, and `future` policies when the assessment finds an affected version and a safe target. A private test override previews the UI without a vulnerable fixture or live advisory data. ### Screenshots These show the badge and overlay layout. The current copied prompt runs `next upgrade --ai=security` from the app directory. **DevTools badge** ![DevTools badge](https://github.com/user-attachments/assets/d6af6daf-0501-497c-aa3f-fe0f95351bc1) | Light | Dark | | --- | --- | | ![Overlay in light mode](https://github.com/user-attachments/assets/e7a7e194-0595-41e6-97b6-b54c05c14aa7) | ![Overlay in dark mode](https://github.com/user-attachments/assets/1b80b7d7-376b-4883-a8d1-3ee7354c92ab) | <!-- NEXT_JS_LLM --> Closes NAR-939
Author
Parents
Loading