Initial commit: Compliance Scanner Agent

Autonomous security and compliance scanning agent for git repositories.
Features: SAST (Semgrep), SBOM (Syft), CVE monitoring (OSV.dev/NVD),
GDPR/OAuth pattern detection, LLM triage, issue creation (GitHub/GitLab/Jira),
PR reviews, and Dioxus fullstack dashboard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sharang Parnerkar
2026-03-02 13:30:17 +01:00
commit 0867e401bc
97 changed files with 11750 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
use crate::error::CoreError;
use crate::models::TrackerIssue;
#[allow(async_fn_in_trait)]
pub trait IssueTracker: Send + Sync {
fn name(&self) -> &str;
async fn create_issue(
&self,
owner: &str,
repo: &str,
title: &str,
body: &str,
labels: &[String],
) -> Result<TrackerIssue, CoreError>;
async fn update_issue_status(
&self,
owner: &str,
repo: &str,
external_id: &str,
status: &str,
) -> Result<(), CoreError>;
async fn add_comment(
&self,
owner: &str,
repo: &str,
external_id: &str,
body: &str,
) -> Result<(), CoreError>;
async fn create_pr_review(
&self,
owner: &str,
repo: &str,
pr_number: u64,
body: &str,
comments: Vec<ReviewComment>,
) -> Result<(), CoreError>;
async fn find_existing_issue(
&self,
owner: &str,
repo: &str,
fingerprint: &str,
) -> Result<Option<TrackerIssue>, CoreError>;
}
#[derive(Debug, Clone)]
pub struct ReviewComment {
pub path: String,
pub line: u32,
pub body: String,
}

View File

@@ -0,0 +1,5 @@
pub mod issue_tracker;
pub mod scanner;
pub use issue_tracker::IssueTracker;
pub use scanner::{ScanOutput, Scanner};

View File

@@ -0,0 +1,17 @@
use std::path::Path;
use crate::error::CoreError;
use crate::models::{Finding, SbomEntry, ScanType};
#[derive(Debug, Default)]
pub struct ScanOutput {
pub findings: Vec<Finding>,
pub sbom_entries: Vec<SbomEntry>,
}
#[allow(async_fn_in_trait)]
pub trait Scanner: Send + Sync {
fn name(&self) -> &str;
fn scan_type(&self) -> ScanType;
async fn scan(&self, repo_path: &Path, repo_id: &str) -> Result<ScanOutput, CoreError>;
}