<?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"><channel><title><![CDATA[TraceShield-AI]]></title><description><![CDATA[TraceShield-AI]]></description><link>https://traceshield-ai.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Wed, 18 Nov 2026 16:17:23 GMT</lastBuildDate><atom:link href="https://traceshield-ai.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Building TraceShield AI: An Autonomous Security Investigation Agent Powered by FalkorDB, Gemini, and LangGraph]]></title><description><![CDATA[From isolated vulnerability alerts to connected security intelligence, autonomous verification, and persistent agent memory. Built for WeMakeDevs ×…]]></description><link>https://traceshield-ai.hashnode.dev/building-traceshield-ai-an-autonomous-security-investigation-agent-powered-by-falkordb-gemini-and-langgraph</link><guid isPermaLink="true">https://traceshield-ai.hashnode.dev/building-traceshield-ai-an-autonomous-security-investigation-agent-powered-by-falkordb-gemini-and-langgraph</guid><dc:creator><![CDATA[Umesh Satpathi]]></dc:creator><pubDate>Sun, 18 Oct 2026 16:10:48 GMT</pubDate><content:encoded><![CDATA[<p><em>From isolated vulnerability alerts to connected security intelligence, autonomous verification, and persistent agent memory.</em></p>
<p><strong>Built for WeMakeDevs × FalkorDB Graph Hacks 2026</strong></p>
<p><strong>GitHub:</strong> <a href="https://github.com/subhasish52/TraceShield-AI">https://github.com/subhasish52/TraceShield-AI</a></p>
<hr />
<h2>1. The Problem: Security Alerts Don't Tell the Whole Story</h2>
<p>Imagine a security scanner identifies a potential authorization vulnerability in an API endpoint:</p>
<p><code>GET /api/orders/101</code></p>
<p>It reports a possible <strong>Broken Object Level Authorization (BOLA)</strong> issue.</p>
<p>At first glance, this is just another vulnerability alert. But for a developer or security analyst, the most important questions are still unanswered:</p>
<ul>
<li><p>Which backend service handles this endpoint?</p>
</li>
<li><p>What database does the service communicate with?</p>
</li>
<li><p>What sensitive information could be affected?</p>
</li>
<li><p>Are other vulnerabilities connected to the same service?</p>
</li>
<li><p>Who is responsible for fixing the issue?</p>
</li>
<li><p>Has the vulnerability actually been verified?</p>
</li>
<li><p>If the application is updated, how do we know the fix works?</p>
</li>
</ul>
<p>Most security tools focus primarily on detecting and reporting vulnerabilities. But security teams also need context, verification, and historical evidence to make decisions.</p>
<p>That gap inspired me to build <strong>TraceShield AI</strong>.</p>
<p>The idea was straightforward:</p>
<blockquote>
<p>What if an AI agent could understand an application's infrastructure as a graph, investigate security findings using that context, execute approved verification tests, and store the results for future investigations?</p>
</blockquote>
<p>I didn't want to build another chatbot that simply explains security vulnerabilities.</p>
<p>I wanted to explore how connected data could help an AI-assisted system decide what should be investigated next, carry out a controlled check, and preserve evidence of what actually happened.</p>
<h2>2. Introducing TraceShield AI</h2>
<p>TraceShield AI is a graph-powered autonomous security investigation prototype built using <strong>FalkorDB, Google Gemini, LangChain/LangGraph, Python, and Streamlit</strong>.</p>
<p>Its workflow has five main stages:</p>
<ol>
<li><p><strong>Connect:</strong> Represent the application's infrastructure, security findings, ownership, and evidence in FalkorDB.</p>
</li>
<li><p><strong>Investigate:</strong> Use graph queries to understand the potential impact of a finding.</p>
</li>
<li><p><strong>Plan:</strong> Select an appropriate verification action using the available graph context and a fixed safety policy.</p>
</li>
<li><p><strong>Verify:</strong> Execute an authorized security test against a local demonstration application.</p>
</li>
<li><p><strong>Remember:</strong> Store investigations, decisions, actions, and test results back in FalkorDB.</p>
</li>
</ol>
<p>The crucial distinction is that TraceShield does not treat an AI-generated explanation as proof of a vulnerability.</p>
<p>It relies on actual test observations and persistent graph records.</p>
<p>The current implementation is a defensive research prototype designed around a local synthetic application called <strong>DemoShop</strong>. It is not a general-purpose internet vulnerability scanner.</p>
<h2>3. Why I Chose FalkorDB</h2>
<p>When designing the system, I realized that application security data is naturally interconnected.</p>
<p>Consider an API vulnerability. Its consequences may depend on several relationships:</p>
<ul>
<li><p>A website exposes an API endpoint.</p>
</li>
<li><p>The endpoint routes to a backend service.</p>
</li>
<li><p>The service queries a database.</p>
</li>
<li><p>The database stores sensitive records.</p>
</li>
<li><p>A team owns the service.</p>
</li>
<li><p>Multiple findings may affect the same endpoint.</p>
</li>
<li><p>An investigation produces evidence and verification results.</p>
</li>
</ul>
<p>If I stored these as disconnected records, the investigator would need to reconstruct the relationships repeatedly.</p>
<p>A graph database lets those relationships become part of the data model itself.</p>
<p>That's why I used <strong>FalkorDB</strong>.</p>
<p>Instead of asking only:</p>
<p><em>"How severe is vulnerability F-004?"</em></p>
<p>TraceShield can investigate:</p>
<p><em>"Which sensitive assets are connected to the endpoint affected by F-004, which service owns that endpoint, and what verification has already been performed?"</em></p>
<p>The ability to traverse these connections is central to the project.</p>
<h3>Our security knowledge graph</h3>
<p>The primary dependency path looks like this:</p>
<pre><code class="language-text">Project
   |
   | CONTAINS
   v
Website
   |
   | EXPOSES
   v
Endpoint
   |
   | ROUTES_TO
   v
Service
   |
   | QUERIES
   v
Database
   |
   | STORES
   v
DataAsset
</code></pre>
<p>Security findings connect into this infrastructure:</p>
<pre><code class="language-text">Finding --AFFECTS------&gt; Endpoint
Finding --SUPPORTED_BY-&gt; Evidence
Team ----OWNS----------&gt; Service
</code></pre>
<p>Additional graph entities represent investigation activity:</p>
<pre><code class="language-text">Investigation
Decision
Action
TestResult
</code></pre>
<p>This gives TraceShield two important types of connected information.</p>
<p><strong>Application context</strong> describes what the system contains and which components depend on one another.</p>
<p><strong>Investigation context</strong> describes what the agent examined, which actions were selected, what tests ran, and what those tests observed.</p>
<p>FalkorDB serves both purposes.</p>
<h2>4. System Architecture: How Everything Connects</h2>
<p>Here's the conceptual architecture of the project:</p>
<pre><code class="language-text">             LOCAL DEMOSHOP
             Synthetic Web App
                    |
                    v
          HTTP Security Scanners
                    |
                    v
          Evidence Normalization
                    |
                    v
        +------------------------+
        |        FalkorDB        |
        | Security Knowledge     |
        | Graph + Audit History  |
        +------------------------+
                    |
                    v
        Graph Intelligence Layer
                    |
                    v
          Safe Action Policy
                    |
          +---------+----------+
          |                    |
          v                    v
  Autonomous Executor    Gemini Investigator
          |                    |
          |                    v
          |             Graph-Based Handoff
          |                    |
          |                    v
          |              Gemini Verifier
          |                    |
          +---------+----------+
                    |
                    v
          Approved Local Tests
                    |
                    v
       New Evidence + TestResults
                    |
                    v
                 FalkorDB
                    |
                    v
            Streamlit Dashboard
</code></pre>
<p>Each technology has a specific role.</p>
<table>
<thead>
<tr>
<th>Technology</th>
<th>Responsibility</th>
</tr>
</thead>
<tbody><tr>
<td><strong>FalkorDB</strong></td>
<td>Connected security data, Cypher traversal, persistent investigation state</td>
</tr>
<tr>
<td><strong>Google Gemini</strong></td>
<td>Natural-language reasoning and agent tool use</td>
</tr>
<tr>
<td><strong>LangChain/LangGraph</strong></td>
<td>Tool integration and agent workflow orchestration</td>
</tr>
<tr>
<td><strong>Python</strong></td>
<td>Scanners, graph tools, verification logic, policies, and CLI</td>
</tr>
<tr>
<td><strong>Streamlit</strong></td>
<td>Interactive investigation dashboard</td>
</tr>
<tr>
<td><strong>Docker Compose</strong></td>
<td>Local FalkorDB environment</td>
</tr>
<tr>
<td><strong>DemoShop</strong></td>
<td>Controlled synthetic application for testing security behavior</td>
</tr>
</tbody></table>
<p>One design principle became particularly important: <strong>the language model should not be trusted to invent security evidence or bypass execution restrictions</strong>.</p>
<p>The graph provides context. The policy determines what is permitted. The scanner or verification tool provides the observation.</p>
<h2>5. Building the FalkorDB Graph</h2>
<p>The first major implementation task was creating the security graph.</p>
<p>I wrote Python modules to connect to FalkorDB, seed synthetic application relationships, and retrieve connected data using Cypher.</p>
<p>The important files include:</p>
<pre><code class="language-text">graph_db.py
seed_graph.py
seed_operational_context.py
graph_tools.py
graph_intelligence.py
agent_graph_tools_v2.py
</code></pre>
<p><code>graph_db.py</code> provides the database connection.</p>
<p><code>seed_graph.py</code> creates reproducible application dependencies and example security findings.</p>
<p><code>seed_operational_context.py</code> adds project and team ownership relationships.</p>
<p>Together, these scripts provide a consistent dataset for demonstrating graph-based reasoning.</p>
<h3>Example: tracing F-004 to sensitive data</h3>
<p>Our synthetic BOLA scenario affects an orders API.</p>
<p>The connected impact path is:</p>
<pre><code class="language-text">F-004
  |
  v
/api/orders/{id}
  |
  v
Orders Service
  |
  v
Shop Database
  |
  v
Customer Orders
</code></pre>
<p>This is the kind of relationship that would be difficult to communicate using an isolated vulnerability description.</p>
<p>In FalkorDB, we can retrieve this context using a Cypher query:</p>
<pre><code class="language-cypher">MATCH p=(f:Finding {id:'F-004'})
        -[:AFFECTS]-&gt;(e:Endpoint)
        -[:ROUTES_TO]-&gt;(s:Service)
        -[:QUERIES]-&gt;(d:Database)
        -[:STORES]-&gt;(a:DataAsset)
RETURN p
</code></pre>
<p>The result is an inspectable graph path from the security finding to the connected data asset.</p>
<p>That is valuable because an authorization flaw affecting a public API can have very different implications depending on whether the API reaches public content or sensitive customer records.</p>
<p>An important limitation is that <strong>graph reachability indicates a possible impact path, not proof that an attacker can exploit every connected component</strong>.</p>
<p>TraceShield uses the graph to inform investigation, not to manufacture conclusions.</p>
<h2>6. Graph-Aware Risk Intelligence</h2>
<p>Once the knowledge graph was created, the next challenge was making useful decisions from it.</p>
<p>For that, I developed the graph intelligence layer.</p>
<p>The goal was to look beyond individual vulnerability labels and investigate the surrounding application context.</p>
<p>TraceShield can explore affected endpoints, connected backend services, databases, sensitive assets, owner teams, and related findings.</p>
<p>It also supports a deterministic inherent-impact scoring heuristic.</p>
<p>In our demonstration dataset, the BOLA scenario has a high inherent impact score, while the missing security-header scenario has a lower score.</p>
<p>But a distinction matters here:</p>
<p><strong>An inherent risk score is not the probability that the vulnerability is currently exploitable.</strong></p>
<p>For example, F-004 can retain an inherent impact score of 90 even after a successful remediation test.</p>
<p>That score reflects the significance of the underlying security scenario. The current test result tells us whether the specific behavior is still reproducible.</p>
<p>This separation between <strong>potential impact</strong> and <strong>observed verification status</strong> is essential for communicating accurate security information.</p>
<h3>Finding correlation</h3>
<p>The graph also makes it possible to identify security findings that share infrastructure dependencies.</p>
<p>For example, two findings may affect the same API endpoint or backend service.</p>
<p>That can help an investigator understand whether multiple alerts relate to a common component.</p>
<p>A simple example query is:</p>
<pre><code class="language-cypher">MATCH (f:Finding {id:'F-004'})
      -[:AFFECTS]-&gt;(e:Endpoint)
      &lt;-[:AFFECTS]-(other:Finding)
WHERE other.id &lt;&gt; f.id
RETURN other.id, other.title
</code></pre>
<p>This retrieves other findings connected to the same endpoint.</p>
<p>Instead of investigating each alert without context, TraceShield can surface shared dependencies and relationships.</p>
<h2>7. Creating a Safe Environment with DemoShop</h2>
<p>I needed a way to demonstrate real verification without interacting with unauthorized or third-party systems.</p>
<p>So I built a local synthetic application called <strong>DemoShop</strong>.</p>
<p>DemoShop provides a controlled order-access scenario involving two fictional users:</p>
<p><strong>Alice</strong> owns an order.</p>
<p><strong>Bob</strong> is a different user who should not be able to read Alice's order.</p>
<p>This allows us to demonstrate a common API security concept: <strong>Broken Object Level Authorization</strong>, often called BOLA.</p>
<p>BOLA occurs when an application fails to correctly verify whether the requesting user is authorized to access a particular object.</p>
<h3>Two application modes</h3>
<p>DemoShop supports two demonstration modes.</p>
<p><strong>Intentionally vulnerable mode:</strong></p>
<pre><code class="language-cmd">python demoshop\app.py
</code></pre>
<p>This mode is used exclusively on localhost to demonstrate the insecure behavior.</p>
<p><strong>Secure mode:</strong></p>
<pre><code class="language-cmd">python demoshop\app.py --secure
</code></pre>
<p>In secure mode, the application performs the ownership check.</p>
<p>The expected behavior is:</p>
<pre><code class="language-text">Alice requests her own order
→ HTTP 200 OK

Bob requests Alice's order
→ HTTP 403 Forbidden
</code></pre>
<p>This setup lets us compare insecure and secured application behavior using actual HTTP requests rather than relying on a hypothetical vulnerability description.</p>
<p>The insecure version must never be exposed as a public application.</p>
<h2>8. Adding Security Scanners and Evidence Ingestion</h2>
<p>With DemoShop running locally, I added security-checking modules.</p>
<p>The project contains two main types of local checks.</p>
<h3>HTTP security-header scanner</h3>
<p>The HTTP-header scanner examines a local HTTP response for security-related headers.</p>
<p>One of the demonstration observations is a missing <strong>Content Security Policy (CSP)</strong> header.</p>
<p>CSP is a browser security control that helps restrict which resources a web page may load or execute.</p>
<p>In our prototype, the scanner can record an observation that the local response does not include the expected header.</p>
<p>The command is:</p>
<pre><code class="language-cmd">python -m scanners.http_headers
</code></pre>
<p>This is important because the system is no longer limited to displaying a written example of a security problem. It can inspect a running local application and record what it sees.</p>
<p>However, a missing CSP header is a configuration observation. It is <strong>not</strong> by itself proof of an exploitable cross-site scripting vulnerability.</p>
<h3>Authorization regression scanner</h3>
<p>The second scanner checks object-level authorization behavior in DemoShop:</p>
<pre><code class="language-cmd">python -m scanners.bola_check
</code></pre>
<p>It performs the local ownership-access check and records the result.</p>
<p>The project also supports reviewing the history of these checks:</p>
<pre><code class="language-cmd">python -m scanners.bola_check --history
</code></pre>
<h3>From observation to graph evidence</h3>
<p>The ingestion layer takes scanner observations and writes corresponding records into FalkorDB.</p>
<p>This creates a connection between application security information and actual test evidence.</p>
<p>The current prototype includes reproducible, predefined finding identifiers for its core demonstration scenarios. Verification executions can still create new test and audit records.</p>
<p>This distinction is worth emphasizing: <strong>TraceShield currently demonstrates evidence ingestion and investigation, not unrestricted automatic discovery of arbitrary new vulnerabilities.</strong></p>
<p>Generalized finding creation and deduplication are planned improvements.</p>
<h2>9. Understanding the Four Demonstration Findings</h2>
<p>To make the project easy to reproduce, I created a small set of security scenarios.</p>
<p>They serve different purposes.</p>
<table>
<thead>
<tr>
<th>Finding</th>
<th>Scenario</th>
<th>What it represents</th>
</tr>
</thead>
<tbody><tr>
<td><strong>F-001</strong></td>
<td>Possible BOLA issue</td>
<td>Seeded synthetic finding, initially unverified</td>
</tr>
<tr>
<td><strong>F-002</strong></td>
<td>Missing CSP</td>
<td>Seeded synthetic configuration example</td>
</tr>
<tr>
<td><strong>F-003</strong></td>
<td>Missing CSP on DemoShop</td>
<td>Observation from a local HTTP-header check</td>
</tr>
<tr>
<td><strong>F-004</strong></td>
<td>Cross-user order access</td>
<td>Synthetic BOLA scenario with vulnerable and remediated verification stages</td>
</tr>
</tbody></table>
<p>The seeded examples are intentional.</p>
<p>They make it possible to demonstrate graph traversals, impact analysis, and agent workflows consistently without depending on an unpredictable external environment.</p>
<p>But the seeded examples are not presented as newly discovered real-world vulnerabilities.</p>
<p>The more meaningful part of the prototype is what happens after a finding enters the graph: the system retrieves its dependencies, selects an approved test, executes that test, and writes the result back to FalkorDB.</p>
<h2>10. Building the Autonomous Investigator</h2>
<p>This became one of my favorite parts of the project.</p>
<p>I wanted TraceShield to perform an investigation workflow rather than simply generate a textual explanation.</p>
<p>The implementation lives primarily in:</p>
<pre><code class="language-text">autonomous_investigator.py
action_policy.py
agent_autonomy_tools.py
</code></pre>
<p>The autonomous workflow follows a controlled sequence:</p>
<pre><code class="language-text">Finding selected
      |
      v
Read FalkorDB context
      |
      v
Determine approved next action
      |
      v
Check safety policy
      |
      v
Execute authorized local test
      |
      v
Write investigation and results
      |
      v
Report observed outcome
</code></pre>
<h3>Planning an investigation</h3>
<p>For example, I can request an investigation plan for F-004:</p>
<pre><code class="language-cmd">python autonomous_investigator.py plan F-004
</code></pre>
<p>The system reads the finding context and identifies the relevant verification workflow.</p>
<h3>Executing the investigation</h3>
<p>I can then run:</p>
<pre><code class="language-cmd">python autonomous_investigator.py run F-004
</code></pre>
<p>This executes the approved local regression check and records the outcome.</p>
<h3>Reviewing investigation history</h3>
<pre><code class="language-cmd">python autonomous_investigator.py history F-004
</code></pre>
<p>Rather than producing only terminal output, the workflow persists operational records in FalkorDB.</p>
<p>These records include investigation, decision, action, and test-result information.</p>
<p>This is what makes the workflow auditable.</p>
<p>A user can inspect not only the conclusion, but also the recorded activity that led to it.</p>
<h3>Deterministic autonomy versus AI autonomy</h3>
<p>An important architectural decision was maintaining a deterministic investigation path that does not require a language-model request.</p>
<p>That means the approved regression check can still operate when the Gemini API is unavailable or rate-limited.</p>
<p>This path is graph-directed and policy-controlled. It should not be confused with unrestricted AI reasoning.</p>
<p>The Gemini-powered agents form a separate layer that can retrieve graph context and work with the same approved tools.</p>
<h2>11. Making Autonomous Security Testing Safer</h2>
<p>Autonomous security tooling needs boundaries.</p>
<p>An AI model can generate convincing instructions, but that does not mean every action it proposes should be executed.</p>
<p>For TraceShield, I implemented a restricted action policy.</p>
<p>The current prototype allows approved local verification actions against the DemoShop environment.</p>
<p>Its safety model includes:</p>
<ul>
<li><p>A fixed allow-list of permitted verification actions.</p>
</li>
<li><p>Localhost-only testing.</p>
</li>
<li><p>No arbitrary shell-command execution.</p>
</li>
<li><p>No unrestricted external website scanning.</p>
</li>
<li><p>No automatic changes to production systems.</p>
</li>
<li><p>Persistent recording of investigation actions and results.</p>
</li>
</ul>
<p>This creates a clear separation between <strong>reasoning about an action</strong> and <strong>having permission to execute it</strong>.</p>
<p>In practice, the language model cannot expand the application's permissions simply by asking for a different tool or target.</p>
<p>This is especially important in a cybersecurity project, where an unrestricted agent could introduce unnecessary risk.</p>
<p>The intention is controlled security automation, not an agent with unlimited authority.</p>
<h2>12. Integrating Google Gemini and LangGraph</h2>
<p>After establishing the deterministic graph workflow, I added an AI-assisted investigation layer.</p>
<p>I used Google Gemini for reasoning and LangChain/LangGraph for tool integration and agent workflow orchestration.</p>
<p>The single-agent workflow can be invoked with a natural-language instruction such as:</p>
<pre><code class="language-cmd">python agent_autonomous.py "Investigate F-004 using FalkorDB, execute the approved regression verification, and explain the result."
</code></pre>
<p>The agent can work with graph tools to inspect the finding, retrieve connected information, and request an approved verification.</p>
<p>This is more useful than asking a general-purpose chatbot to explain BOLA, because the agent has access to the application's specific graph context and investigation tools.</p>
<p>However, I still treat the model's final response as an explanation rather than the definitive evidence source.</p>
<p>When a verification action is claimed, its execution should be confirmed by the corresponding test record in FalkorDB.</p>
<p>That distinction matters because AI-generated text can sound confident even when an external action has not actually happened.</p>
<h2>13. Going Beyond One Agent: Investigator and Verifier</h2>
<p>The next step was supporting cooperation between two agents.</p>
<p>I implemented a multi-agent workflow in:</p>
<pre><code class="language-text">multi_agent_workflow.py
</code></pre>
<p>The workflow has two roles.</p>
<h3>Agent 1: Investigator</h3>
<p>The Investigator is responsible for understanding the security finding.</p>
<p>It retrieves graph context, reviews the connected assets and available evidence, examines the permitted action plan, and prepares a verification handoff.</p>
<p>Crucially, this stage does not need to perform the security test itself.</p>
<h3>Agent 2: Verifier</h3>
<p>The Verifier reads the shared investigation state, inspects the approved verification action, executes the local regression check, and reviews the updated result.</p>
<p>The workflow can be started with:</p>
<pre><code class="language-cmd">python multi_agent_workflow.py F-004
</code></pre>
<p>The key architectural idea is that <strong>the handoff is supported by persistent state in FalkorDB</strong>.</p>
<p>The agents do not have to rely entirely on an ephemeral conversation transcript to communicate what is being investigated.</p>
<p>A simplified flow looks like this:</p>
<pre><code class="language-text">Investigator Agent
       |
       | retrieves context
       v
    FalkorDB
       |
       | records handoff
       v
Verifier Agent
       |
       | performs approved test
       v
 Local DemoShop
       |
       | returns HTTP observations
       v
    FalkorDB
       |
       | persistent result
       v
 Final Explanation
</code></pre>
<p>This makes the coordination more inspectable.</p>
<p>It also provides a foundation for more complex future workflows, such as introducing a reviewer agent or requiring human approval before high-impact actions.</p>
<h2>14. The End-to-End BOLA Verification Demo</h2>
<p>The clearest demonstration of TraceShield AI is finding F-004.</p>
<p>This scenario ties together the security graph, investigation workflow, controlled HTTP testing, and persistent evidence.</p>
<h3>Step 1: Understand the potential impact</h3>
<p>F-004 represents a synthetic cross-user authorization scenario affecting the orders API.</p>
<p>In FalkorDB, the finding is connected to the API endpoint, Orders Service, Shop Database, and Customer Orders data asset.</p>
<p>This tells the investigator why the scenario is potentially important.</p>
<h3>Step 2: Demonstrate insecure behavior</h3>
<p>In the deliberately vulnerable DemoShop mode, the application can allow one synthetic account to access an order belonging to another account.</p>
<p>That illustrates the authorization problem being tested.</p>
<p>This is a local educational demonstration, not a claim about a publicly deployed application.</p>
<h3>Step 3: Switch to the secured implementation</h3>
<p>I then run DemoShop with authorization enforcement enabled:</p>
<pre><code class="language-cmd">python demoshop\app.py --secure
</code></pre>
<p>This configuration change is controlled by the developer. TraceShield does not autonomously modify the application code to fix the vulnerability.</p>
<h3>Step 4: Execute the regression test</h3>
<p>With the secure application running:</p>
<pre><code class="language-cmd">python autonomous_investigator.py run F-004
</code></pre>
<p>The expected observed result is:</p>
<pre><code class="language-text">Alice (order owner): HTTP 200
Bob (different user): HTTP 403

Result:
Ownership enforcement verified for the tested case.
</code></pre>
<p>This is the critical moment.</p>
<p>The system is not simply saying, "The vulnerability has been fixed."</p>
<p>It is running an HTTP check that demonstrates whether the specific unauthorized request is rejected.</p>
<h3>Step 5: Persist the result</h3>
<p>After the test, TraceShield writes the verification outcome and associated audit records back into FalkorDB.</p>
<p>The investigation can then be reviewed through the graph or CLI history.</p>
<p>For the demonstrated scenario, F-004 can be classified as remediated after a passing secure-mode regression check.</p>
<p>That does not mean every endpoint in the entire application has been proven secure. It means the tested ownership condition passed.</p>
<p>This distinction between <strong>observed security behavior</strong> and <strong>general security assurance</strong> is something I deliberately preserve in the project.</p>
<h2>15. Persistent Agent Memory: Why It Matters</h2>
<p>One limitation of conventional chatbot workflows is that an explanation may disappear into conversation history without becoming reusable structured evidence.</p>
<p>TraceShield takes a different approach.</p>
<p>It stores investigation activities as connected records.</p>
<p>For example, we can represent the following conceptual history:</p>
<pre><code class="language-text">Finding F-004
      |
      v
Investigation
      |
      v
Decision
      |
      v
Approved Action
      |
      v
TestResult
      |
      v
Observed HTTP Statuses
</code></pre>
<p>The exact graph relationships are defined by the application's writers, but the underlying idea is that investigation activity becomes queryable data.</p>
<p>This means a future process can inspect what was tested previously.</p>
<p>It can also distinguish a finding's original security significance from its most recent verification result.</p>
<p>Persistent evidence is useful for debugging, accountability, and avoiding decisions based purely on an AI-generated narrative.</p>
<p>For me, this was one of the strongest reasons to use FalkorDB for agent coordination as well as infrastructure relationships.</p>
<h2>16. Building an Interactive Dashboard with Streamlit</h2>
<p>A project like this needs more than command-line output.</p>
<p>I created an interactive dashboard using Streamlit:</p>
<pre><code class="language-cmd">python -m streamlit run dashboard.py
</code></pre>
<p>The dashboard is available locally at:</p>
<p><code>http://localhost:8501</code></p>
<p>It provides a way to explore graph-backed findings, connected dependencies, risk information, and investigation or verification history.</p>
<p>Alongside Streamlit, FalkorDB's browser allows direct inspection of the graph itself at:</p>
<p><code>http://localhost:3000</code></p>
<p>Having both interfaces is useful for different reasons.</p>
<p><strong>Streamlit</strong> makes the project easier to demonstrate to users who want a high-level security investigation workflow.</p>
<p><strong>FalkorDB Browser</strong> exposes the underlying nodes and relationships, making it easier to verify that the connected data genuinely exists.</p>
<p>During development, the graph contained application infrastructure nodes as well as investigation records, decisions, actions, evidence, and test results.</p>
<p>As verification runs are executed, new operational records can be added. The size of the graph is therefore not simply a count of vulnerabilities.</p>
<p>For the hackathon demonstration, I focused on showing a specific dependency path rather than presenting a crowded full-graph visualization.</p>
<h2>17. Running TraceShield AI Locally</h2>
<p>The project is available on GitHub:</p>
<p><strong><a href="https://github.com/subhasish52/TraceShield-AI">https://github.com/subhasish52/TraceShield-AI</a></strong></p>
<p>The local setup uses Python and Docker.</p>
<h3>Clone and install</h3>
<pre><code class="language-cmd">git clone https://github.com/subhasish52/TraceShield-AI.git
cd TraceShield-AI

py -3 -m venv .venv
.venv\Scripts\activate

python -m pip install -r requirements.txt
</code></pre>
<h3>Configure the environment</h3>
<p>Create <code>.env</code> using the example:</p>
<pre><code class="language-cmd">copy .env.example .env
</code></pre>
<p>Set the FalkorDB connection and your own Gemini API key.</p>
<p>The project uses <code>gemini-2.5-flash</code> in its documented configuration, subject to model availability and API quota.</p>
<p>API keys should never be committed to GitHub.</p>
<h3>Start FalkorDB</h3>
<pre><code class="language-cmd">docker compose up -d
</code></pre>
<p>For a fresh environment, populate the synthetic graph:</p>
<pre><code class="language-cmd">python seed_graph.py
python seed_operational_context.py
</code></pre>
<h3>Start DemoShop</h3>
<p>In a separate terminal:</p>
<pre><code class="language-cmd">python demoshop\app.py --secure
</code></pre>
<h3>Run a security check</h3>
<pre><code class="language-cmd">python -m scanners.http_headers
python -m scanners.bola_check
</code></pre>
<h3>Run an investigation</h3>
<pre><code class="language-cmd">python autonomous_investigator.py plan F-004
python autonomous_investigator.py run F-004
python autonomous_investigator.py history F-004
</code></pre>
<h3>Run the multi-agent workflow</h3>
<pre><code class="language-cmd">python multi_agent_workflow.py F-004
</code></pre>
<h3>Launch the dashboard</h3>
<pre><code class="language-cmd">python -m streamlit run dashboard.py
</code></pre>
<p>These commands cover the main local demonstration workflow.</p>
<h2>18. Challenges I Faced While Building It</h2>
<p>The most interesting parts of the project weren't just choosing technologies. They were making those technologies work together reliably.</p>
<h3>Challenge 1: Designing useful graph relationships</h3>
<p>Initially, it was tempting to treat the database as simple storage for vulnerability records.</p>
<p>But that would not make FalkorDB central to the investigation process.</p>
<p>I had to think carefully about how a finding connects to an endpoint, how the endpoint connects to the service, and how that chain reaches a sensitive data asset.</p>
<p>The lesson was that <strong>a graph is only as useful as the relationships it represents</strong>.</p>
<h3>Challenge 2: Separating risk from proof</h3>
<p>A graph may show that an affected endpoint reaches a sensitive database.</p>
<p>That does not establish that a particular security weakness is currently exploitable.</p>
<p>Similarly, a high inherent risk score does not mean the latest security regression failed.</p>
<p>I addressed this by treating impact context and observed verification status as separate concepts.</p>
<h3>Challenge 3: Making autonomous actions predictable</h3>
<p>Security testing is not an area where unrestricted tool execution is appropriate.</p>
<p>I needed a workflow that could choose meaningful actions without granting the agent arbitrary access to the machine or external systems.</p>
<p>This motivated the fixed action policy and allow-listed localhost verification tools.</p>
<h3>Challenge 4: Coordinating two AI agents</h3>
<p>Creating two agents is relatively straightforward.</p>
<p>Ensuring that the second agent acts on the correct investigation state is harder.</p>
<p>The Investigator and Verifier needed a reliable way to exchange context and preserve what had happened.</p>
<p>Using FalkorDB as shared persistent state helped address that problem.</p>
<h3>Challenge 5: Handling Gemini API limits</h3>
<p>During development, Gemini requests sometimes encountered rate limits or quota exhaustion.</p>
<p>This reinforced the importance of keeping a deterministic, non-LLM investigation workflow available.</p>
<p>When the model is unavailable, the system can still demonstrate graph retrieval, authorized verification, and persistent evidence.</p>
<h3>Challenge 6: Distinguishing seeded examples from live observations</h3>
<p>A reproducible hackathon demo benefits from predefined examples, but those examples should not be mistaken for real-world discoveries.</p>
<p>I therefore distinguish synthetic seeded findings from local scanner observations and recorded regression results.</p>
<p>Improving generalized, observation-driven finding creation is an important next step.</p>
<h2>19. What Makes TraceShield AI Different?</h2>
<p>TraceShield AI is not intended to compete with mature vulnerability scanners on the number of issues it can discover.</p>
<p>Its focus is the investigation workflow that follows a security finding.</p>
<p>The project brings together several capabilities:</p>
<p><strong>Connected impact analysis:</strong> A finding can be traced to the endpoints, services, databases, and sensitive assets it potentially affects.</p>
<p><strong>Graph-informed action selection:</strong> Application context informs which authorized verification action is appropriate.</p>
<p><strong>Actual security observations:</strong> Local HTTP tests produce results that can be inspected independently of an AI-generated explanation.</p>
<p><strong>Controlled autonomy:</strong> Verification is restricted by explicit safety boundaries.</p>
<p><strong>Multi-agent coordination:</strong> Investigator and Verifier roles collaborate through graph-backed state.</p>
<p><strong>Persistent audit history:</strong> Evidence and test results remain available for later inspection.</p>
<p>The goal is not simply to generate a more detailed security report.</p>
<p>It is to move toward a system where security investigation is <strong>connected, explainable, actionable, and auditable</strong>.</p>
<h2>20. Limitations and What I Want to Build Next</h2>
<p>TraceShield AI is a working prototype, but it is not a finished production security platform.</p>
<p>Its current limitations include:</p>
<ul>
<li><p>A small, synthetic application environment.</p>
</li>
<li><p>Seeded finding scenarios and predefined identifiers in parts of the ingestion workflow.</p>
</li>
<li><p>Localhost-only approved verification actions.</p>
</li>
<li><p>Limited regression-test coverage.</p>
</li>
<li><p>Dependence on Gemini availability for LLM-powered workflows.</p>
</li>
<li><p>No unrestricted vulnerability discovery or production remediation.</p>
</li>
<li><p>No claim that a passing regression proves the entire application is secure.</p>
</li>
</ul>
<p>These limitations also provide a roadmap.</p>
<h3>Dynamic finding creation</h3>
<p>I want scanners to create findings directly from newly observed issues, using stable issue fingerprints and fresh evidence records.</p>
<p>Repeated observations should update the existing finding rather than creating unnecessary duplicates.</p>
<h3>More security-checking adapters</h3>
<p>The ingestion architecture could be extended to additional authorized scanners and structured security results.</p>
<h3>Better graph explainability</h3>
<p>A future version could present the exact graph traversal and evidence chain used to support each investigation recommendation.</p>
<h3>Stronger multi-agent evaluation</h3>
<p>I also want to measure how different agent roles perform, how reliably they select tools, and how often their conclusions match the recorded verification evidence.</p>
<h3>Human approval for sensitive operations</h3>
<p>For higher-impact actions, human review should become a formal part of the workflow.</p>
<h3>Production hardening</h3>
<p>Authentication, access control, secrets management, persistent infrastructure, and broader testing would be required before considering deployment beyond a local research environment.</p>
<p>These improvements would expand TraceShield from a reproducible prototype into a more flexible security investigation platform.</p>
<h2>21. What I Learned</h2>
<p>Building TraceShield AI changed how I think about AI agents.</p>
<p>Before this project, I mostly thought of an agent as a language model that could call tools.</p>
<p>But adding FalkorDB introduced a different perspective.</p>
<p>An agent becomes more useful when it can retrieve the relationships relevant to a decision, operate within clear boundaries, and leave behind evidence that another agent or developer can inspect.</p>
<p>I also learned that <strong>autonomy and trust are not the same thing</strong>.</p>
<p>A system should not be considered reliable simply because it can execute an action without human intervention.</p>
<p>It should be able to explain what context informed the action, why that action was permitted, and what the actual result was.</p>
<p>In TraceShield, FalkorDB helps provide that connected context and persistent history.</p>
<p>The local verification tools provide observable outcomes.</p>
<p>Gemini and LangGraph help coordinate and explain the investigation process.</p>
<p>Each component has a responsibility, and no single component needs to be trusted to do everything.</p>
<h2>Conclusion: From Security Alerts to Evidence-Backed Investigations</h2>
<p>TraceShield AI began with a simple question:</p>
<p><strong>Can we make security findings more useful by connecting them to application context and allowing agents to verify them safely?</strong></p>
<p>The resulting prototype demonstrates that approach through a FalkorDB security knowledge graph, local security scanners, deterministic autonomous investigations, Gemini-powered agents, and persistent verification history.</p>
<p>The most important outcome isn't that an AI agent can describe a security vulnerability.</p>
<p>It's that the system can connect a finding to meaningful application dependencies, select an authorized verification workflow, observe the resulting HTTP behavior, and preserve that evidence for future review.</p>
<p>For me, that is the direction in which useful security AI should evolve.</p>
<p><strong>Not just detecting. Not just explaining. But connecting, investigating, verifying, and remembering.</strong></p>
<p>That's <strong>TraceShield AI</strong>.</p>
<hr />
<h3>Project Links</h3>
<p><strong>GitHub Repository:</strong> <a href="https://github.com/subhasish52/TraceShield-AI">https://github.com/subhasish52/TraceShield-AI</a></p>
<p><strong>Built for:</strong> WeMakeDevs × FalkorDB Graph Hacks 2026</p>
<p><strong>Primary Track:</strong> Agents That Act on Connected Data</p>
<p><strong>Additional Track:</strong> Agent Memory and Coordination</p>
<p><strong>Technologies:</strong> FalkorDB, Python, Google Gemini, LangChain, LangGraph, Streamlit, Docker</p>
<p><em>AI assistance was used during development, debugging, and documentation. Security observations in this project are based on synthetic scenarios and reproducible local tests.</em></p>
<p><strong>#FalkorDB #GraphHacks #AI #AIAgents #CyberSecurity #LangGraph #Gemini #Python #BuildInPublic</strong></p>
]]></content:encoded></item></channel></rss>