<?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: Pranav Ghorpade</title>
    <description>The latest articles on DEV Community by Pranav Ghorpade (@pranav_0440).</description>
    <link>https://dev.to/pranav_0440</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4075187%2Fe6697a4d-f9aa-4dd2-ab33-cf5865e0c4db.png</url>
      <title>DEV Community: Pranav Ghorpade</title>
      <link>https://dev.to/pranav_0440</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pranav_0440"/>
    <language>en</language>
    <item>
      <title>I Built a Secure REST API — Then I Tried to Break It</title>
      <dc:creator>Pranav Ghorpade</dc:creator>
      <pubDate>Tue, 18 Aug 2026 18:03:32 +0000</pubDate>
      <link>https://dev.to/pranav_0440/i-built-a-secure-rest-api-then-i-tried-to-break-it-2klf</link>
      <guid>https://dev.to/pranav_0440/i-built-a-secure-rest-api-then-i-tried-to-break-it-2klf</guid>
      <description>&lt;p&gt;A practical journey through API security, authorization, JWT, rate limiting, and common vulnerabilities.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe3yl1b2r5vyg2vgfrjuy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe3yl1b2r5vyg2vgfrjuy.png" alt=" " width="800" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Why this is a strong Medium story&lt;/p&gt;

&lt;p&gt;Instead of writing a boring article titled "What is API Security?", make it a story:&lt;/p&gt;

&lt;p&gt;I thought my REST API was secure because it had JWT authentication. Then I started testing what would happen if a user changed an ID in the URL.&lt;/p&gt;

&lt;p&gt;That immediately creates curiosity.&lt;/p&gt;

&lt;p&gt;OWASP's API Security Top 10 specifically highlights risks such as Broken Object Level Authorization, Broken Authentication, Broken Function Level Authorization, unrestricted resource consumption, SSRF, security misconfiguration, and improper inventory management.&lt;/p&gt;

&lt;p&gt;Story structure&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Authentication isn't authorization&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Imagine:&lt;/p&gt;

&lt;p&gt;GET /api/incidents/1001&lt;br&gt;
Authorization: Bearer &lt;/p&gt;

&lt;p&gt;The token is valid.&lt;/p&gt;

&lt;p&gt;But what if user A can request:&lt;/p&gt;

&lt;p&gt;GET /api/incidents/1002&lt;/p&gt;

&lt;p&gt;and incident 1002 belongs to user B?&lt;/p&gt;

&lt;p&gt;The API authenticated the user.&lt;/p&gt;

&lt;p&gt;But it didn't authorize access to the object.&lt;/p&gt;

&lt;p&gt;That's the difference between:&lt;/p&gt;

&lt;p&gt;Authentication&lt;br&gt;
"Who are you?"&lt;/p&gt;

&lt;p&gt;Authorization&lt;br&gt;
"What are you allowed to access?"&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;JWT doesn't automatically make an API secure&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A typical flow:&lt;/p&gt;

&lt;p&gt;Login&lt;br&gt;
  ↓&lt;br&gt;
Username + Password&lt;br&gt;
  ↓&lt;br&gt;
Spring Security&lt;br&gt;
  ↓&lt;br&gt;
JWT generated&lt;br&gt;
  ↓&lt;br&gt;
Client stores token&lt;br&gt;
  ↓&lt;br&gt;
API request&lt;br&gt;
  ↓&lt;br&gt;
JWT validation&lt;br&gt;
  ↓&lt;br&gt;
Authorization&lt;/p&gt;

&lt;p&gt;But JWT validation alone doesn't solve:&lt;/p&gt;

&lt;p&gt;privilege escalation&lt;br&gt;
broken access control&lt;br&gt;
insecure endpoints&lt;br&gt;
excessive data exposure&lt;br&gt;
rate abuse&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Secure the endpoint&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;@PreAuthorize("hasRole('ADMIN')")&lt;br&gt;
@GetMapping("/admin/incidents")&lt;br&gt;
public List getAllIncidents() {&lt;br&gt;
    return incidentService.findAll();&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;But method-level security is only one layer.&lt;/p&gt;

&lt;p&gt;Your service should also verify ownership where appropriate.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Never trust IDs from the client&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is dangerous:&lt;/p&gt;

&lt;p&gt;incidentRepository.findById(id);&lt;/p&gt;

&lt;p&gt;without checking whether the current user has permission to access it.&lt;/p&gt;

&lt;p&gt;A better conceptual approach:&lt;/p&gt;

&lt;p&gt;Request&lt;br&gt;
   ↓&lt;br&gt;
Authenticate&lt;br&gt;
   ↓&lt;br&gt;
Extract user&lt;br&gt;
   ↓&lt;br&gt;
Load resource&lt;br&gt;
   ↓&lt;br&gt;
Check ownership / permission&lt;br&gt;
   ↓&lt;br&gt;
Return resource&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Rate limiting&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;An endpoint such as:&lt;/p&gt;

&lt;p&gt;POST /api/login&lt;/p&gt;

&lt;p&gt;can become a target for brute-force attempts.&lt;/p&gt;

&lt;p&gt;A production API should consider:&lt;/p&gt;

&lt;p&gt;Request&lt;br&gt;
 ↓&lt;br&gt;
Rate Limiter&lt;br&gt;
 ↓&lt;br&gt;
Authentication&lt;br&gt;
 ↓&lt;br&gt;
Authorization&lt;br&gt;
 ↓&lt;br&gt;
Business Logic&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Security checklist&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Before calling an API production-ready, check:&lt;/p&gt;

&lt;p&gt;Authentication&lt;br&gt;
Authorization&lt;br&gt;
Input validation&lt;br&gt;
Rate limiting&lt;br&gt;
Secure headers&lt;br&gt;
Error handling&lt;br&gt;
Logging&lt;br&gt;
Secret management&lt;br&gt;
Dependency scanning&lt;br&gt;
HTTPS&lt;br&gt;
API documentation&lt;br&gt;
Access control&lt;/p&gt;

&lt;p&gt;OWASP maintains the API Security project specifically to help developers and security teams identify and mitigate these API-specific risks.&lt;/p&gt;

&lt;p&gt;Ending&lt;/p&gt;

&lt;p&gt;The biggest lesson wasn't how to implement JWT.&lt;/p&gt;

&lt;p&gt;It was understanding that security isn't a feature you add to an API. Security is a property of the entire API design.&lt;/p&gt;

&lt;p&gt;Tags:&lt;/p&gt;

&lt;h1&gt;
  
  
  Cybersecurity #SpringBoot #APISecurity #Java #Backend #OWASP
&lt;/h1&gt;

</description>
      <category>security</category>
      <category>devops</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>From First PR to Better Code: Mentoring a First-Time Open Source Contributor</title>
      <dc:creator>Pranav Ghorpade</dc:creator>
      <pubDate>Thu, 13 Aug 2026 04:29:49 +0000</pubDate>
      <link>https://dev.to/pranav_0440/from-first-pr-to-better-code-mentoring-a-first-time-open-source-contributor-3p35</link>
      <guid>https://dev.to/pranav_0440/from-first-pr-to-better-code-mentoring-a-first-time-open-source-contributor-3p35</guid>
      <description>&lt;p&gt;Today I had a small but meaningful experience as a mentor in &lt;strong&gt;IEEE Summer of Code&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1m70p9aw7tp8toa5384a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1m70p9aw7tp8toa5384a.png" alt=" " width="800" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’m currently mentoring contributors working on an open-source &lt;strong&gt;Threat Incident Management System&lt;/strong&gt;, and today I reviewed a first contribution from a first-time contributor.&lt;/p&gt;

&lt;p&gt;This reminded me that open source isn't only about writing code. It's also about learning how to collaborate, review code, accept feedback, and improve an implementation.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 The First Contribution
&lt;/h2&gt;

&lt;p&gt;A contributor opened their first pull request to improve the frontend experience of our project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PR #56 — Add a 1-click copy button for Incident IDs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The goal was simple:&lt;/p&gt;

&lt;p&gt;SOC analysts frequently need to copy Incident IDs or IOC identifiers and use them in external tools. Instead of manually selecting and copying the ID, the contributor added a one-click copy button.&lt;/p&gt;

&lt;h3&gt;
  
  
  Changes included
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Added a copy button to the Incident Detail page&lt;/li&gt;
&lt;li&gt;Added a copy button to Incident cards&lt;/li&gt;
&lt;li&gt;Added visual &lt;code&gt;Copied!&lt;/code&gt; feedback&lt;/li&gt;
&lt;li&gt;Used &lt;code&gt;e.stopPropagation()&lt;/code&gt; to prevent unwanted navigation when clicking the button&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It was a useful improvement and a great first contribution.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔍 Reviewing the First PR
&lt;/h2&gt;

&lt;p&gt;The initial implementation worked, but during the review I noticed a few areas where we could make the code more maintainable and robust.&lt;/p&gt;

&lt;p&gt;I requested three improvements.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Add a Clipboard Fallback
&lt;/h3&gt;

&lt;p&gt;The implementation relied on:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;navigator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;clipboard&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I asked the contributor to add a fallback for environments where the Clipboard API may not be available, particularly in non-HTTPS contexts.&lt;/p&gt;

&lt;p&gt;This is a good reminder that:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Code that works in one environment isn't necessarily code that works everywhere.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcjm9b6lbtdnisuykria0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcjm9b6lbtdnisuykria0.png" alt=" " width="800" height="272"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Create a Reusable Component
&lt;/h3&gt;

&lt;p&gt;The copy-button behavior was being implemented in multiple places.&lt;/p&gt;

&lt;p&gt;Instead of duplicating the same logic, I suggested moving it into a reusable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CopyButton.jsx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes the component easier to maintain and allows the same behavior to be reused across the application.&lt;/p&gt;

&lt;p&gt;The principle is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Don't duplicate behavior when it can be encapsulated into a reusable component.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  3. Improve Accessibility
&lt;/h3&gt;

&lt;p&gt;I also asked for an &lt;code&gt;aria-label&lt;/code&gt; on the button.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;aria&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Copy incident ID&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This helps make the interface more accessible and communicates the purpose of an icon-only button to assistive technologies.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧑‍💻 What I Learned as a Mentor
&lt;/h2&gt;

&lt;p&gt;This PR reminded me that code review isn't just about saying:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"This works. Merge it."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A good review should help contributors understand &lt;strong&gt;why&lt;/strong&gt; a change is recommended.&lt;/p&gt;

&lt;p&gt;In this case, the discussion was about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Browser compatibility&lt;/li&gt;
&lt;li&gt;Component reusability&lt;/li&gt;
&lt;li&gt;Maintainability&lt;/li&gt;
&lt;li&gt;Accessibility&lt;/li&gt;
&lt;li&gt;User experience&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And that's one of the things I enjoy about open source.&lt;/p&gt;

&lt;p&gt;You get to work with people at different stages of their engineering journey, and a PR becomes more than just a code contribution — it becomes a learning opportunity.&lt;/p&gt;

&lt;h2&gt;
  
  
  🌱 First Contributions Matter
&lt;/h2&gt;

&lt;p&gt;Seeing a first-time contributor open a PR is genuinely exciting.&lt;/p&gt;

&lt;p&gt;Everyone starts somewhere.&lt;/p&gt;

&lt;p&gt;That first issue, first commit, first pull request, first code review, and first merge can be an important step in someone's open-source journey.&lt;/p&gt;

&lt;p&gt;As a mentor, I don't want contributors to simply submit code that passes a check.&lt;/p&gt;

&lt;p&gt;I want them to gradually understand how professional software development works:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Issue
  ↓
Implementation
  ↓
Pull Request
  ↓
Code Review
  ↓
Feedback
  ↓
Improvement
  ↓
Merge
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's the real learning experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚙️ Engineering Workflow
&lt;/h2&gt;

&lt;p&gt;The PR also went through automated checks, including a &lt;strong&gt;SonarQube quality gate&lt;/strong&gt;, and a &lt;strong&gt;Vercel preview deployment&lt;/strong&gt; was generated for testing.&lt;/p&gt;

&lt;p&gt;This is another important part of modern software development:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Write
  ↓
Test
  ↓
Review
  ↓
Analyze
  ↓
Deploy
  ↓
Improve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F13cevi5qdf8lxrso5ky4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F13cevi5qdf8lxrso5ky4.png" alt=" " width="800" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Even a relatively small frontend feature can go through a complete engineering workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  🎯 Final Thought
&lt;/h2&gt;

&lt;p&gt;One of the best parts of contributing to open source is that you don't have to learn everything alone.&lt;/p&gt;

&lt;p&gt;Someone can contribute code.&lt;/p&gt;

&lt;p&gt;Someone else can review it.&lt;/p&gt;

&lt;p&gt;The contributor learns from the review.&lt;/p&gt;

&lt;p&gt;The project becomes better.&lt;/p&gt;

&lt;p&gt;And the community grows.&lt;/p&gt;

&lt;p&gt;That's what I hope to encourage through my mentoring experience in &lt;strong&gt;IEEE Summer of Code&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This was just one PR, but for a first-time contributor, it can be the beginning of a much bigger open-source journey.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First PR today. Better engineer tomorrow. 🚀&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Project
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Threat Incident Management System&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An open-source security platform designed to help manage and investigate security incidents.&lt;/p&gt;

&lt;h3&gt;
  
  
  Contribution
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;PR #56 — 1-Click Copy Button for Incident IDs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Contributor:&lt;/strong&gt; &lt;code&gt;kunalRay21&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Contribution:&lt;/strong&gt; First open-source contribution&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Program:&lt;/strong&gt; IEEE Summer of Code&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Role:&lt;/strong&gt; Project Mentor&lt;/p&gt;

&lt;h1&gt;
  
  
  opensource #react #github #softwareengineering
&lt;/h1&gt;

</description>
      <category>opensource</category>
      <category>github</category>
      <category>softwareengineering</category>
    </item>
  </channel>
</rss>
