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>
56 lines
1.1 KiB
Rust
56 lines
1.1 KiB
Rust
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,
|
|
}
|