<?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: Arpit Chhimpa</title>
    <description>The latest articles on DEV Community by Arpit Chhimpa (@arpit_chhimpa).</description>
    <link>https://dev.to/arpit_chhimpa</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%2F4218294%2Fbdb6ab51-5dfa-4b1b-b08b-afaf539645c9.png</url>
      <title>DEV Community: Arpit Chhimpa</title>
      <link>https://dev.to/arpit_chhimpa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arpit_chhimpa"/>
    <language>en</language>
    <item>
      <title>We Built pkgtruth: Looking Beyond the Code We Trust</title>
      <dc:creator>Arpit Chhimpa</dc:creator>
      <pubDate>Sun, 01 Nov 2026 00:39:53 +0000</pubDate>
      <link>https://dev.to/arpit_chhimpa/we-built-pkgtruth-looking-beyond-the-code-we-trust-1m77</link>
      <guid>https://dev.to/arpit_chhimpa/we-built-pkgtruth-looking-beyond-the-code-we-trust-1m77</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/mlh-hackathon"&gt;MLH x DEV Writing Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  pkgtruth: What You Review Isn't Always What You Install
&lt;/h1&gt;

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

&lt;p&gt;During &lt;strong&gt;Hacktoberfest 2026 at Newton School of Technology × Rishihood University&lt;/strong&gt;, my team participated in a Hack Day where we had to turn a problem statement into a working product under a limited time.&lt;/p&gt;

&lt;p&gt;Our team, &lt;strong&gt;Commit-tee&lt;/strong&gt;, chose Problem Statement 4:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Published Package vs Source Code Integrity Analyzer.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At first, the problem seemed simple: compare the source code available on GitHub with the package published on a registry such as PyPI.&lt;/p&gt;

&lt;p&gt;But then we started asking some important questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What if the published package contains files that aren't present in the source repository?&lt;/li&gt;
&lt;li&gt;What if someone modifies a function in the published package?&lt;/li&gt;
&lt;li&gt;What if the difference is simply generated metadata from the build process?&lt;/li&gt;
&lt;li&gt;How can we distinguish a normal packaging difference from something that deserves a security investigation?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's how we started building &lt;strong&gt;pkgtruth — Package Integrity &amp;amp; Provenance Intelligence&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The problem behind pkgtruth
&lt;/h3&gt;

&lt;p&gt;Consider a Python developer who creates a library, pushes the source code to GitHub, reviews it, and publishes a release on PyPI.&lt;/p&gt;

&lt;p&gt;Another developer installs it using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;demo-package
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important thing to understand is that users install the published package, not the GitHub repository that the developer reviewed.&lt;/p&gt;

&lt;p&gt;These two are related, but they are not automatically identical.&lt;/p&gt;

&lt;p&gt;A published package may contain generated files and metadata, which are perfectly legitimate. However, it could also contain unexpected files or modified code that deserves investigation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Finding differences is easy. Understanding which differences matter is the real challenge.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How pkgtruth approaches the problem
&lt;/h3&gt;

&lt;p&gt;pkgtruth is designed to help developers investigate published Python package releases by comparing them with their corresponding source code.&lt;/p&gt;

&lt;p&gt;We structured the product around four main capabilities:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Compare&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Identify added files, missing files, modified contents, hashes, and metadata differences.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Investigate&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Examine security-relevant indicators such as executable &lt;code&gt;.pth&lt;/code&gt; files, unexpected imports, and potential execution surfaces.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Explain&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use AI-assisted explanations to help developers understand why a particular finding deserves attention.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Decide&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Apply deterministic policies to recommend whether a release should be allowed, reviewed, or blocked.&lt;/p&gt;

&lt;h3&gt;
  
  
  A small example
&lt;/h3&gt;

&lt;p&gt;Imagine the reviewed source contains:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# demo/message.py
&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;message&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;reviewed source&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But the published wheel contains an additional file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;demo/
├── message.py
└── extra.py

startup.pth
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;startup.pth&lt;/code&gt; file contains an executable Python directive.&lt;/p&gt;

&lt;p&gt;Certain &lt;code&gt;.pth&lt;/code&gt; files can contain lines that Python processes during startup. This makes an unexpected executable startup file worth investigating.&lt;/p&gt;

&lt;p&gt;pkgtruth aims to identify this difference, show the evidence, and explain its potential impact.&lt;/p&gt;

&lt;p&gt;Importantly, the presence of such an indicator does not automatically prove malicious activity.&lt;/p&gt;

&lt;h3&gt;
  
  
  What makes pkgtruth different?
&lt;/h3&gt;

&lt;p&gt;Beyond basic file comparison, we explored three additional capabilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Release DNA:&lt;/strong&gt; Understand how package contents evolve across releases and highlight unusual changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Proof Capsule:&lt;/strong&gt; Preserve artifact identity, hashes, findings, evidence, and analysis limitations in a reproducible report.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Release Gate:&lt;/strong&gt; Translate configured security rules into ALLOW, REVIEW, or BLOCK recommendations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We also wanted AI to have a specific responsibility.&lt;/p&gt;

&lt;p&gt;We chose a locally hosted &lt;strong&gt;Qwen 3.5 4B model through Ollama&lt;/strong&gt; for explaining security findings. The deterministic analysis engine handles the actual comparisons and security checks, while AI helps communicate the results in understandable language.&lt;/p&gt;

&lt;p&gt;Our principle is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI explains the evidence. It doesn't invent the verdict.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Technology stack
&lt;/h3&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;Technology&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Frontend&lt;/td&gt;
&lt;td&gt;HTML, CSS, HTMX&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backend&lt;/td&gt;
&lt;td&gt;Python, FastAPI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Analysis&lt;/td&gt;
&lt;td&gt;Archive inspection, SHA-256, file comparison, security rules&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Package ecosystem&lt;/td&gt;
&lt;td&gt;PyPI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI&lt;/td&gt;
&lt;td&gt;Ollama, Qwen 3.5 4B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Testing&lt;/td&gt;
&lt;td&gt;pytest&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CI&lt;/td&gt;
&lt;td&gt;GitHub Actions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;One of our most important design decisions was to never install or execute the package being investigated. We inspect its contents as data instead.&lt;/p&gt;

&lt;p&gt;We also learned that a clean scan does not guarantee that a package is completely safe. A good security tool must communicate its limitations rather than make unrealistic promises.&lt;/p&gt;




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

&lt;p&gt;&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/k3tan7/pkgtruth" rel="noopener noreferrer"&gt;pkgtruth — Team Commit-tee&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;pkgtruth is designed around a local-first web application and a CLI using the same Python analysis engine.&lt;/p&gt;

&lt;p&gt;The intended investigation workflow is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Provide a package artifact and its corresponding source archive, or select a PyPI release.&lt;/li&gt;
&lt;li&gt;Safely inspect the archive contents.&lt;/li&gt;
&lt;li&gt;Compare files, hashes, and relevant metadata.&lt;/li&gt;
&lt;li&gt;Investigate security-related indicators.&lt;/li&gt;
&lt;li&gt;Review findings and supporting evidence.&lt;/li&gt;
&lt;li&gt;Generate an investigation report.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Demonstration scenarios
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Scenario 1 — Normal release&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Compare a package and its corresponding source and inspect the differences.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario 2 — Unexpected change&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Identify a simulated unexpected executable &lt;code&gt;.pth&lt;/code&gt; file inside a published package.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario 3 — Uncertain provenance&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Show how pkgtruth handles unresolved source mapping instead of pretending that verification was successful.&lt;/p&gt;

&lt;p&gt;[Insert your actual application screenshot here.]&lt;/p&gt;

&lt;p&gt;[Insert your actual analysis-results screenshot here.]&lt;/p&gt;

&lt;p&gt;[Embed your demo video or add a link here.]&lt;/p&gt;

&lt;p&gt;The goal of the demo is to show not just that a difference exists, but why it matters and what evidence supports the finding.&lt;/p&gt;




&lt;h2&gt;
  
  
  Partner Technologies
&lt;/h2&gt;

&lt;p&gt;One of the interesting parts of pkgtruth was exploring how to use a locally hosted language model in a security-focused application.&lt;/p&gt;

&lt;p&gt;We used &lt;strong&gt;Ollama&lt;/strong&gt; to host &lt;strong&gt;Qwen 3.5 4B&lt;/strong&gt; locally.&lt;/p&gt;

&lt;p&gt;Our approach separates deterministic analysis from AI-generated explanations.&lt;/p&gt;

&lt;p&gt;The analysis engine performs tasks such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inspecting package archives.&lt;/li&gt;
&lt;li&gt;Comparing file contents and hashes.&lt;/li&gt;
&lt;li&gt;Checking wheel RECORD consistency.&lt;/li&gt;
&lt;li&gt;Identifying configured security indicators.&lt;/li&gt;
&lt;li&gt;Producing structured findings.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The language model receives structured evidence and helps explain it in plain language.&lt;/p&gt;

&lt;p&gt;For example, if the engine detects an executable directive in a &lt;code&gt;.pth&lt;/code&gt; file, the model can explain why that file deserves attention and what a developer should investigate.&lt;/p&gt;

&lt;p&gt;We deliberately avoid asking the model to independently decide whether a package is malicious.&lt;/p&gt;

&lt;p&gt;This separation is important because security decisions should be grounded in reproducible evidence.&lt;/p&gt;

&lt;p&gt;Working with a locally hosted model also encouraged us to think about what happens when the model is unavailable. The deterministic analysis should remain useful even without AI explanations.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: Ollama and Qwen are the technologies we used for local AI integration. We are not claiming that they are MLH partner technologies.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Hackathon Experience
&lt;/h2&gt;

&lt;p&gt;Participating in Hack Day was more than just building an application. It was an experience of understanding an unfamiliar problem, discussing possible solutions, making technical decisions, and turning an idea into something demonstrable.&lt;/p&gt;

&lt;p&gt;Our team, &lt;strong&gt;Commit-tee&lt;/strong&gt;, consisted of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ketan Agarwal&lt;/li&gt;
&lt;li&gt;Arnav Goyal&lt;/li&gt;
&lt;li&gt;Arpit Chhimpa&lt;/li&gt;
&lt;li&gt;Asmi Mishra&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At the beginning, we had a broad problem statement and many possible directions. We could have built a simple file comparison tool, but we wanted to go further.&lt;/p&gt;

&lt;p&gt;We started exploring questions around package integrity, source mapping, build-generated files, security indicators, release history, and evidence preservation.&lt;/p&gt;

&lt;p&gt;One of the biggest things we learned was that not every difference is dangerous.&lt;/p&gt;

&lt;p&gt;For example, a build process can generate metadata that doesn't exist in the original repository. On the other hand, an unexpected executable startup file may deserve much closer attention.&lt;/p&gt;

&lt;p&gt;That distinction influenced how we designed pkgtruth.&lt;/p&gt;

&lt;p&gt;Another important learning was about AI. Instead of allowing AI to make security decisions, we gave it the responsibility of explaining findings produced by deterministic checks.&lt;/p&gt;

&lt;p&gt;We also realized that a security analyzer must be careful about its own behaviour. That is why we designed pkgtruth to inspect untrusted package contents without installing or executing them.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I will remember most
&lt;/h3&gt;

&lt;p&gt;The most valuable part of this experience was seeing how a problem that initially sounded like a simple comparison task could lead to a much deeper engineering challenge.&lt;/p&gt;

&lt;p&gt;We had to think beyond writing code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understand the actual problem.&lt;/li&gt;
&lt;li&gt;Decide what belongs in the core product.&lt;/li&gt;
&lt;li&gt;Design a safe analysis workflow.&lt;/li&gt;
&lt;li&gt;Make technical findings understandable.&lt;/li&gt;
&lt;li&gt;Test the implementation.&lt;/li&gt;
&lt;li&gt;Communicate the product through a clear demonstration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It reminded me that building a useful product is not just about adding more features. It is about understanding the problem well enough to decide which features actually matter.&lt;/p&gt;

&lt;h3&gt;
  
  
  What comes next?
&lt;/h3&gt;

&lt;p&gt;pkgtruth currently focuses on Python packages and PyPI. There is room to expand into additional ecosystems, strengthen provenance verification, improve release monitoring, and harden the application for production use.&lt;/p&gt;

&lt;p&gt;We see this as a starting point rather than the end of the project.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This project changed how I think about software supply-chain security.&lt;/p&gt;

&lt;p&gt;We often review source code and trust the package that eventually reaches our environment. But there is an important journey between those two points, and that journey deserves verification.&lt;/p&gt;

&lt;p&gt;Building pkgtruth helped us explore that gap and understand how file comparison, security analysis, evidence, and AI can work together.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't just trust the package. Verify the release.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project:&lt;/strong&gt; pkgtruth&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Team:&lt;/strong&gt; Commit-tee&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Event:&lt;/strong&gt; Hacktoberfest 2026 · Hack Day&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Institution:&lt;/strong&gt; Newton School of Technology × Rishihood University&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Problem Statement:&lt;/strong&gt; Published Package vs Source Code Integrity Analyzer&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/k3tan7/pkgtruth" rel="noopener noreferrer"&gt;Explore pkgtruth on GitHub&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mlhacks</category>
      <category>devchallenge</category>
      <category>hackathon</category>
    </item>
  </channel>
</rss>
