Verdict-as-a-Service (VaaS) is a service that provides a platform for scanning files for malware and other threats. It allows easy integration in your application. With a few lines of code, you can start scanning files for malware.
ATTENTION: All SDKs are currently prototypes and under heavy construction!
Integration of Malware Detection
Easily integrate malware detection into any kind of application, service or platform.
Create a command line scanner to find malware with a few lines of code: Example
SDKs
At the moment SDKs for Rust, Java, Typescript, Microsoft .NET, Python and PHP are available.
Functionality | Rust | Java | PHP | TypeScript | .NET | Python |
---|---|---|---|---|---|---|
Check SHA256 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Check SHA256 list | ✅ | ✅ | ❌ | ✅ | ✅ | ❌ |
Check file | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Check file list | ✅ | ✅ | ❌ | ✅ | ✅ | ❌ |
Custom Guids for tracability on user side | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
Verdict-as-a-Service Rust SDK
Scan files for malware and other threats using the VaaS API in Rust.
Integration Test: Real API
Currently all test under the /tests folder are integration tests against the real API. As they need credentials, (user, token) these need to be provided as environment variables.
Either export a VAAS_USER
and VAAS_TOKEN
environment variable or use the .env
file. To use an .env
file, just create it in the root directory (e.g. where the Cargo.toml
resides) and add the variables with their values, e.g. KEY=VALUE
.
The .env
file will not be checked in into git and can be used to store the sensitive environment variables on your local machine.
Verdict-as-a-Service Java SDK
Scan files for malware and other threats using the VaaS API in Java.
Usage
Get a verdict for a SHA256 of a file.
public class MainClass {
public static void main(String[] args) {
// Connect to the VaaS endpoint
var config = new WsConfig(
clientId,
clientSecret,
new URI(tokenUrl),
new URI(vaasUrl));
var vaas = new Vaas(config);
vaas.connect();
// Get a verdict for a SHA256
var sha256 = new Sha256(“000005c43196142f01d615a67b7da8a53cb0172f8e9317a2ec9a0a39a1da6fe8”);
var cts = new CancellationTokenSource(Duration.ofSeconds(10));
var verdict = vaas.forSha256(sha256, cts);
// Disconnect from the VaaS endpoint
vaas.disconnect();
// Print verdict result (CLEAN, UNKNOWN, MALICIOUS, PUP)
System.out.println(“Verdict: ” + verdict.getVerdict().name());
}
}
Get a verdict for a file.
public class MainClass {
public static void main(String[] args) {
// Connect to the VaaS endpoint
var config = new WsConfig(token);
var vaas = new Vaas(config);
vaas.connect();
// Get a verdict for a SHA256
var file = Path.of(“myfile”);
var cts = new CancellationTokenSource(Duration.ofSeconds(10));
var verdict = vaas.forFile(file, cts);
// Disconnect from the VaaS endpoint
vaas.disconnect();
// Print verdict result (CLEAN, UNKNOWN, MALICIOUS, PUP)
System.out.println(“Verdict: ” + verdict.getVerdict().name());
}
}
Integration Test: Real API
Currently, all test under the /src/test folder are integration tests against the real API. As they need credentials, (token). These values need to be provided as environment variables.
Either export a VAAS_TOKEN environment variable or use the .env file. To use an .env file, just create it in the root directory (e.g. where the Readme.md resides) and add the variables with their values, e.g. KEY=VALUE.
The .env file will not be checked in into git and can be used to store the sensitive environment variables on your local machine.
Verdict-as-a-Service PHP SDK
PHP SDK for Verdict-as-a-Service API. Scan files for malware and other threats using the VaaS API in PHP.
For usage examples see the tests folder or the WordPress example in the examples folder.
gdata-vaas
An SDK to easily utilize G DATA VaaS.
Verdict-as-a-Service (VaaS) is a service that provides a platform for scanning files for malware and other threats. It allows easy integration in your application. With a few lines of code, you can start scanning files for malware.
What does the SDK do?
It gives you as a developer a functions to talk to G DATA VaaS. It wraps away the complexity of the API into 4 basic functions.
forSha256
If you calculate the sha256 for a file, you can request that sha256 against G DATA VaaS. It’s the fastest way to get a verdict from our service.
forSha256List
You can also request multiple sha256 with a single function call.
forFile
You can also ask for a file itself. You will still get the benefit of a fast verdict via Sha256 because the SDK will do that for you first. But additionally, if we don’t know the file, the file will get uploaded and (automatically) analyzed by us.
forFileList
You can also request multiple files with a single function call.
How to use
Install
npm install gdata-vaas
Import
import Vaas from “gdata-vaas”;
Developing with Visual Studio Code
Required extensions:
- esbenp.prettier-vscode
Extend settings.json with:
{
“editor.formatOnSave”: true,
“[javascript]”: {
“editor.defaultFormatter”: “esbenp.prettier-vscode”
},
“[typescript]”: {
“editor.defaultFormatter”: “esbenp.prettier-vscode”
}
}