PrimusSaaS.Security
2.0.0
See the version list below for details.
dotnet add package PrimusSaaS.Security --version 2.0.0
NuGet\Install-Package PrimusSaaS.Security -Version 2.0.0
<PackageReference Include="PrimusSaaS.Security" Version="2.0.0" />
<PackageVersion Include="PrimusSaaS.Security" Version="2.0.0" />
<PackageReference Include="PrimusSaaS.Security" />
paket add PrimusSaaS.Security --version 2.0.0
#r "nuget: PrimusSaaS.Security, 2.0.0"
#:package PrimusSaaS.Security@2.0.0
#addin nuget:?package=PrimusSaaS.Security&version=2.0.0
#tool nuget:?package=PrimusSaaS.Security&version=2.0.0
PrimusSaaS.Security
Version: 1.0.0-preview.1
Status: 🚧 UNDER DEVELOPMENT - Milestone 1 Foundation Phase
Enterprise-grade security analysis module with absolute data isolation. All vulnerability scanning, dependency checking, and compliance validation happens 100% locally within your infrastructure.
🔒 Core Guarantee
Your code NEVER leaves your infrastructure. Period.
- ✅ Zero external API calls (compile-time blocked)
- ✅ No cloud dependencies (fully self-contained)
- ✅ Complete privacy (verifiable by network monitoring)
- ✅ Offline capable (works without internet)
🚀 Quick Start (5 minutes)
Installation
dotnet add package PrimusSaaS.Security --prerelease
Integration
// Program.cs
using PrimusSaaS.Security;
var builder = WebApplication.CreateBuilder(args);
// Add Primus Security (3 lines!)
builder.Services.AddPrimusSecurity(options =>
{
options.EnableStaticAnalysis = true;
options.EnableDependencyScanning = true;
options.ComplianceStandards = new[] { "OWASP", "PCI-DSS" };
});
var app = builder.Build();
// Verify data isolation on startup
var verification = PrimusSecurityExtensions.VerifyDataIsolation();
if (!verification.IsFullyIsolated)
{
throw new InvalidOperationException(
"Security module failed data isolation verification!"
);
}
app.Run();
Done! Your API now has security analysis running locally.
✨ Features
✅ Phase 1: Foundation (Completed)
- Project structure created
- Core models defined (SecurityFinding, ScanResult)
- Configuration options
- DI extensions
- Data isolation verification
- PDF Reporting (QuestPDF)
✅ Phase 2: Core Engine (Completed)
Static Code Analysis (Roslyn Analyzers)
- Base Analyzer Infrastructure
- Rule PS0001: SQL Injection (ADO.NET, EF Core, Dapper)
- Rule PS0002: XSS Detection (Html.Raw, innerHTML)
- Rule PS0003: Hardcoded Secret Constants (AWS, Stripe, etc.)
Secret Detection
- Regex-based detection (Standard patterns embedded)
- Entropy-based detection
- Zero-config/Out-of-the-box support
Dependency Scanning
- Local CVE database (SQLite) support
- NuGet package vulnerability lookup
- Semver range matching (Strict & Loose)
🗄️ CVE Database Maintenance
Because PrimusSaaS.Security is offline-first, it does not download vulnerability data at runtime. You must provide the cve.db file.
Generating the Database
- Clone the GitHub Advisory Database.
- Run the Primus Data Aggregator tool:
dotnet run --project tools/PrimusSaaS.Security.DataAggregator \ -- "path/to/advisory-database" \ -- "path/to/output/cve.db" - Distribute the resulting
cve.dbto your build agents or developers.
📊 Current Implementation Status
Overall Progress: ▰▰▰▰▰▰▰▰▰▱ 90% (Preview Release Ready)
Milestone 1: Foundation ▰▰▰▰▰▰▰▰▰▰ 100%
Milestone 2: Core Engine ▰▰▰▰▰▰▰▰▰▰ 100%
Milestone 3: Data Tools ▰▰▰▰▰▰▰▰▰▰ 100% (Aggregator Tool Ready)
Milestone 4: Test Coverage ▰▰▰▰▰▰▰▱▱▱ 70% (15 tests)
Current Limitations:
- Static Analysis (Roslyn Analyzers) runs at compile-time only — not via
ScanAsync() - CVE database (
cve.db) must be provided by the user (offline-first design)
Next Steps:
- Integration testing in your CI/CD pipeline.
- Regular updates of your
cve.dbsnapshot.
🎯 Example Use Case
Before Primus Security
// Manual security review required
// Consultant costs: $5,000
// Time: 3-5 days
// Frequency: Once per quarter
After Primus Security
// Automated continuous security scanning
builder.Services.AddPrimusSecurity(options =>
{
options.EnableStaticAnalysis = true; // Instant SQL injection, XSS detection
options.EnableSecretDetection = true; // Catch hardcoded API keys
options.CveDatabasePath = "/app/data/cve.db"; // Local DB path
options.OnScanComplete = async (result) =>
{
// Generate PDF Report
var reporter = new PdfSecurityReporter();
reporter.GenerateReport(result, $"scan-report-{DateTime.Now:yyyyMMdd}.pdf");
};
});
📞 Support & Feedback
- Issues: https://github.com/primus-saas/security/issues
- Email: security@primussaas.com
- Documentation: https://docs.primussaas.com/security
⚖️ License
MIT License - see LICENSE file for details
🔒 Remember: Your code NEVER leaves your infrastructure. We guarantee it.
| Product | Versions 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 was computed. 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 was computed. 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. |
-
net8.0
- Fluid.Core (>= 2.5.0)
- Microsoft.CodeAnalysis.CSharp (>= 4.8.0)
- Microsoft.CodeAnalysis.CSharp.Workspaces (>= 4.8.0)
- Microsoft.Data.Sqlite (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- NuGet.Versioning (>= 7.0.1)
- QuestPDF (>= 2023.12.5)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on PrimusSaaS.Security:
| Package | Downloads |
|---|---|
|
PrimusSaaS.Security.AI
AI-powered remediation agent for the PrimusSaaS Security scanner. Connects to Azure OpenAI and GitHub Models to generate fix explanations, threat narratives, and enhanced before/after code patches. Includes prompt injection detection to prevent adversarial inputs. |
|
|
PrimusSaaS.Security.Reporting
Security reporting, compliance mapping, and branded HTML/PDF report generation for the Primus Security Suite. Produces SARIF 2.1.0, OWASP Top 10 2021 JSON/Markdown/PDF, CWE/OWASP/PCI-DSS/GDPR compliance scores, and pixel-perfect corporate HTML reports matching the Primus design system. Includes HtmlFormatter, PdfFormatter, SarifFormatter, JsonFormatter, CsvFormatter, ComplianceMapper, and SecurityReportGenerator with full triage/patch-coverage data. |
|
|
PrimusSaaS.Security.Heuristics
Heuristic behavioral analyzer for detecting suspicious runtime patterns. |
GitHub repositories
This package is not used by any popular GitHub repositories.
v2.0.0:
- Standardized Framework Release.
- Renamed all packages to PrimusSaaS.* namespace.
- Synchronized versions across the entire suite.
- Enhanced metadata and fixed consistency issues.