<?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: Sathish Kumar S</title>
    <description>The latest articles on DEV Community by Sathish Kumar S (@sathish_kumar_13).</description>
    <link>https://dev.to/sathish_kumar_13</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%2F4105611%2F9edf304d-dd30-483d-8452-e218e649a1c2.png</url>
      <title>DEV Community: Sathish Kumar S</title>
      <link>https://dev.to/sathish_kumar_13</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sathish_kumar_13"/>
    <language>en</language>
    <item>
      <title>I Built a Security Attack Analysis Engine Without Installing a Single Runtime Package</title>
      <dc:creator>Sathish Kumar S</dc:creator>
      <pubDate>Wed, 02 Sep 2026 07:30:57 +0000</pubDate>
      <link>https://dev.to/sathish_kumar_13/i-built-a-security-attack-analysis-engine-without-installing-a-single-runtime-package-486a</link>
      <guid>https://dev.to/sathish_kumar_13/i-built-a-security-attack-analysis-engine-without-installing-a-single-runtime-package-486a</guid>
      <description>&lt;p&gt;&lt;strong&gt;What happens when you build a security analysis tool in Python and deliberately remove every third-party runtime dependency?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Usually, I would reach for a few packages.&lt;/p&gt;

&lt;p&gt;A parser here. A CLI framework there. A data-processing library. Maybe a logging package. Something for JSON. Something for configuration.&lt;/p&gt;

&lt;p&gt;For the &lt;strong&gt;Zero Dependency 72-Hour Hackathon&lt;/strong&gt;, I couldn't.&lt;/p&gt;

&lt;p&gt;The rule was simple: &lt;strong&gt;standard library only&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;TraceLock&lt;/strong&gt; — a lightweight security event correlation and attack analysis engine in Python, with &lt;strong&gt;zero third-party runtime dependencies&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea
&lt;/h2&gt;

&lt;p&gt;TraceLock takes security event logs and tries to answer a question that raw logs often don't:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"What actually happened during this sequence of events?"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A single failed login isn't necessarily interesting.&lt;/p&gt;

&lt;p&gt;A successful login isn't necessarily malicious.&lt;/p&gt;

&lt;p&gt;A command being executed isn't necessarily suspicious.&lt;/p&gt;

&lt;p&gt;But when the events occur in a sequence like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Multiple authentication failures
        ↓
Successful authentication
        ↓
Command execution
        ↓
Privileged activity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the story becomes much more interesting.&lt;/p&gt;

&lt;p&gt;TraceLock correlates those events and reconstructs them into an attack chain.&lt;/p&gt;

&lt;p&gt;For example, one of my synthetic attack scenarios produces:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Credential Attack
        →
Successful Access
        →
Command Execution
        →
Privileged Activity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The resulting assessment is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Risk: CRITICAL
Score: 100/100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It also extracts evidence, produces behavioral analysis, identifies relevant MITRE ATT&amp;amp;CK-style behavioral mappings, generates recommendations, and can export the analysis as JSON.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why build this with zero dependencies?
&lt;/h2&gt;

&lt;p&gt;The Zero Dependency hackathon challenged participants to build useful software using only their language's standard library — no third-party runtime packages, frameworks, or external libraries.&lt;/p&gt;

&lt;p&gt;For a security project, this constraint actually made sense.&lt;/p&gt;

&lt;p&gt;Security tools are exactly the kind of software where the dependency chain deserves attention.&lt;/p&gt;

&lt;p&gt;Every additional runtime package adds something that has to be trusted, maintained, updated, and potentially audited.&lt;/p&gt;

&lt;p&gt;That doesn't mean third-party packages are bad.&lt;/p&gt;

&lt;p&gt;It means that sometimes the right engineering question is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"Do I actually need this dependency?"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;TraceLock was my attempt to answer that question for a small security-analysis engine.&lt;/p&gt;

&lt;h2&gt;
  
  
  What TraceLock does
&lt;/h2&gt;

&lt;p&gt;The project follows a pipeline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Raw Security Logs
       ↓
Log Parser
       ↓
Event Correlation
       ↓
Attack Chain Reconstruction
       ↓
Evidence Extraction
       ↓
Behavior Analysis
       ↓
Anomaly Detection
       ↓
Risk Scoring
       ↓
MITRE Mapping
       ↓
Security Recommendations
       ↓
Terminal / JSON Report
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important part is that each stage is implemented directly in Python.&lt;/p&gt;

&lt;p&gt;No external runtime framework is sitting underneath it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The first challenge: parsing logs without a package
&lt;/h2&gt;

&lt;p&gt;Parsing logs sounds easy until you actually start defining what a parser should do.&lt;/p&gt;

&lt;p&gt;TraceLock's parser needs to extract things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;timestamps&lt;/li&gt;
&lt;li&gt;source IP addresses&lt;/li&gt;
&lt;li&gt;usernames&lt;/li&gt;
&lt;li&gt;event types&lt;/li&gt;
&lt;li&gt;commands&lt;/li&gt;
&lt;li&gt;privilege-related activity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Python's standard library already gives enough building blocks for this.&lt;/p&gt;

&lt;p&gt;I used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;re&lt;/code&gt; for pattern matching&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;datetime&lt;/code&gt; for timestamp parsing&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;dataclasses&lt;/code&gt; for structured event objects&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;typing&lt;/code&gt; for type annotations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The parser converts raw log lines into structured &lt;code&gt;LogEvent&lt;/code&gt; objects.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Raw line
   ↓
Pattern matching
   ↓
Extract fields
   ↓
Classify event
   ↓
Create LogEvent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The interesting realization was that I didn't need a dedicated parsing framework.&lt;/p&gt;

&lt;p&gt;The standard library already had the primitives.&lt;/p&gt;

&lt;h2&gt;
  
  
  The package I would normally reach for: a CLI framework
&lt;/h2&gt;

&lt;p&gt;A command-line tool usually makes people reach for something like Click or Typer.&lt;/p&gt;

&lt;p&gt;TraceLock doesn't use either.&lt;/p&gt;

&lt;p&gt;Instead, the CLI is built with Python's built-in:&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="n"&gt;argparse&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That gives TraceLock commands such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; tracelock.cli examples&lt;span class="se"&gt;\s&lt;/span&gt;ample_attack.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and JSON output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; tracelock.cli examples&lt;span class="se"&gt;\s&lt;/span&gt;ample_attack.log &lt;span class="nt"&gt;--json&lt;/span&gt; reports&lt;span class="se"&gt;\s&lt;/span&gt;ample_attack.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The CLI handles the input file and optional JSON output without requiring another dependency.&lt;/p&gt;

&lt;p&gt;This was probably one of the easiest substitutions.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;argparse&lt;/code&gt; is surprisingly capable once you stop assuming that every CLI needs a framework.&lt;/p&gt;

&lt;h2&gt;
  
  
  The harder part: correlation
&lt;/h2&gt;

&lt;p&gt;Parsing individual events is one thing.&lt;/p&gt;

&lt;p&gt;Understanding the relationship between events is another.&lt;/p&gt;

&lt;p&gt;TraceLock uses a correlation window and groups related events based on context such as source IP and user.&lt;/p&gt;

&lt;p&gt;The correlation engine looks for meaningful sequences rather than treating every event independently.&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 plaintext"&gt;&lt;code&gt;10.10.10.50
    ↓
5 authentication failures
    ↓
successful authentication
    ↓
command execution
    ↓
privileged activity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The system reconstructs this as one attack chain instead of five unrelated observations.&lt;/p&gt;

&lt;p&gt;This required thinking about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;time windows&lt;/li&gt;
&lt;li&gt;event ordering&lt;/li&gt;
&lt;li&gt;source identity&lt;/li&gt;
&lt;li&gt;duplicate-chain prevention&lt;/li&gt;
&lt;li&gt;scoring&lt;/li&gt;
&lt;li&gt;explanations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This was one of the places where I felt the zero-dependency constraint most strongly.&lt;/p&gt;

&lt;p&gt;There wasn't a library I could simply call to "understand this sequence."&lt;/p&gt;

&lt;p&gt;I had to define the behavior myself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turning events into an attack story
&lt;/h2&gt;

&lt;p&gt;A security analyst doesn't just want:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;event_1
event_2
event_3
event_4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;They want a story.&lt;/p&gt;

&lt;p&gt;So TraceLock has a story-building stage that converts correlated events into a chronological narrative.&lt;/p&gt;

&lt;p&gt;For a full attack chain, the title becomes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Credential Attack → Successful Access → Command Execution → Privileged Activity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The report also contains a timeline, stages, evidence, and a conclusion.&lt;/p&gt;

&lt;p&gt;This was an important design decision:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Detection is more useful when the result explains itself.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A score without context isn't very helpful.&lt;/p&gt;

&lt;h2&gt;
  
  
  Risk scoring without a machine-learning framework
&lt;/h2&gt;

&lt;p&gt;Another thing I could have outsourced to a package is scoring.&lt;/p&gt;

&lt;p&gt;I didn't.&lt;/p&gt;

&lt;p&gt;TraceLock uses a custom risk-scoring system based on the observed event sequence and security factors.&lt;/p&gt;

&lt;p&gt;For the full synthetic attack chain, the resulting score is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;100 / 100
CRITICAL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The point isn't that 100 is some universal measurement of real-world risk.&lt;/p&gt;

&lt;p&gt;It is a deterministic assessment produced from the evidence TraceLock observed.&lt;/p&gt;

&lt;p&gt;That distinction matters.&lt;/p&gt;

&lt;p&gt;A security tool should not pretend that a simple heuristic is magically equivalent to a complete security investigation.&lt;/p&gt;

&lt;h2&gt;
  
  
  MITRE ATT&amp;amp;CK mapping
&lt;/h2&gt;

&lt;p&gt;TraceLock also maps observed behaviors to relevant MITRE ATT&amp;amp;CK techniques.&lt;/p&gt;

&lt;p&gt;The current mappings include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;T1110  → Brute Force
T1078  → Valid Accounts
T1059  → Command and Scripting Interpreter
T1068  → Exploitation for Privilege Escalation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These mappings are treated as &lt;strong&gt;behavioral mappings&lt;/strong&gt;, not proof that a particular technique definitely occurred.&lt;/p&gt;

&lt;p&gt;That distinction is important because log evidence alone often cannot establish an attacker's exact intent.&lt;/p&gt;

&lt;p&gt;The goal is to provide useful security context rather than manufacture certainty.&lt;/p&gt;

&lt;h2&gt;
  
  
  Evidence extraction
&lt;/h2&gt;

&lt;p&gt;One of the things I wanted TraceLock to do was show &lt;strong&gt;why&lt;/strong&gt; it reached a conclusion.&lt;/p&gt;

&lt;p&gt;For the sample attack, the report extracts evidence such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;authentication failures&lt;/li&gt;
&lt;li&gt;successful authentication&lt;/li&gt;
&lt;li&gt;command execution&lt;/li&gt;
&lt;li&gt;privileged activity&lt;/li&gt;
&lt;li&gt;multi-stage correlation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result is closer to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Finding
+
Evidence
+
Timeline
+
Risk
+
Explanation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;instead of simply:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CRITICAL!!!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That makes the output much more useful to someone actually investigating an event.&lt;/p&gt;

&lt;h2&gt;
  
  
  Behavior and anomaly analysis
&lt;/h2&gt;

&lt;p&gt;TraceLock also creates a behavior profile from the observed chain.&lt;/p&gt;

&lt;p&gt;For the full attack scenario, it identifies a behavioral progression such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Credential Compromise
        →
Privilege Escalation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;with a confidence value of:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;95%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The anomaly stage produces multiple findings from the same evidence and combines them into an overall anomaly assessment.&lt;/p&gt;

&lt;p&gt;For the sample attack:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Anomaly Score: 100/100
Severity: CRITICAL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Again, these values are part of TraceLock's deterministic analysis model, not claims that the tool can replace a production SOC or SIEM.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recommendations
&lt;/h2&gt;

&lt;p&gt;Detection without action is only half the job.&lt;/p&gt;

&lt;p&gt;TraceLock therefore generates security recommendations based on the detected behavior.&lt;/p&gt;

&lt;p&gt;For the full attack chain, the report produces five recommendations.&lt;/p&gt;

&lt;p&gt;The goal is to move from:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"This looks suspicious."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Here are the next security actions you should consider."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The standard-library replacements
&lt;/h2&gt;

&lt;p&gt;This was the heart of the Zero Dependency challenge.&lt;/p&gt;

&lt;p&gt;Instead of importing packages, I built the required functionality from Python's standard library.&lt;/p&gt;

&lt;p&gt;My &lt;code&gt;STDLIB.md&lt;/code&gt; documents the approach.&lt;/p&gt;

&lt;p&gt;Some of the important substitutions were:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Normally reached for&lt;/th&gt;
&lt;th&gt;TraceLock approach&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Pydantic&lt;/td&gt;
&lt;td&gt;&lt;code&gt;dataclasses&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Click&lt;/td&gt;
&lt;td&gt;&lt;code&gt;argparse&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;python-dateutil&lt;/td&gt;
&lt;td&gt;&lt;code&gt;datetime&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;orjson / ujson&lt;/td&gt;
&lt;td&gt;&lt;code&gt;json&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rich&lt;/td&gt;
&lt;td&gt;standard &lt;code&gt;print()&lt;/code&gt; and formatting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;pandas&lt;/td&gt;
&lt;td&gt;lists and dictionaries&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NumPy&lt;/td&gt;
&lt;td&gt;built-in arithmetic and collections&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;scikit-learn&lt;/td&gt;
&lt;td&gt;custom scoring logic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Loguru&lt;/td&gt;
&lt;td&gt;standard output/file I/O&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PyYAML&lt;/td&gt;
&lt;td&gt;text parsing and standard data structures&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;requests&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;urllib&lt;/code&gt; where needed&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Not every project needs all of these packages.&lt;/p&gt;

&lt;p&gt;The point of the table is to document the kinds of third-party functionality that could normally be used for similar tasks and what standard-library primitives are available instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part that surprised me
&lt;/h2&gt;

&lt;p&gt;The biggest lesson wasn't:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Python has a lot in its standard library."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I already knew that.&lt;/p&gt;

&lt;p&gt;The bigger lesson was:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Packages hide engineering decisions.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When you install a library, you inherit decisions about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;data structures&lt;/li&gt;
&lt;li&gt;error handling&lt;/li&gt;
&lt;li&gt;parsing behavior&lt;/li&gt;
&lt;li&gt;edge cases&lt;/li&gt;
&lt;li&gt;formatting&lt;/li&gt;
&lt;li&gt;APIs&lt;/li&gt;
&lt;li&gt;performance trade-offs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you remove the package, those decisions become yours.&lt;/p&gt;

&lt;p&gt;That's both the difficult part and the educational part.&lt;/p&gt;

&lt;h2&gt;
  
  
  What was harder than the documentation made it look
&lt;/h2&gt;

&lt;p&gt;The standard library makes many things possible.&lt;/p&gt;

&lt;p&gt;It doesn't necessarily make them effortless.&lt;/p&gt;

&lt;p&gt;The hardest part wasn't importing the modules.&lt;/p&gt;

&lt;p&gt;It was designing the behavior.&lt;/p&gt;

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

&lt;h3&gt;
  
  
  1. Correlation isn't just parsing
&lt;/h3&gt;

&lt;p&gt;Finding events is easy.&lt;/p&gt;

&lt;p&gt;Deciding which events belong to the same attack chain requires rules.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. A report needs an explanation
&lt;/h3&gt;

&lt;p&gt;Generating a score is easy.&lt;/p&gt;

&lt;p&gt;Generating a score that a human can understand requires more thought.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Dependency removal changes the architecture
&lt;/h3&gt;

&lt;p&gt;Without a framework doing work for you, every layer has to have a clear responsibility.&lt;/p&gt;

&lt;p&gt;That pushed TraceLock toward a modular design:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;parser
correlator
risk
story
evidence
behavior
anomaly
mitre
recommendation
report
cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Zero dependency also means zero hiding
&lt;/h3&gt;

&lt;p&gt;If something goes wrong, there's no package to blame.&lt;/p&gt;

&lt;p&gt;The behavior is yours.&lt;/p&gt;

&lt;p&gt;And that's actually a good thing for learning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing it
&lt;/h2&gt;

&lt;p&gt;I didn't want the zero-dependency claim to be just something written in the README.&lt;/p&gt;

&lt;p&gt;TraceLock includes automated tests.&lt;/p&gt;

&lt;p&gt;Running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; pytest &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;produces four passing tests covering:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;test_normal_login
test_brute_force
test_command_activity
test_full_attack_chain
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important distinction is that &lt;code&gt;pytest&lt;/code&gt; is a &lt;strong&gt;development/testing dependency only&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It is not required to run TraceLock.&lt;/p&gt;

&lt;p&gt;The runtime itself uses only Python's standard library.&lt;/p&gt;

&lt;h2&gt;
  
  
  Proving the dependency claim
&lt;/h2&gt;

&lt;p&gt;I also included a &lt;code&gt;deps-proof.txt&lt;/code&gt; file in the repository.&lt;/p&gt;

&lt;p&gt;The proof records:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Python: 3.13.14
Runtime dependencies: STANDARD LIBRARY ONLY
Third-party runtime packages: 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The repository also includes:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;which documents the standard-library approach and the development-only testing dependency.&lt;/p&gt;

&lt;p&gt;The goal was to make the claim verifiable rather than simply saying:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Trust me, bro. No dependencies."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  A real run
&lt;/h2&gt;

&lt;p&gt;Using the included synthetic attack log:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; tracelock.cli examples&lt;span class="se"&gt;\s&lt;/span&gt;ample_attack.log &lt;span class="nt"&gt;--json&lt;/span&gt; reports&lt;span class="se"&gt;\s&lt;/span&gt;ample_attack.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;TraceLock detects:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Attack chains detected: 1

Title:
Credential Attack → Successful Access → Command Execution → Privileged Activity

Risk:
CRITICAL

Score:
100/100

Evidence:
5 items

Behavior:
Credential Compromise → Privilege Escalation

Behavior confidence:
95%

Anomaly:
100/100

Severity:
CRITICAL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It also generates the JSON report successfully.&lt;/p&gt;

&lt;p&gt;The sample scenario contains five authentication failures followed by successful authentication, command execution, and privileged activity.&lt;/p&gt;

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

&lt;p&gt;This hackathon changed the way I look at dependencies.&lt;/p&gt;

&lt;p&gt;Before this project, the mental model was often:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Need feature
    ↓
Search package
    ↓
Install package
    ↓
Use package
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Zero Dependency forced me to think:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Need feature
    ↓
What does the feature actually require?
    ↓
What does the language already provide?
    ↓
Can I compose those primitives?
    ↓
What trade-offs am I accepting?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That second process takes more effort.&lt;/p&gt;

&lt;p&gt;But it teaches you what's actually happening underneath the abstraction.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does this mean third-party packages are bad?
&lt;/h2&gt;

&lt;p&gt;No.&lt;/p&gt;

&lt;p&gt;That isn't the lesson I took from the hackathon.&lt;/p&gt;

&lt;p&gt;Libraries exist for good reasons.&lt;/p&gt;

&lt;p&gt;A mature package can provide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;better edge-case handling&lt;/li&gt;
&lt;li&gt;stronger performance&lt;/li&gt;
&lt;li&gt;broader compatibility&lt;/li&gt;
&lt;li&gt;years of maintenance&lt;/li&gt;
&lt;li&gt;extensive testing&lt;/li&gt;
&lt;li&gt;features that aren't worth rebuilding yourself&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wouldn't recommend replacing every dependency with handwritten code in a production system.&lt;/p&gt;

&lt;p&gt;The lesson is different:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Know what you're depending on.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And know enough about the underlying problem that you can recognize when a dependency is genuinely valuable versus when you're importing an entire abstraction for a small piece of functionality.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why TraceLock matters
&lt;/h2&gt;

&lt;p&gt;TraceLock is not intended to replace a production SIEM, EDR, SOC, or professional incident-response platform.&lt;/p&gt;

&lt;p&gt;It's a lightweight security-analysis engine and an exploration of how far you can go with Python's standard library.&lt;/p&gt;

&lt;p&gt;The interesting part isn't just that it has zero runtime dependencies.&lt;/p&gt;

&lt;p&gt;It's that a reasonably complete pipeline can still exist:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Logs
 ↓
Parsing
 ↓
Correlation
 ↓
Attack reconstruction
 ↓
Evidence
 ↓
Behavior
 ↓
Anomaly detection
 ↓
Risk scoring
 ↓
MITRE context
 ↓
Recommendations
 ↓
Reports
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All without installing a runtime package.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;The most useful thing I got from Zero Dependency wasn't a dependency-free project.&lt;/p&gt;

&lt;p&gt;It was a better question.&lt;/p&gt;

&lt;p&gt;Instead of immediately asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Which package should I install?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I now ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"What is the package actually doing for me?"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Sometimes the answer is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"A lot. Use the package."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Sometimes it's:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I can build this from the standard library."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Knowing the difference is the real skill.&lt;/p&gt;

&lt;p&gt;TraceLock was my attempt to put that idea into practice — by building a security event correlation and attack analysis engine from Python's standard library, documenting the substitutions, testing the implementation, and proving that the runtime dependency count is zero.&lt;/p&gt;

&lt;p&gt;And honestly, writing the code was only half the challenge.&lt;/p&gt;

&lt;p&gt;The other half was discovering what I had been letting packages hide from me.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try TraceLock
&lt;/h2&gt;

&lt;p&gt;The source code, example logs, tests, dependency proof, standard-library documentation, and usage instructions are available in the TraceLock GitHub repository.&lt;/p&gt;

&lt;p&gt;If you're interested in security tooling, dependency reduction, or simply understanding what your language can do before reaching for another package, feel free to explore it.&lt;/p&gt;

</description>
      <category>python</category>
      <category>cybersecurity</category>
      <category>hackathon</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
