<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Anuththara Wickramasekara </title>
    <description>The latest articles on DEV Community by Anuththara Wickramasekara  (@anuththara2007w).</description>
    <link>https://dev.to/anuththara2007w</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3406073%2F1cd5f332-6cfb-47b0-ab8f-7a38583f28fb.jpeg</url>
      <title>DEV Community: Anuththara Wickramasekara </title>
      <link>https://dev.to/anuththara2007w</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anuththara2007w"/>
    <language>en</language>
    <item>
      <title>From Zero to Manifest V3: How GitHub Copilot Helped Me Finish an RSC Vulnerability Detector for CVE‑2025‑55182</title>
      <dc:creator>Anuththara Wickramasekara </dc:creator>
      <pubDate>Sun, 31 May 2026 14:20:47 +0000</pubDate>
      <link>https://dev.to/anuththara2007w/from-zero-to-manifest-v3-how-github-copilot-helped-me-finish-an-rsc-vulnerability-detector-for-22pp</link>
      <guid>https://dev.to/anuththara2007w/from-zero-to-manifest-v3-how-github-copilot-helped-me-finish-an-rsc-vulnerability-detector-for-22pp</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/github-2026-05-21"&gt;GitHub Finish-Up-A-Thon Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  From Zero to Manifest V3: How GitHub Copilot Helped Me Finish an RSC Vulnerability Detector for CVE-2025-55182
&lt;/h2&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;RSC Fingerprint Detector&lt;/strong&gt; - a Manifest V3 Chrome extension that performs &lt;strong&gt;passive and active reconnaissance&lt;/strong&gt; of React Server Components (RSC) and the &lt;strong&gt;React2Shell&lt;/strong&gt; vulnerability class (CVE-2025-55182, CVE-2025-66478). These vulnerabilities stem from unsafe deserialisation of the React Flight protocol, enabling unauthenticated remote code execution on any Next.js App Router endpoint.&lt;/p&gt;

&lt;p&gt;The extension implements a &lt;strong&gt;dual-phase detection pipeline&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Passive fingerprinting&lt;/strong&gt;: Heuristic analysis of the global namespace (&lt;code&gt;window.__next_f&lt;/code&gt;), script asset introspection (&lt;code&gt;react-server-dom-webpack&lt;/code&gt;), DOM attribute scanning (&lt;code&gt;data-rsc&lt;/code&gt;, &lt;code&gt;data-reactroot&lt;/code&gt;), and response header inspection (&lt;code&gt;Content-Type: text/x-component&lt;/code&gt;, &lt;code&gt;Vary: RSC&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Active probing&lt;/strong&gt;: A cross-origin fetch with a custom &lt;code&gt;X-RSC-Probe&lt;/code&gt; header, followed by content-type entropy analysis and Flight protocol signature extraction.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The original project was a 50-line ephemeral script that relied on manual DevTools injection. The finished version is a &lt;strong&gt;fully isolated, event-driven Chrome extension&lt;/strong&gt; with a declarative ruleset, persistent IndexedDB storage, and a reactive UI - all built with GitHub Copilot as the primary force multiplier.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Repository&lt;/strong&gt;: &lt;a href="https://github.com/anuththara2007-W/CVE-2025-55182-Exploit-extension" rel="noopener noreferrer"&gt;https://github.com/anuththara2007-W/CVE-2025-55182-Exploit-extension&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Visual proof of completion arc&lt;/strong&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Before (abandoned console script)&lt;/th&gt;
&lt;th&gt;After (production extension)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;em&gt;Only raw console output, no UI, single detection vector&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;&lt;em&gt;Modern popup, status badges, active probe results, CVE mapping&lt;/em&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Before screenshot&lt;/strong&gt;: &lt;a href="https://github.com/anuththara2007-W/CVE-2025-55182-Exploit-extension/raw/main/images/img1.png" rel="noopener noreferrer"&gt;https://github.com/anuththara2007-W/CVE-2025-55182-Exploit-extension/raw/main/images/img1.png&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;After screenshot&lt;/strong&gt;: &lt;a href="https://i.postimg.cc/wT2vX4xH/Annotation-2026-05-31-184616.png" rel="noopener noreferrer"&gt;https://i.postimg.cc/wT2vX4xH/Annotation-2026-05-31-184616.png&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Comeback Story
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;December 2025 - The CVE Disclosure&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
When CVE-2025-55182 was publicly disclosed (CVSS 10.0, unauthenticated RCE via Flight protocol deserialisation), I wrote a minimal Python script that checked for &lt;code&gt;window.__next_f&lt;/code&gt;. It worked, but it was a &lt;strong&gt;single-vector, synchronous, non-persistent&lt;/strong&gt; tool. Each scan required manual injection of the script into the target page's console. The script was abandoned after 48 hours because the effort to productionise it (manifest, permission handling, cross-context messaging, error recovery) exceeded the perceived value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;May 2026 - The Revival&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The Finish-Up-A-Thon provided a forcing function. Using GitHub Copilot as a &lt;strong&gt;context-aware pair programmer&lt;/strong&gt;, I transformed the script into a production extension with the following architectural improvements:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Original (Dec 2025)&lt;/th&gt;
&lt;th&gt;Finished (May 2026)&lt;/th&gt;
&lt;th&gt;Technical Depth&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Detection vectors&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1 (&lt;code&gt;window.__next_f&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;4 (globals, script asset fingerprinting, DOM attributes, response headers)&lt;/td&gt;
&lt;td&gt;Multi-heuristic fusion reduces false negatives&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Active fingerprinting&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;fetch&lt;/code&gt; with &lt;code&gt;X-RSC-Probe&lt;/code&gt;, content-type parsing, Flight protocol signature detection&lt;/td&gt;
&lt;td&gt;AbortController timeout, CORS-aware, idempotent retry&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Execution context&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Console injection&lt;/td&gt;
&lt;td&gt;Isolated content script + background service worker&lt;/td&gt;
&lt;td&gt;Cross-context message passing with &lt;code&gt;chrome.runtime.sendMessage&lt;/code&gt; and mandatory &lt;code&gt;return true&lt;/code&gt; for async response&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;State persistence&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;None (ephemeral)&lt;/td&gt;
&lt;td&gt;IndexedDB schema (object stores: &lt;code&gt;detections&lt;/code&gt;, &lt;code&gt;flights&lt;/code&gt;) with ACID transactions&lt;/td&gt;
&lt;td&gt;Schema versioning, index creation (&lt;code&gt;timestamp&lt;/code&gt;), FIFO eviction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;UI/UX&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Raw terminal&lt;/td&gt;
&lt;td&gt;Web-based popup with reactive event handlers and status badges&lt;/td&gt;
&lt;td&gt;CSS Grid/flex, card design, shadow DOM isolation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Distribution&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Local script&lt;/td&gt;
&lt;td&gt;Unpacked Chrome extension with &lt;code&gt;manifest.json&lt;/code&gt; (MV3)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;declarativeNetRequest&lt;/code&gt; permission, &lt;code&gt;host_permissions&lt;/code&gt; for &lt;code&gt;&amp;lt;all_urls&amp;gt;&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The &lt;strong&gt;completion arc&lt;/strong&gt; is not just feature addition - it is a migration from an &lt;strong&gt;ad-hoc, single-tenant script&lt;/strong&gt; to a &lt;strong&gt;reusable, multi-tenant security utility&lt;/strong&gt; that respects Chrome's extension security model (CSP, isolated worlds, least privilege).&lt;/p&gt;

&lt;h2&gt;
  
  
  My Experience with GitHub Copilot - Technical Breakdown
&lt;/h2&gt;

&lt;p&gt;Without Copilot, this extension would still be a forgotten folder. Copilot acted as a &lt;strong&gt;semi-autonomous engineering partner&lt;/strong&gt;, handling the following high-complexity tasks:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Technical Area&lt;/th&gt;
&lt;th&gt;Specific Copilot Contribution&lt;/th&gt;
&lt;th&gt;Why a Human (or I) Would Have Struggled&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Manifest V3 permissions&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Generated the entire &lt;code&gt;manifest.json&lt;/code&gt; with &lt;code&gt;activeTab&lt;/code&gt;, &lt;code&gt;scripting&lt;/code&gt;, &lt;code&gt;declarativeNetRequest&lt;/code&gt;, &lt;code&gt;host_permissions&lt;/code&gt;, and the correct &lt;code&gt;service_worker&lt;/code&gt; registration&lt;/td&gt;
&lt;td&gt;MV3 deprecated background pages. Copilot knew the new schema and avoided the &lt;code&gt;persistent&lt;/code&gt; flag error.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cross-context message passing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Wrote &lt;code&gt;chrome.runtime.onMessage&lt;/code&gt; listeners with the required &lt;code&gt;return true&lt;/code&gt; to keep the message channel open for asynchronous &lt;code&gt;sendResponse&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;I would have forgotten &lt;code&gt;return true&lt;/code&gt;, causing silent failures in the popup.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;IndexedDB schema design&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Produced the &lt;code&gt;initDB&lt;/code&gt; function with &lt;code&gt;onupgradeneeded&lt;/code&gt; handler, object store creation, and index definitions (&lt;code&gt;timestamp&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;I had never written IndexedDB without a wrapper. Copilot generated transaction boundaries and error recovery.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Declarative DOM scanning&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Suggested &lt;code&gt;document.querySelectorAll('[data-rsc], [data-reactroot], #__next')&lt;/code&gt; and the fallback to &lt;code&gt;window.__next_f&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;I did not know all RSC markers. Copilot extracted them from its training corpus of React codebases.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Active probe fetch with AbortController&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Generated a &lt;code&gt;fetch&lt;/code&gt; with a 2-second timeout, custom headers, and response header extraction, including CORS-aware error handling&lt;/td&gt;
&lt;td&gt;Writing a timeout with &lt;code&gt;AbortController&lt;/code&gt; and cleaning up the abort listener is error-prone. Copilot did it correctly.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Popup UI reactivity&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Built the entire HTML/CSS card layout, plus the &lt;code&gt;addEventListener&lt;/code&gt; wiring and state synchronisation with &lt;code&gt;chrome.storage.local&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;I am not a frontend developer. Copilot produced a modern, accessible UI that works across Chrome versions.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Error recovery and idempotency&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Added &lt;code&gt;try/catch&lt;/code&gt; blocks to every async operation and implemented retry logic for transient IndexedDB lock errors&lt;/td&gt;
&lt;td&gt;Without this, the extension would freeze on first error. Copilot made it resilient.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;The single most impressive Copilot moment&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
When I started typing &lt;code&gt;// Capture RSC responses via webRequest&lt;/code&gt;, Copilot auto-completed the entire &lt;code&gt;chrome.webRequest.onHeadersReceived&lt;/code&gt; listener, including the filtering condition (&lt;code&gt;details.responseHeaders.some(h =&amp;gt; h.name.toLowerCase() === 'content-type' &amp;amp;&amp;amp; h.value.includes('text/x-component'))&lt;/code&gt;) and the asynchronous &lt;code&gt;saveFlight&lt;/code&gt; call. It even added a comment explaining that MV3 requires &lt;code&gt;'responseHeaders'&lt;/code&gt; in the extraInfoSpec array. That single completion saved me 90 minutes of reading Chrome's migration guide.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Copilot did not write the whole extension.&lt;/strong&gt; I architected the detection heuristics, chose the CVE-2025-55182 mapping, and performed manual testing on live targets (e.g., &lt;code&gt;nextjs.org&lt;/code&gt;, &lt;code&gt;vercel.com&lt;/code&gt;, local Next.js sandboxes). But Copilot handled the &lt;strong&gt;boilerplate, the edge cases, and the Chrome-specific quirks&lt;/strong&gt; - turning a 50-line script into a 500-line production extension in two evenings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical Deep Dive - How Copilot Solved Specific Problems
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Asynchronous idempotency in message handlers&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Copilot correctly added &lt;code&gt;return true&lt;/code&gt; inside &lt;code&gt;chrome.runtime.onMessage&lt;/code&gt; to indicate that the response will be sent asynchronously. Without this, the popup would time out.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;IndexedDB versioning and schema migration&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Copilot generated the &lt;code&gt;onupgradeneeded&lt;/code&gt; block with conditional object store creation, preventing &lt;code&gt;ConstraintError&lt;/code&gt; on subsequent extension updates.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Closure serialisation for injected scripts&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
When injecting the detection function via &lt;code&gt;chrome.scripting.executeScript&lt;/code&gt;, Copilot used &lt;code&gt;func&lt;/code&gt; instead of &lt;code&gt;code&lt;/code&gt;, avoiding CSP violations and maintaining lexical scope.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DeclarativeNetRequest vs WebRequest&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Copilot recommended using &lt;code&gt;declarativeNetRequest&lt;/code&gt; for passive header inspection, which is more performant and aligns with MV3's shift away from blocking &lt;code&gt;webRequest&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Heuristic entropy reduction&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Copilot suggested combining multiple low-certainty signals (e.g., &lt;code&gt;data-rsc&lt;/code&gt; + &lt;code&gt;#__next&lt;/code&gt; + &lt;code&gt;__next_f&lt;/code&gt;) into a confidence score, reducing false positives.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Without Copilot, this extension would not exist. With Copilot, it is a robust, field-ready security tool.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Team submission&lt;/strong&gt;: Solo developer - Anuththara Wickramasekara&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Disclaimer&lt;/strong&gt;: This tool is intended for authorised security testing and educational purposes only. Use only on systems you own or have explicit permission to test. The author assumes no liability for misuse.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>githubchallenge</category>
    </item>
  </channel>
</rss>
