Scanner.proto
Scanner
The Scanner Service provides an API for detecting threats in files and data streams. It exposes the following two methods:
Method |
Description |
|---|---|
GetDefaultFileScanConfiguration |
Returns the default scan configuration used for file scanning. Accepts a GetDefaultFileScanConfigurationRequest and returns a GetDefaultFileScanConfigurationResponse. |
ScanFileDataStream |
Performs threat detection on a continuous stream of file data. Communication is handled via a bidirectional stream: the client sends file data in chunks, and the server responds with a mix of additional data requests and any threat findings detected so far. Accepts a stream of ScanFileDataStreamRequest messages and returns a stream of ScanFileDataStreamResponse messages. |
GetDefaultFileScanConfigurationResponse
This message is used to return the default configuration settings for file scanning. It contains no fields.
ScanFileDataStreamRequest
This message is used to return the default configuration settings for file scanning. It contains no fields.
Parameter |
Description |
|---|---|
configuration (FastScanSettings) |
Scan configuration settings. This field is required only in the first request of the stream. Including it in subsequent requests will result in a BAD REQUEST error. |
data_chunk (DataChunk) |
Represents a segment of the file data to be scanned. Each chunk starts at a specified position in the stream. |
file_details (TargetFileDetails) |
Descriptor of the target file. Like configuration, this field must only appear in the first request. Including it again will be treated as a BAD REQUEST. |
ScanFileDataStreamResponse
This message represents the server's response to a file data stream scan request. It provides scan results as well as instructions for retrieving additional data if needed. It contains the following fields:
Parameter |
Description |
|---|---|
data_request (DataRequest) |
Indicates a server-side request for additional data at a specific position in the stream. If the end of the stream is reached before the full requested size is read, the returned data chunk may be smaller than expected. |
scan_results (repeated ThreatScanResult) |
Represents the outcome of scanning the data stream, including a list of identified threats and associated stream metadata. |