SmartSecureAnalyzer 1.0.1
See the version list below for details.
dotnet add package SmartSecureAnalyzer --version 1.0.1
NuGet\Install-Package SmartSecureAnalyzer -Version 1.0.1
<PackageReference Include="SmartSecureAnalyzer" Version="1.0.1" />
<PackageVersion Include="SmartSecureAnalyzer" Version="1.0.1" />
<PackageReference Include="SmartSecureAnalyzer" />
paket add SmartSecureAnalyzer --version 1.0.1
#r "nuget: SmartSecureAnalyzer, 1.0.1"
#:package SmartSecureAnalyzer@1.0.1
#addin nuget:?package=SmartSecureAnalyzer&version=1.0.1
#tool nuget:?package=SmartSecureAnalyzer&version=1.0.1
π‘οΈ SmartSecureAnalyzer
SmartSecureAnalyzer is a powerful static code analysis tool built in C# (.NET) and PowerShell designed to detect insecure coding patterns, hardcoded credentials, and common security vulnerabilities in source code across multiple languages.
Itβs designed for DevSecOps pipelines, CI/CD integrations, and local developer validation β providing actionable insights before your code reaches production.
π Features
- π Detects common insecure patterns (e.g.,
eval(), weak hashing, hardcoded secrets, insecure file paths). - π§© Supports multi-language scanning (C#, JavaScript, Python, PHP, etc.).
- π§ Regex-based pattern scanning + Roslyn analysis for .NET projects.
- βοΈ Integration-friendly PowerShell script for CI/CD (Jenkins, GitHub Actions, Azure DevOps).
- π Generates summary reports with counts, severity, and recommendations.
- π§Ύ Optional build failure flag for critical vulnerabilities.
ποΈ Architecture Overview
SmartSecureAnalyzer/
β
βββ analyzer/
β βββ SmartSecureAnalyzer.csproj # Core analyzer library
β βββ Analyzers/
β β βββ HardcodedSecretAnalyzer.cs
β β βββ InsecureHashAnalyzer.cs
β β βββ UnsafeEvalAnalyzer.cs
β β βββ FilePermissionAnalyzer.cs
β βββ Reports/
β βββ SecurityReportGenerator.cs
β βββ ReportTemplates/
β
βββ scripts/
β βββ RunSmartSecureAnalyzer.ps1 # PowerShell runner for CI/CD
β
βββ SmartSecureAnalyzer.nuspec # NuGet metadata (optional)
βββ README.md
π‘ Installation
Option 1: Local Development
git clone https://github.com/your-org/SmartSecureAnalyzer.git
cd SmartSecureAnalyzer
dotnet build
Option 2: NuGet (when published)
dotnet add package SmartSecureAnalyzer
Option 3: PowerShell Script Execution
Set-ExecutionPolicy RemoteSigned -Scope Process
.\scripts\RunSmartSecureAnalyzer.ps1 -Path "D:\MyProject" -Output "D:\Reports"
βοΈ PowerShell Script Parameters
| Parameter | Description | Example |
|---|---|---|
-Path |
Path to source code to scan | -Path "D:\MyApp" |
-Output |
Directory where reports will be saved | -Output "D:\ScanReports" |
-Severity |
Minimum severity to include (Low, Medium, High) |
-Severity "Medium" |
-FailOnCritical |
Fails build if high-risk issues found | -FailOnCritical $true |
π Example Output
Console Output
[INFO] Scanning D:\MyApp ...
[WARN] Hardcoded password found in Config.cs:42
[CRITICAL] Insecure MD5 usage in HashHelper.cs:17
[INFO] Scan completed: 5 issues found (2 High, 2 Medium, 1 Low)
Generated Report (JSON & HTML)
{
"Summary": {
"FilesScanned": 120,
"IssuesFound": 5,
"Critical": 2,
"Medium": 2,
"Low": 1
},
"Findings": [
{
"Type": "Hardcoded Secret",
"File": "Config.cs",
"Line": 42,
"Severity": "High",
"Recommendation": "Use environment variables or secure vaults."
}
]
}
π OWASP A1βA10 Detection (Next Release)
SmartSecureAnalyzer roadmap includes detecting vulnerabilities based on the OWASP Top 10:
| OWASP Category | Planned Detection |
|---|---|
| A1: Injection | SQL, LDAP, Command, and NoSQL injection patterns |
| A2: Broken Authentication | Hardcoded tokens, weak password logic |
| A3: Sensitive Data Exposure | Plaintext secrets, insecure file writes |
| A4: Insecure Design | Dangerous API calls, missing input validation |
| A5: Security Misconfiguration | Debug mode, open CORS, missing HTTPS |
| A6: Vulnerable Components | Dependency version checks |
| A7: Identification and Auth Failures | Insecure session handling |
| A8: Software Integrity Failures | Tampering indicators |
| A9: Logging/Monitoring Failures | Missing audit logs |
| A10: SSRF | External URL fetches without validation |
π§© Planned Enhancements
β
Detect OWASP A1βA10 patterns β SQL Injection, hardcoded secrets, insecure deserialization, etc.
β
Integrate SonarQube or Semgrep CLI inside build hooks for hybrid scanning.
β
Add Roslyn Code Fix Providers β automatically suggest secure alternatives in Visual Studio.
β
Generate Security Reports at Build Time in HTML, CSV, and JSON formats.
β
Git Pre-Commit Hook Support β prevent insecure commits.
β
Central Dashboard β visualize vulnerabilities across projects.
π§° Example: Integrating in Jenkins
stage('Security Scan') {
steps {
powershell '''
Set-ExecutionPolicy RemoteSigned -Scope Process
.\scripts\RunSmartSecureAnalyzer.ps1 -Path "D:\MyProject" -Output "D:\Reports" -FailOnCritical $true
'''
}
}
π¦ Output Reports
| Format | Description |
|---|---|
.json |
Machine-readable summary for CI/CD |
.html |
Developer-friendly report with highlights |
.csv |
Export for Excel or audit |
.pdf |
Optional detailed vulnerability report |
π§βπ» Contributing
- Fork this repository
- Create your feature branch (
git checkout -b feature/owasp-scan) - Commit your changes (
git commit -m 'Add OWASP pattern detection') - Push to the branch (
git push origin feature/owasp-scan) - Open a Pull Request π
π§Ύ License
This project is licensed under the MIT License β feel free to use and modify.
π§ Contact
Author: Rejith Kumar
Email: your.email@example.com
NuGet ID: SmartSecureAnalyzer
Website: https://hashtagtrnd.com
π¬ SmartSecureAnalyzer β because secure code is smart code.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 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. |
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.