PrimusSaaS.Security.AI 2.4.10

dotnet add package PrimusSaaS.Security.AI --version 2.4.10
                    
NuGet\Install-Package PrimusSaaS.Security.AI -Version 2.4.10
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PrimusSaaS.Security.AI" Version="2.4.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PrimusSaaS.Security.AI" Version="2.4.10" />
                    
Directory.Packages.props
<PackageReference Include="PrimusSaaS.Security.AI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PrimusSaaS.Security.AI --version 2.4.10
                    
#r "nuget: PrimusSaaS.Security.AI, 2.4.10"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PrimusSaaS.Security.AI@2.4.10
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PrimusSaaS.Security.AI&version=2.4.10
                    
Install as a Cake Addin
#tool nuget:?package=PrimusSaaS.Security.AI&version=2.4.10
                    
Install as a Cake Tool

PrimusSaaS.Security.AI

This package adds AI-powered remediation and deep security analysis capabilities to the PrimusSaaS framework. It leverages Microsoft.SemanticKernel to interact with Large Language Models (LLMs) like OpenAI, Azure OpenAI, or local models to suggest fixes for vulnerabilities.

Features

  • AI Remediation: Automatically suggests code fixes for detected vulnerabilities.
  • Model Agnostic: Works with any model supported by Semantic Kernel (OpenAI, Azure, HuggingFace, etc.).
  • Reliable Parsing: Uses JSON-structured outputs to ensure consistent and parseable responses from the LLM.
  • Safety Checks: Validates suggested fixes using the Roslyn compiler before offering them.

Installation

dotnet add package PrimusSaaS.Security.AI

Usage

You must configure a Kernel and inject it into the RemediationAgent.

using Microsoft.SemanticKernel;
using PrimusSaaS.Security.AI.Services;

var builder = WebApplication.CreateBuilder(args);

// 1. Configure Semantic Kernel
var kernelBuilder = Kernel.CreateBuilder();
kernelBuilder.AddOpenAIChatCompletion(
    modelId: "gpt-4",
    apiKey: "YOUR_OPENAI_API_KEY"
);
var kernel = kernelBuilder.Build();

// 2. Register the Kernel
builder.Services.AddSingleton(kernel);

// 3. Register the Remediation Agent
builder.Services.AddTransient<RemediationAgent>();

// Optional: Configure Options
builder.Services.AddTransient(sp => new RemediationOptions 
{
    Temperature = 0.2,
    RequireValidation = true
});

How it Works

  1. Analyze: The agent receives a vulnerability report (Diagnostic ID, code snippet).
  2. Prompt: It constructs a prompt asking the LLM to fix the specific issue and return a JSON object.
  3. Process: The LLM generates a fix and an explanation.
  4. Validate: The agent uses Roslyn to compile the suggested fix to ensure it is syntactically correct.
  5. Result: Returns a RemediationSuggestion object.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.4.10 94 4/19/2026
2.2.0 114 3/11/2026
2.0.1 109 1/26/2026
2.0.0 113 1/12/2026

v2.1.0 (March 2026): Synchronized with security suite v2.1.0. No breaking changes.