<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Prithwiraj Bose on Medium]]></title>
        <description><![CDATA[Stories by Prithwiraj Bose on Medium]]></description>
        <link>https://medium.com/@sribasu?source=rss-73ac6048580d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Inl7_aEJXDKC_hbF</url>
            <title>Stories by Prithwiraj Bose on Medium</title>
            <link>https://medium.com/@sribasu?source=rss-73ac6048580d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 11:53:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sribasu/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Risk Was Not Just `request`. It Was the Migration.]]></title>
            <link>https://sribasu.medium.com/the-risk-was-not-just-request-it-was-the-migration-4560b9df425e?source=rss-73ac6048580d------2</link>
            <guid isPermaLink="false">https://medium.com/p/4560b9df425e</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[axios]]></category>
            <dc:creator><![CDATA[Prithwiraj Bose]]></dc:creator>
            <pubDate>Sun, 01 Nov 2026 21:22:32 GMT</pubDate>
            <atom:updated>2026-11-01T21:22:32.560Z</atom:updated>
            <content:encoded><![CDATA[<p>How I think about moving a legacy Node.js service off a deprecated HTTP client without turning the replacement into another untested rewrite.</p><p><strong>Disclosure:</strong> I maintain <a href="https://www.npmjs.com/package/request-to-axios">request-to-axios</a>, which I mention in this article. This is not an independent review or a claim that I have used it as an unaffiliated customer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NtJpsseREhTXaJNFRrZKRg.png" /></figure><p>When I look at a legacy Node.js application, its HTTP client is rarely just a dependency. It is part of how the application behaves.</p><p>A dozen small details can be attached to a single call: a callback with three arguments, a request body that is a stream, a cookie jar shared across requests, a default header added in one wrapper, a JSON parser enabled at one call site, and a redirect rule that no one remembers writing. The source change from request to Axios may be short. Finding and validating all those assumptions can take much longer.</p><p>That is the uncomfortable part of retiring old infrastructure. Leaving it in place has a cost. Replacing it carelessly has a cost too.</p><h3>What the Audit Actually Says</h3><p>The upstream <a href="https://github.com/request/request">request project</a> was deprecated in February 2020. Its latest npm release is 2.88.2; its maintainers say no new changes are expected. On November 2, 2026, I installed that release into a temporary project and ran npm audit against the versions npm resolved that day.</p><p>The direct request finding is <a href="https://github.com/advisories/GHSA-p8p7-x288-28g6">CVE-2023-28155</a>, an SSRF mitigation bypass involving cross-protocol redirects. This is important if an application treats a URL or redirect as untrusted and relies on the client to keep requests away from internal services. The advisory lists no patched release for the original package.</p><p>The same audit also found old transitive versions:</p><ul><li>form-data@2.3.3: <a href="https://github.com/advisories/GHSA-fjxv-7rqg-78g4">CVE-2025-7783</a> describes multipart boundary generation with Math.random(). Exploitation has important preconditions: an attacker must be able to observe random outputs and influence fields in a multipart request.</li><li>form-data@2.3.3: <a href="https://github.com/advisories/GHSA-hmw2-7cc7-3qxx">CVE-2026-12143</a> covers CRLF injection if untrusted input becomes a multipart field name or filename.</li><li>qs@6.5.5: <a href="https://github.com/advisories/GHSA-6rw7-vpxm-498p">CVE-2025-15284</a> concerns an arrayLimit parsing edge case. The default parameter limit reduces the practical impact; configurations that raise it need closer review.</li><li>qs@6.5.5: <a href="https://github.com/advisories/GHSA-4mjr-xmp4-gh2g">CVE-2026-82417</a> concerns a denial of service in a particular attacker-controlled parse/stringify flow with permissive options.</li><li>tough-cookie@2.5.0: <a href="https://github.com/advisories/GHSA-72xf-g2v4-qvf3">CVE-2023-26136</a> is a prototype-pollution issue with a cookie-jar configuration precondition.</li><li>uuid@3.4.0: <a href="https://github.com/advisories/GHSA-w5hq-g745-h8pq">CVE-2026-41907</a> affects specific UUID functions when callers provide output buffers and offsets.</li></ul><p>That is not a claim that every request installation is exploitable in the same way. Some entries are conditional on options or call paths that a given application may never use. But the graph does matter: request&#39;s old dependency ranges cannot simply resolve to all of the fixed major/minor versions. A useful audit is a starting point for path analysis, not a substitute for it.</p><h3>Why Rewriting Everything Is Not Always the First Move</h3><p>Axios has a different API shape. It is promise-oriented and returns response data on an object. request applications often expect callbacks, a separate body, and a stream that can be piped in both directions. Add forms, query serialization, cookies, proxies, TLS agents, and redirect handling, and a direct conversion becomes a project rather than a find-and-replace.</p><p>A wholesale rewrite can still be the right outcome. But when the immediate goal is reducing exposure without destabilizing a large service, it can help to separate two tasks:</p><ol><li>Change the transport implementation while preserving common call patterns.</li><li>Move each call site to a native Axios API later, where the team can test it in context.</li></ol><p>That is the idea behind <a href="https://www.npmjs.com/package/request-to-axios">request-to-axios</a>. It presents a request-style callback and stream surface over Axios so common legacy integrations can be migrated in smaller steps. An npm alias can keep existing imports resolving during a trial:</p><pre>npm install request@npm:request-to-axios</pre><p>It supports common method helpers, callback forms, response streaming, defaults, query strings, JSON, URL-encoded and multipart forms, immediate Basic and Bearer authentication, transport options, redirects, and a small in-memory cookie jar.</p><p>The wrapper does not implement every request feature. OAuth, Hawk, AWS signing, HTTP Signature, HAR import, digest retries, multipart/related, custom redirect policies, and exact legacy proxy-tunnel behavior are outside its current scope. Its cookie jar is host-only and in-memory, not a browser-standard cookie engine. Those boundaries are written down because a silent no-op would be worse than an explicit gap.</p><h3>The Peace of Mind Is in the Process</h3><p>A compatibility library is not a security certificate. I would still inventory the options used by the application, add integration tests around important requests, run npm audit, validate redirect destinations, and keep TLS verification enabled. The newer package and its dependencies need maintenance too.</p><p>The practical promise is smaller: give a team a path that does not require changing every call site on day one. Keep the legacy-facing API for the cases it supports; use tests to identify the exceptions; and migrate those exceptions deliberately. That can reduce the size of each review and release without pretending the old application has become secure by changing one dependency name.</p><p>If your service depends on an unsupported option, read the <a href="https://github.com/prithwirajbose/request-to-axios#known-limitations">compatibility limits</a> before trying the alias. The source, package versions, and issue tracker are available on <a href="https://github.com/prithwirajbose/request-to-axios">GitHub</a> and <a href="https://www.npmjs.com/package/request-to-axios">npm</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4560b9df425e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Code Complexity Analysis Is Important for Software Quality]]></title>
            <link>https://sribasu.medium.com/why-code-complexity-analysis-is-important-for-software-quality-1278dcec817c?source=rss-73ac6048580d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1278dcec817c</guid>
            <category><![CDATA[code-review]]></category>
            <category><![CDATA[code-quality]]></category>
            <category><![CDATA[code-quality-tools]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Prithwiraj Bose]]></dc:creator>
            <pubDate>Thu, 02 Jul 2026 19:46:23 GMT</pubDate>
            <atom:updated>2026-07-02T19:46:23.927Z</atom:updated>
            <content:encoded><![CDATA[<p>In modern software development, <strong>code complexity analysis</strong> is more than a technical metric — it’s a safeguard for long‑term maintainability, scalability, and developer productivity. Whether you’re working in <strong>Java, Python, JavaScript, or PHP</strong>, understanding and managing complexity directly impacts software quality and business outcomes.</p><h3>🚦 What Is Code Complexity?</h3><p>Code complexity refers to how difficult it is to <strong>read, understand, test, and maintain</strong> a piece of code. Common metrics include:</p><ul><li><strong>Cyclomatic Complexity</strong>: Measures the number of independent paths through code.</li><li><strong>Cognitive Complexity</strong>: Evaluates how hard code is to understand based on nesting and flow.</li><li><strong>Maintainability Index</strong>: A composite score combining lines of code, complexity, and other factors.</li></ul><p>These metrics help teams quantify what developers intuitively feel: some code is harder to work with than others.</p><h3>🔍 Why Code Complexity Analysis Matters</h3><h3>1. Improves Maintainability</h3><p>Complex code is harder to debug and extend. By analyzing complexity, teams can identify “hotspots” and refactor them before they become bottlenecks.</p><h3>2. Reduces Bugs</h3><p>Functions with high cyclomatic complexity often hide edge cases. Simplifying logic reduces the risk of defects and improves test coverage.</p><h3>3. Supports Scalability</h3><p>As projects grow, unmanaged complexity leads to <strong>technical debt</strong>. Regular analysis ensures systems scale without collapsing under their own weight.</p><h3>4. Guides Refactoring</h3><p>Complexity metrics provide <strong>objective data</strong> to prioritize refactoring, ensuring effort is spent where it delivers maximum impact.</p><h3>5. Boosts Developer Productivity</h3><p>Readable, low‑complexity code reduces onboarding time and cognitive load, allowing developers to focus on delivering features instead of deciphering logic.</p><h3>📊 Tools for Code Complexity Analysis</h3><p>Popular tools across languages include:</p><ul><li><strong>SonarQube</strong> — Multi‑language dashboards for complexity and maintainability.</li><li><strong>Radon (Python)</strong> — Cyclomatic complexity and maintainability index.</li><li><strong>PMD (Java)</strong> — Static analysis with complexity rules.</li><li><strong>ESLint Plugins (JavaScript/TypeScript)</strong> — Complexity checks integrated into linting.</li></ul><p>Integrating these tools into <strong>CI/CD pipelines</strong> ensures continuous monitoring and prevents complexity from creeping in unnoticed.</p><h3>🌱 Building a Culture of Simplicity</h3><p>Complexity analysis works best when paired with a mindset that values <strong>simplicity and clarity</strong>. Encourage teams to:</p><ul><li>Write small, focused functions.</li><li>Favor clarity over clever tricks.</li><li>Refactor regularly instead of deferring cleanup.</li></ul><p>When simplicity becomes a cultural value, complexity analysis evolves from a metric into a guiding principle.</p><h3>✨ Final Thoughts</h3><p>Think of <a href="https://sribasu.com/online-code-complexity-estimator-java-c-js"><strong>code complexity estimation</strong></a><strong> </strong>as preventive healthcare for your software. It doesn’t eliminate complexity entirely — some problems are inherently complex — but it ensures complexity remains manageable. By shining a light on hidden risks, teams can build systems that are <strong>resilient, scalable, and maintainable</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1278dcec817c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>