# chandanhegde15/agentic-security-system architecture

> Architecture diagram of the GitHub repository chandanhegde15/agentic-security-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chandanhegde15/agentic-security-system
- Repository: https://github.com/chandanhegde15/agentic-security-system

## Overview

This package analyzes a project’s declared dependencies and produces risk findings, remediation recommendations, and an isolated verification outcome. The principal workflow is coordinated by the pipeline: extract declarations, check package registries, score risk, recommend actions, then validate replacement candidates in a temporary Git worktree. Parser and scoring internals are shown where source supports them; the README is empty, so broader product capabilities are not documented. Some integrations are injectable, and unsampled implementation details are represented only where the source index establishes a relationship.

Main entry points: [`agents/pipeline/agent.py`](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/pipeline/agent.py) (Analysis pipeline), [`agents/registry_verification/verifier.py`](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/registry_verification/verifier.py) (Registry verifier), [`agents/recommendation/agent.py`](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/recommendation/agent.py) (Recommendation agent), [`agents/risk_analysis/analyzer.py`](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/risk_analysis/analyzer.py) (Risk analyzer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Workflow orchestration"]
  node_pipeline["Analysis pipeline<br/>[agent.py]"]
  node_pipeline_result["Pipeline result<br/>[models.py]"]
end

subgraph group_extraction["Dependency extraction"]
  node_extract_agent["Extraction agent<br/>[agent.py]"]
  node_scanner["Manifest scanner<br/>[scanner.py]"]
  node_package_parser["package.json parser"]
  node_requirements_parser["Requirements parser"]
  node_dependency_models["Dependency records<br/>[models.py]"]
end

subgraph group_registry["Registry verification"]
  node_registry_agent["Registry verifier<br/>[verifier.py]"]
  node_verification_models["Verification records<br/>[models.py]"]
  node_pypi_client["PyPI client<br/>[pypi_client.py]"]
  node_npm_client["npm client<br/>[npm_client.py]"]
end

subgraph group_analysis["Risk and recommendations"]
  node_risk_analyzer["Risk analyzer<br/>[analyzer.py]"]
  node_risk_models["Risk results<br/>[models.py]"]
  node_similarity["Name similarity<br/>[similarity.py]"]
  node_recommendation_agent["Recommendation agent<br/>[agent.py]"]
  node_recommendation_models["Recommendation records<br/>[models.py]"]
  node_recommendation_validation["Evidence validation<br/>[validation.py]"]
  node_llm_provider["LLM provider interface<br/>[base.py]"]
  node_groq_provider["Groq provider<br/>[groq_provider.py]"]
end

subgraph group_remediation["Candidate verification"]
  node_candidate_verifier["Candidate verifier<br/>[agent.py]"]
  node_candidate_validation["Candidate input validation<br/>[validation.py]"]
  node_candidate_models["Verification outcome<br/>[models.py]"]
end

node_caller(("Project caller"))
node_pypi(("PyPI registry"))
node_npm(("npm registry"))

node_caller -->|"runs"| node_pipeline
node_pipeline -->|"extracts"| node_extract_agent
node_extract_agent -->|"scans"| node_scanner
node_scanner -->|"dispatches"| node_package_parser
node_scanner -->|"dispatches"| node_requirements_parser
node_package_parser -->|"creates"| node_dependency_models
node_requirements_parser -->|"creates"| node_dependency_models
node_pipeline -->|"verifies"| node_registry_agent
node_registry_agent -->|"reads"| node_dependency_models
node_registry_agent -->|"queries"| node_pypi_client
node_registry_agent -->|"queries"| node_npm_client
node_registry_agent -->|"builds"| node_verification_models
node_pypi_client -->|"requests metadata"| node_pypi
node_npm_client -->|"requests metadata"| node_npm
node_pipeline -->|"scores"| node_risk_analyzer
node_risk_analyzer -->|"analyzes"| node_verification_models
node_risk_analyzer -->|"compares names"| node_similarity
node_risk_analyzer -->|"produces"| node_risk_models
node_pipeline -->|"requests advice"| node_recommendation_agent
node_recommendation_agent -->|"validates output"| node_recommendation_validation
node_recommendation_agent -->|"uses"| node_recommendation_models
node_recommendation_agent -->|"uses interface"| node_llm_provider
node_groq_provider -->|"implements"| node_llm_provider
node_recommendation_agent -.->|"may inject"| node_groq_provider
node_pipeline -->|"checks candidates"| node_candidate_verifier
node_candidate_verifier -->|"validates inputs"| node_candidate_validation
node_candidate_verifier -->|"reads advice"| node_recommendation_models
node_candidate_verifier -->|"returns outcome"| node_candidate_models
node_pipeline -->|"assembles"| node_pipeline_result

click node_pipeline "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/pipeline/agent.py"
click node_pipeline_result "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/pipeline/models.py"
click node_extract_agent "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/dependency_extraction/agent.py"
click node_scanner "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/dependency_extraction/scanner.py"
click node_package_parser "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/dependency_extraction/parsers/package_json_parser.py"
click node_requirements_parser "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/dependency_extraction/parsers/requirements_parser.py"
click node_dependency_models "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/dependency_extraction/models.py"
click node_registry_agent "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/registry_verification/verifier.py"
click node_verification_models "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/registry_verification/models.py"
click node_pypi_client "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/registry_verification/registries/pypi_client.py"
click node_npm_client "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/registry_verification/registries/npm_client.py"
click node_risk_analyzer "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/risk_analysis/analyzer.py"
click node_risk_models "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/risk_analysis/models.py"
click node_similarity "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/risk_analysis/similarity.py"
click node_recommendation_agent "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/recommendation/agent.py"
click node_recommendation_models "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/recommendation/models.py"
click node_recommendation_validation "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/recommendation/validation.py"
click node_llm_provider "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/recommendation/llm/base.py"
click node_groq_provider "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/recommendation/llm/groq_provider.py"
click node_candidate_verifier "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/recommendation_verification/agent.py"
click node_candidate_validation "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/recommendation_verification/validation.py"
click node_candidate_models "https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/recommendation_verification/models.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_pipeline,node_pipeline_result toneBlue
class node_extract_agent,node_scanner,node_package_parser,node_requirements_parser,node_dependency_models toneAmber
class node_registry_agent,node_verification_models,node_pypi_client,node_npm_client toneMint
class node_risk_analyzer,node_risk_models,node_similarity,node_recommendation_agent,node_recommendation_models,node_recommendation_validation,node_llm_provider,node_groq_provider toneRose
class node_candidate_verifier,node_candidate_validation,node_candidate_models,node_caller,node_pypi,node_npm toneIndigo
```

## Components

### Workflow orchestration

- [Analysis pipeline](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/pipeline/agent.py): `agents/pipeline/agent.py`
- [Pipeline result](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/pipeline/models.py): `agents/pipeline/models.py`

### Dependency extraction

- [Extraction agent](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/dependency_extraction/agent.py): `agents/dependency_extraction/agent.py`
- [Manifest scanner](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/dependency_extraction/scanner.py): `agents/dependency_extraction/scanner.py`
- [package.json parser](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/dependency_extraction/parsers/package_json_parser.py): `agents/dependency_extraction/parsers/package_json_parser.py`
- [Requirements parser](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/dependency_extraction/parsers/requirements_parser.py): `agents/dependency_extraction/parsers/requirements_parser.py`
- [Dependency records](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/dependency_extraction/models.py): `agents/dependency_extraction/models.py`

### Registry verification

- [Registry verifier](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/registry_verification/verifier.py): `agents/registry_verification/verifier.py`
- [Verification records](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/registry_verification/models.py): `agents/registry_verification/models.py`
- [PyPI client](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/registry_verification/registries/pypi_client.py): `agents/registry_verification/registries/pypi_client.py`
- [npm client](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/registry_verification/registries/npm_client.py): `agents/registry_verification/registries/npm_client.py`

### Risk and recommendations

- [Risk analyzer](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/risk_analysis/analyzer.py): `agents/risk_analysis/analyzer.py`
- [Risk results](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/risk_analysis/models.py): `agents/risk_analysis/models.py`
- [Name similarity](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/risk_analysis/similarity.py): `agents/risk_analysis/similarity.py`
- [Recommendation agent](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/recommendation/agent.py): `agents/recommendation/agent.py`
- [Recommendation records](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/recommendation/models.py): `agents/recommendation/models.py`
- [Evidence validation](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/recommendation/validation.py): `agents/recommendation/validation.py`
- [LLM provider interface](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/recommendation/llm/base.py): `agents/recommendation/llm/base.py`
- [Groq provider](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/recommendation/llm/groq_provider.py): `agents/recommendation/llm/groq_provider.py`

### Candidate verification

- [Candidate verifier](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/recommendation_verification/agent.py): `agents/recommendation_verification/agent.py`
- [Candidate input validation](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/recommendation_verification/validation.py): `agents/recommendation_verification/validation.py`
- [Verification outcome](https://github.com/chandanhegde15/agentic-security-system/blob/main/agents/recommendation_verification/models.py): `agents/recommendation_verification/models.py`

### Other components

- **Project caller**
- **PyPI registry**
- **npm registry**

## Connections

- Project caller → Analysis pipeline: runs (evidence: `agents/pipeline/agent.py`)
- Analysis pipeline → Extraction agent: extracts (evidence: `agents/pipeline/agent.py`)
- Extraction agent → Manifest scanner: scans (evidence: `agents/dependency_extraction/agent.py`)
- Manifest scanner → package.json parser: dispatches (evidence: `agents/dependency_extraction/scanner.py`)
- Manifest scanner → Requirements parser: dispatches (evidence: `agents/dependency_extraction/scanner.py`)
- package.json parser → Dependency records: creates (evidence: `agents/dependency_extraction/parsers/package_json_parser.py`)
- Requirements parser → Dependency records: creates (evidence: `agents/dependency_extraction/parsers/requirements_parser.py`)
- Analysis pipeline → Registry verifier: verifies (evidence: `agents/pipeline/agent.py`)
- Registry verifier → Dependency records: reads (evidence: `agents/registry_verification/verifier.py`)
- Registry verifier → PyPI client: queries (evidence: `agents/registry_verification/verifier.py`)
- Registry verifier → npm client: queries (evidence: `agents/registry_verification/verifier.py`)
- Registry verifier → Verification records: builds (evidence: `agents/registry_verification/verifier.py`)
- PyPI client → PyPI registry: requests metadata (evidence: `agents/registry_verification/registries/pypi_client.py`)
- npm client → npm registry: requests metadata (evidence: `agents/registry_verification/registries/npm_client.py`)
- Analysis pipeline → Risk analyzer: scores (evidence: `agents/pipeline/agent.py`)
- Risk analyzer → Verification records: analyzes (evidence: `agents/risk_analysis/analyzer.py`)
- Risk analyzer → Name similarity: compares names (evidence: `agents/risk_analysis/analyzer.py`)
- Risk analyzer → Risk results: produces (evidence: `agents/risk_analysis/analyzer.py`)
- Analysis pipeline → Recommendation agent: requests advice (evidence: `agents/pipeline/agent.py`)
- Recommendation agent → Evidence validation: validates output (evidence: `agents/recommendation/agent.py`)
- Recommendation agent → Recommendation records: uses (evidence: `agents/recommendation/agent.py`)
- Recommendation agent → LLM provider interface: uses interface (evidence: `agents/recommendation/agent.py`)
- Groq provider → LLM provider interface: implements (evidence: `agents/recommendation/llm/groq_provider.py`)
- Recommendation agent → Groq provider: may inject
- Analysis pipeline → Candidate verifier: checks candidates (evidence: `agents/pipeline/agent.py`)
- Candidate verifier → Candidate input validation: validates inputs (evidence: `agents/recommendation_verification/agent.py`)
- Candidate verifier → Recommendation records: reads advice (evidence: `agents/recommendation_verification/agent.py`)
- Candidate verifier → Verification outcome: returns outcome (evidence: `agents/recommendation_verification/agent.py`)
- Analysis pipeline → Pipeline result: assembles (evidence: `agents/pipeline/agent.py`)
