feat: strengthen P0 security and operations

This commit is contained in:
2026-08-01 11:20:02 +08:00
parent f776056834
commit 84c2b0b21d
77 changed files with 24185 additions and 355 deletions

View File

@@ -0,0 +1,30 @@
namespace Tiku.Application.Assets;
public enum AssetSecurityScanVerdict
{
Clean,
Infected
}
public sealed record AssetSecurityScanResult(
AssetSecurityScanVerdict Verdict,
string Provider,
string? Signature,
long BytesScanned,
string RawResponse);
public interface IAssetSecurityScanner
{
Task<AssetSecurityScanResult> ScanAsync(
Stream content,
long? declaredLength,
CancellationToken cancellationToken = default);
Task<bool> CheckHealthAsync(CancellationToken cancellationToken = default);
}
public sealed class AssetSecurityScannerException(string code, string message, Exception? innerException = null)
: Exception(message, innerException)
{
public string Code { get; } = code;
}