Lyo.ContentThreatScan
1.0.0
dotnet add package Lyo.ContentThreatScan --version 1.0.0
NuGet\Install-Package Lyo.ContentThreatScan -Version 1.0.0
<PackageReference Include="Lyo.ContentThreatScan" Version="1.0.0" />
<PackageVersion Include="Lyo.ContentThreatScan" Version="1.0.0" />
<PackageReference Include="Lyo.ContentThreatScan" />
paket add Lyo.ContentThreatScan --version 1.0.0
#r "nuget: Lyo.ContentThreatScan, 1.0.0"
#:package Lyo.ContentThreatScan@1.0.0
#addin nuget:?package=Lyo.ContentThreatScan&version=1.0.0
#tool nuget:?package=Lyo.ContentThreatScan&version=1.0.0
Lyo.ContentThreatScan
Heuristic scanning and numeric disposition scoring for readable text payloads (scripts, markup, suspicious SQL-ish patterns).
Pieces
| Type | Role |
|---|---|
IContentThreatScanner / DefaultContentThreatScanner |
UTF-8–bounded sample rules and per-category scoring. Required ctor arg: ContentThreatHeuristicOptions. |
ContentThreatAssessment |
Aggregate result. Exposes HeuristicScore, ExternalScore, total Score, IntelConfirmedMalicious, and the IReadOnlyList<ContentThreatContribution> that produced them. |
ContentThreatAssessmentOptions |
Suspect/threat thresholds, disposition cap, ForceThreatOnConfirmedIntel, plus FailureBumpPoints / FailureContributionRuleId for provider-failure scoring. |
ContentThreatHeuristicOptions |
Eligibility (default text extensions / content-types, MIME-sniffing flags), MaxBytesToAnalyze, per-category score caps, binary-skip toggle. |
ContentThreatScanContext |
Per-call metadata passed into heuristic and reputation probes: filename, content-type, correlation id, optional caller fields. |
ContentThreatCategory |
Enum of rule families that produce hits (SqlInjection, Script, Reputation, AntiVirus, etc.). |
ContentThreatContribution |
One rule hit: category, weighted points, rule id, optional snippet. Build aggregate scores via ContentThreatAssessment.FromContributions. |
ContentThreatDisposition / ContentThreatDispositionMapper |
Maps a numeric score to Clean / Suspect / Threat bands using ContentThreatAssessmentOptions thresholds. |
ExternalReputationEnvelope |
Result returned by IContentThreatReputationPipeline: per-provider scores, intel-confirmed flag, failures. |
ContentThreatReputationRequest |
Input to reputation pipelines: 32-byte SHA-256 digest, optional LimitedSamplePrefix, file-type hint, ContentThreatScanContext. |
IContentThreatReputationPipeline |
Optional lookups (implementations live in Lyo.ContentThreatScan.Intel). |
ContentThreatAssessmentComposer |
Merges heuristic contributions with the external reputation envelope, applies thresholds, returns the final ContentThreatAssessment + disposition. |
Sampling and digests
ContentThreatBuffering exposes bounded async reads (ReadLimitedAsync) and ComputeSha256 for a stable 32-byte digest passed to reputation pipelines alongside an optional capped sample prefix (ContentThreatReputationRequest).
File storage bridge
The Lyo.FileStorage package includes ContentThreatMalwareScanner implementing IFileMalwareScanner by composing heuristics, optional reputation, thresholds, and FileScanThreatLevel.
Registration (typical DI)
Wire IContentThreatScanner as DefaultContentThreatScanner. For lookup-only reputation, register IContentThreatReputationPipeline: - NullContentThreatReputationPipeline.Instance — no outbound calls. For HTTP-backed reputation, prefer a typed / named HttpClient registered against DefaultContentThreatReputationPipeline plus ReputationPipelineOptions bound from configuration (timeouts, failure dispositions, API keys). Do not enable unsolicited request-body middleware in consuming apps unless policy explicitly calls for it.
Dependencies
Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).
Lyo.Common— (direct, lyo)Lyo.Exceptions— (direct, lyo)Lyo.Hashing— (direct, lyo)Microsoft.Bcl.AsyncInterfaces10.0.5— (direct, microsoft, netstandard2.0)Microsoft.Extensions.DependencyInjection.Abstractions10.0.5— (transitive, microsoft)Microsoft.Extensions.Logging.Abstractions10.0.5— (transitive, microsoft)System.IO.Hashing10.0.5— (transitive, microsoft, net10.0)System.Memory4.6.3— (transitive, microsoft, netstandard2.0)System.Text.Json10.0.5— (transitive, microsoft, netstandard2.0)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Lyo.Common (>= 1.0.0)
- Lyo.Exceptions (>= 1.0.0)
- Lyo.Hashing (>= 1.0.0)
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.5)
-
net10.0
- Lyo.Common (>= 1.0.0)
- Lyo.Exceptions (>= 1.0.0)
- Lyo.Hashing (>= 1.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Lyo.ContentThreatScan:
| Package | Downloads |
|---|---|
|
Lyo.FileStorage
File storage service interface and base implementation for file operations. |
|
|
Lyo.ContentThreatScan.Intel
External reputation lookups (Malware Bazaar, VirusTotal, ClamAV clamd INSTREAM). |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 67 | 8/16/2026 |