Class AiSecurityScanSteps

Namespace
Kuestenlogik.Bowire.Ai
Assembly
Kuestenlogik.Bowire.Ai.dll

Concrete ISecurityScanSteps for #104 — wires the orchestration engine to the real work: an Microsoft.Extensions.AI.IChatClient drives the threat-model

  • triage + report-summary stages, and an injected ISecurityScanProbeRunner executes the probe stage. Every AI stage degrades to a deterministic default when no model is connected or the model's output can't be parsed, so the pipeline always completes: threat-model → a path heuristic; triage → keep-by-default; report → the deterministic markdown without the AI summary.
public sealed class AiSecurityScanSteps : ISecurityScanSteps
Inheritance
AiSecurityScanSteps
Implements
Inherited Members

Constructors

AiSecurityScanSteps(IChatClient?, ISecurityScanProbeRunner?, string)

public AiSecurityScanSteps(IChatClient? client, ISecurityScanProbeRunner? probeRunner, string target)

Parameters

client IChatClient
probeRunner ISecurityScanProbeRunner
target string

Methods

ProbeAsync(RankedEndpoint, CancellationToken)

#60/#62 + execution — suggest and run probes against one endpoint, returning raw findings.

public Task<IReadOnlyList<OrchestratedFinding>> ProbeAsync(RankedEndpoint endpoint, CancellationToken ct)

Parameters

endpoint RankedEndpoint
ct CancellationToken

Returns

Task<IReadOnlyList<OrchestratedFinding>>

ReportAsync(OrchestratedScanResult, CancellationToken)

#107 — write the final report markdown from the kept findings. May return null.

public Task<string?> ReportAsync(OrchestratedScanResult interim, CancellationToken ct)

Parameters

interim OrchestratedScanResult
ct CancellationToken

Returns

Task<string>

ThreatModelAsync(IReadOnlyList<OrchestratorEndpoint>, CancellationToken)

#59 — rank the endpoints by attack-surface risk.

public Task<IReadOnlyList<RankedEndpoint>> ThreatModelAsync(IReadOnlyList<OrchestratorEndpoint> endpoints, CancellationToken ct)

Parameters

endpoints IReadOnlyList<OrchestratorEndpoint>
ct CancellationToken

Returns

Task<IReadOnlyList<RankedEndpoint>>

TriageAsync(OrchestratedFinding, CancellationToken)

#61 — score a finding real-vs-false-positive (0–100) with a one-line reason.

public Task<(int RealScore, string? Reasoning)> TriageAsync(OrchestratedFinding finding, CancellationToken ct)

Parameters

finding OrchestratedFinding
ct CancellationToken

Returns

Task<(int RealScore, string Reasoning)>