Class IntakeSecurityScanner
java.lang.Object
ai.pipestream.connector.intake.security.IntakeSecurityScanner
Pre-acceptance security screening for uploads.
Today it enforces a configurable blocked-file-extension policy: an upload
whose filename or source path/URI ends in a blocked extension is rejected as
IntakeErrorCode.UNSUPPORTED_MEDIA_TYPE (proto
REJECTION_REASON_UNSUPPORTED_TYPE). The check is case-insensitive,
honors compound extensions (e.g. tar.gz), strips URI query/fragment,
and so catches double-extension tricks like report.pdf.exe.
It is deliberately structured as a generic scan: content-based
checks — e.g. malware/virus scanning or MIME sniffing — would be added as
additional steps inside evaluate(SecurityScanTarget) returning a
IntakeSecurityScanner.ScanVerdict, with no change to any call site. No content
scanning is performed yet.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOutcome of a security scan: allowed, or a client-safe rejection code + message. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidenforce(SecurityScanTarget target) Throwing form for the HTTP and unary gRPC paths: a rejection becomes a client-safeHttpIntakeException.evaluate(SecurityScanTarget target) Decision form for the streaming path, which surfaces rejections in-band.
-
Constructor Details
-
IntakeSecurityScanner
public IntakeSecurityScanner()
-
-
Method Details
-
enforce
Throwing form for the HTTP and unary gRPC paths: a rejection becomes a client-safeHttpIntakeException. -
evaluate
Decision form for the streaming path, which surfaces rejections in-band.
-