vaas 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.devcontainer/Dockerfile +26 -0
- data/.devcontainer/devcontainer.json +26 -0
- data/.vscode/launch.json +21 -0
- data/Gemfile +3 -0
- data/README.md +97 -0
- data/examples/example_with_lists.rb +37 -0
- data/examples/example_with_reconnect.rb +42 -0
- data/examples/simple_example.rb +36 -0
- data/lib/vaas/client_credentials_grant_authenticator.rb +33 -0
- data/lib/vaas/vaas_errors.rb +31 -0
- data/lib/vaas/vaas_main.rb +139 -0
- data/lib/vaas/vaas_verdict.rb +13 -0
- data/lib/vaas/version.rb +3 -0
- data/lib/vaas.rb +1 -0
- data/vaas.gemspec +23 -0
- metadata +128 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d825f4cbd3edbbdf6d391ad3dcc1257b30c3df7c9a2e53f1caae99bc57036bf3
|
4
|
+
data.tar.gz: 29ef4d52405ef1381b63a9f68e014446f9fadc58bc16bd810bbea2f75066ccc6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fed95ea1cf2622afabbd5d85b9fa884e02a8a4b009f8f04711d70c7a23248fb7598b433341e8f7f997ddecdbdecdbf4802c17eb88bfac27728843e443702a0bd
|
7
|
+
data.tar.gz: 9a796c1a3c49e384db42d727370caca6fcd8b72f16b5f64fe667fa409f2833695d622949e8c816ce1731e50812116379d14c7c542c29d4be890108eb9ab6b805
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# [Choice] Ruby version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.1, 3.0, 2, 2.7, 2.6, 3-bullseye, 3.1-bullseye, 3.0-bullseye, 2-bullseye, 2.7-bullseye, 2.6-bullseye, 3-buster, 3.1-buster, 3.0-buster, 2-buster, 2.7-buster, 2.6-buster
|
2
|
+
ARG VARIANT=3
|
3
|
+
FROM mcr.microsoft.com/devcontainers/ruby:${VARIANT}
|
4
|
+
|
5
|
+
# Install Rails
|
6
|
+
RUN gem install rails webdrivers
|
7
|
+
|
8
|
+
# Default value to allow debug server to serve content over GitHub Codespace's port forwarding service
|
9
|
+
# The value is a comma-separated list of allowed domains
|
10
|
+
ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev,.app.github.dev"
|
11
|
+
|
12
|
+
# [Choice] Node.js version: lts/*, 16, 14, 12, 10
|
13
|
+
ARG NODE_VERSION="lts/*"
|
14
|
+
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"
|
15
|
+
|
16
|
+
ENV BUNDLE_PATH="~/.gems"
|
17
|
+
|
18
|
+
# [Optional] Uncomment this section to install additional OS packages.
|
19
|
+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
20
|
+
# && apt-get -y install --no-install-recommends <your-package-list-here>
|
21
|
+
|
22
|
+
# [Optional] Uncomment this line to install additional gems.
|
23
|
+
# RUN gem install <your-gem-names-here>
|
24
|
+
|
25
|
+
# [Optional] Uncomment this line to install global node packages.
|
26
|
+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
|
@@ -0,0 +1,26 @@
|
|
1
|
+
{
|
2
|
+
"name": "Ruby on Rails (Community)",
|
3
|
+
"build": {
|
4
|
+
"dockerfile": "Dockerfile"
|
5
|
+
},
|
6
|
+
|
7
|
+
// Configure tool-specific properties.
|
8
|
+
"customizations": {
|
9
|
+
// Configure properties specific to VS Code.
|
10
|
+
"vscode": {
|
11
|
+
// Add the IDs of extensions you want installed when the container is created.
|
12
|
+
"extensions": [
|
13
|
+
"rebornix.Ruby"
|
14
|
+
]
|
15
|
+
}
|
16
|
+
},
|
17
|
+
|
18
|
+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
19
|
+
// "forwardPorts": [],
|
20
|
+
|
21
|
+
// Use 'postCreateCommand' to run commands after the container is created.
|
22
|
+
// "postCreateCommand": "ruby --version",
|
23
|
+
|
24
|
+
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
25
|
+
"remoteUser": "vscode"
|
26
|
+
}
|
data/.vscode/launch.json
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
{
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
3
|
+
// Hover to view descriptions of existing attributes.
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
5
|
+
"version": "0.2.0",
|
6
|
+
"configurations": [
|
7
|
+
{
|
8
|
+
"name": "Rails App",
|
9
|
+
"type": "Ruby",
|
10
|
+
"request": "launch",
|
11
|
+
// Current dir using env variable input in tasks.json
|
12
|
+
"cwd": "${workspaceRoot}/test-project",
|
13
|
+
// run bundle install before rails server
|
14
|
+
"preLaunchTask": "Create test-project",
|
15
|
+
"program": "bin/rails",
|
16
|
+
"postDebugTask": "Delete test-project",
|
17
|
+
// Setup debug binding IP and port.
|
18
|
+
"args": ["s", "-b", "0.0.0.0", "-p", "3000"],
|
19
|
+
}
|
20
|
+
]
|
21
|
+
}
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,97 @@
|
|
1
|
+
# vaas
|
2
|
+
|
3
|
+
An SDK to easily utilize G DATA VaaS.
|
4
|
+
|
5
|
+
_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.
|
6
|
+
|
7
|
+
## What does the SDK do?
|
8
|
+
|
9
|
+
It gives you as a developer a functions to talk to G DATA VaaS. It wraps away the complexity of the API into 3 basic functions.
|
10
|
+
|
11
|
+
### for_sha256
|
12
|
+
|
13
|
+
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.
|
14
|
+
|
15
|
+
### for_url
|
16
|
+
|
17
|
+
If you want to request if a file behind a URL is safe, you can specify the URL as well. Depending on the file size, the duration for the analysis can vary.
|
18
|
+
|
19
|
+
### for_file
|
20
|
+
|
21
|
+
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.
|
22
|
+
|
23
|
+
## How to use
|
24
|
+
|
25
|
+
### Installation
|
26
|
+
|
27
|
+
This gem works only on a Linux distribution!
|
28
|
+
```bash
|
29
|
+
gem install vaas
|
30
|
+
```
|
31
|
+
|
32
|
+
### Require
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
require 'async'
|
36
|
+
require 'vaas/client_credentials_grant_authenticator'
|
37
|
+
require 'vaas/vaas_main'
|
38
|
+
```
|
39
|
+
|
40
|
+
### Request a verdict
|
41
|
+
|
42
|
+
Authentication & Initializing:
|
43
|
+
```ruby
|
44
|
+
authenticator = VAAS::ClientCredentialsGrantAuthenticator.new(
|
45
|
+
CLIENT_ID,
|
46
|
+
CLIENT_SECRET,
|
47
|
+
TOKEN_URL,
|
48
|
+
SSL_VERIFICATION
|
49
|
+
)
|
50
|
+
vaas = VAAS::VaasMain.new
|
51
|
+
token = authenticator.get_token
|
52
|
+
```
|
53
|
+
|
54
|
+
Verdict Request for SHA256:
|
55
|
+
```ruby
|
56
|
+
Async do
|
57
|
+
Async { vaas.connect(token) }.wait
|
58
|
+
sha256 = "275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f"
|
59
|
+
verdict = vaas.for_sha256(sha256)
|
60
|
+
ensure
|
61
|
+
vaas.close
|
62
|
+
end
|
63
|
+
```
|
64
|
+
|
65
|
+
Verdict Request for a file:
|
66
|
+
```ruby
|
67
|
+
Async do
|
68
|
+
Async { vaas.connect(token) }.wait
|
69
|
+
path = "/path/to/file"
|
70
|
+
verdict = vaas.for_file(path)
|
71
|
+
ensure
|
72
|
+
vaas.close
|
73
|
+
end
|
74
|
+
```
|
75
|
+
|
76
|
+
Verdict Request for a URL:
|
77
|
+
```ruby
|
78
|
+
Async do
|
79
|
+
Async { vaas.connect(token) }.wait
|
80
|
+
url = "https://www.gdatasoftware.com/oem/verdict-as-a-service"
|
81
|
+
verdict = vaas.for_url(url)
|
82
|
+
ensure
|
83
|
+
vaas.close
|
84
|
+
end
|
85
|
+
```
|
86
|
+
|
87
|
+
Verdict Object:
|
88
|
+
```ruby
|
89
|
+
# A verdict object has a sha256, verdict and guid
|
90
|
+
sha256 = verdict.sha256
|
91
|
+
detection = verdict.verdict
|
92
|
+
guid = verdict.guid
|
93
|
+
```
|
94
|
+
|
95
|
+
## <a name="interested"></a>I'm interested in VaaS
|
96
|
+
|
97
|
+
You need credentials to use the service in your application. If you are interested in using VaaS, please [contact us](mailto:oem@gdata.de).
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'async'
|
2
|
+
require 'vaas/client_credentials_grant_authenticator'
|
3
|
+
require 'vaas/vaas_main'
|
4
|
+
|
5
|
+
CLIENT_ID = ENV.fetch('CLIENT_ID')
|
6
|
+
CLIENT_SECRET = ENV.fetch('CLIENT_SECRET')
|
7
|
+
PATHS = ENV.fetch('PATHS')
|
8
|
+
|
9
|
+
def main
|
10
|
+
authenticator = VAAS::ClientCredentialsGrantAuthenticator.new(
|
11
|
+
CLIENT_ID,
|
12
|
+
CLIENT_SECRET,
|
13
|
+
"https://keycloak-vaas.gdatasecurity.de/realms/vaas/protocol/openid-connect/token"
|
14
|
+
)
|
15
|
+
|
16
|
+
# create a vaas object and get a token to authenticate
|
17
|
+
vaas = VAAS::VaasMain.new
|
18
|
+
token = authenticator.get_token
|
19
|
+
|
20
|
+
Async do
|
21
|
+
# wait to connect and authenticate
|
22
|
+
Async { vaas.connect(token) }.wait
|
23
|
+
|
24
|
+
# simple loop to get the verdict of a list of files
|
25
|
+
PATHS.each do |file|
|
26
|
+
verdict = vaas.for_file(file)
|
27
|
+
puts "Verdict #{verdict.sha256} is detected as #{verdict.verdict}"
|
28
|
+
end
|
29
|
+
|
30
|
+
ensure
|
31
|
+
vaas.close
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
if __FILE__ == $0
|
36
|
+
main
|
37
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'async'
|
2
|
+
require 'vaas/client_credentials_grant_authenticator'
|
3
|
+
require 'vaas/vaas_main'
|
4
|
+
|
5
|
+
CLIENT_ID = ENV.fetch('CLIENT_ID')
|
6
|
+
CLIENT_SECRET = ENV.fetch('CLIENT_SECRET')
|
7
|
+
PATH = ENV.fetch('PATH')
|
8
|
+
|
9
|
+
def main
|
10
|
+
authenticator = VAAS::ClientCredentialsGrantAuthenticator.new(
|
11
|
+
CLIENT_ID,
|
12
|
+
CLIENT_SECRET,
|
13
|
+
"https://keycloak-vaas.gdatasecurity.de/realms/vaas/protocol/openid-connect/token"
|
14
|
+
)
|
15
|
+
|
16
|
+
# create a vaas object and get a token to authenticate
|
17
|
+
vaas = VAAS::VaasMain.new
|
18
|
+
token = authenticator.get_token
|
19
|
+
|
20
|
+
Async do
|
21
|
+
# wait to connect and authenticate
|
22
|
+
Async { vaas.connect(token) }.wait
|
23
|
+
|
24
|
+
# reconnect if connection closed
|
25
|
+
begin
|
26
|
+
verdict = vaas.for_file(PATH)
|
27
|
+
rescue VAAS::VaasConnectionClosedError
|
28
|
+
token = authenticator.get_token
|
29
|
+
Async { vaas.connect(token) }.wait
|
30
|
+
retry
|
31
|
+
end
|
32
|
+
|
33
|
+
puts "Verdict #{verdict.sha256} is detected as #{verdict.verdict}"
|
34
|
+
|
35
|
+
ensure
|
36
|
+
vaas.close
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
if __FILE__ == $0
|
41
|
+
main
|
42
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'async'
|
2
|
+
require 'vaas/client_credentials_grant_authenticator'
|
3
|
+
require 'vaas/vaas_main'
|
4
|
+
|
5
|
+
CLIENT_ID = ENV.fetch('CLIENT_ID')
|
6
|
+
CLIENT_SECRET = ENV.fetch('CLIENT_SECRET')
|
7
|
+
PATH = ENV.fetch('PATH')
|
8
|
+
|
9
|
+
def main
|
10
|
+
authenticator = VAAS::ClientCredentialsGrantAuthenticator.new(
|
11
|
+
CLIENT_ID,
|
12
|
+
CLIENT_SECRET,
|
13
|
+
"https://keycloak-vaas.gdatasecurity.de/realms/vaas/protocol/openid-connect/token"
|
14
|
+
)
|
15
|
+
|
16
|
+
# create a vaas object and get a token to authenticate
|
17
|
+
vaas = VAAS::VaasMain.new
|
18
|
+
token = authenticator.get_token
|
19
|
+
|
20
|
+
Async do
|
21
|
+
# wait to connect and authenticate
|
22
|
+
Async { vaas.connect(token) }.wait
|
23
|
+
|
24
|
+
# simple method to get the verdict of a file
|
25
|
+
verdict = vaas.for_file(PATH)
|
26
|
+
|
27
|
+
puts "Verdict #{verdict.sha256} is detected as #{verdict.verdict}"
|
28
|
+
|
29
|
+
ensure
|
30
|
+
vaas.close
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
if __FILE__ == $0
|
35
|
+
main
|
36
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'json'
|
2
|
+
require 'async'
|
3
|
+
require 'async/http/internet'
|
4
|
+
|
5
|
+
module VAAS
|
6
|
+
class ClientCredentialsGrantAuthenticator
|
7
|
+
|
8
|
+
attr_accessor :client_id, :client_secret, :token_endpoint, :token
|
9
|
+
|
10
|
+
def initialize(client_id, client_secret, token_endpoint)
|
11
|
+
@client_id = client_id
|
12
|
+
@client_secret = client_secret
|
13
|
+
@token_endpoint = token_endpoint
|
14
|
+
end
|
15
|
+
|
16
|
+
def get_token
|
17
|
+
Async do
|
18
|
+
client = Async::HTTP::Internet.new
|
19
|
+
|
20
|
+
header = [['content-type', 'application/x-www-form-urlencoded']]
|
21
|
+
body = ["grant_type=client_credentials&client_id=#{client_id}&client_secret=#{client_secret}"]
|
22
|
+
|
23
|
+
response = client.post(token_endpoint, header, body)
|
24
|
+
self.token = JSON.parse(response.read)['access_token']
|
25
|
+
rescue => e
|
26
|
+
raise VaasAuthenticationError, e
|
27
|
+
ensure
|
28
|
+
client&.close
|
29
|
+
end
|
30
|
+
token
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module VAAS
|
2
|
+
class VaasAuthenticationError < StandardError
|
3
|
+
def initialize(msg = "authentication failed")
|
4
|
+
super
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
class VaasTimeoutError < StandardError
|
9
|
+
def initialize(msg = "connection has timed out")
|
10
|
+
super
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
class VaasInvalidStateError < StandardError
|
15
|
+
def initialize(msg = "connect() was not called")
|
16
|
+
super
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
class VaasConnectionClosedError < StandardError
|
21
|
+
def initialize(msg = "connection closed")
|
22
|
+
super
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
class VaasUploadError < StandardError
|
27
|
+
def initialize(msg = "upload failed")
|
28
|
+
super
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,139 @@
|
|
1
|
+
require 'async'
|
2
|
+
require 'async/http/endpoint'
|
3
|
+
require 'async/websocket/client'
|
4
|
+
require 'async/http/internet'
|
5
|
+
require 'json'
|
6
|
+
require 'securerandom'
|
7
|
+
require 'digest'
|
8
|
+
require 'protocol/http/body/file'
|
9
|
+
require 'uri'
|
10
|
+
|
11
|
+
require_relative 'vaas_verdict'
|
12
|
+
require_relative 'vaas_errors'
|
13
|
+
|
14
|
+
module VAAS
|
15
|
+
class VaasMain
|
16
|
+
|
17
|
+
attr_accessor :session_id, :websocket, :url
|
18
|
+
|
19
|
+
def initialize(url="wss://gateway-vaas.gdatasecurity.de")
|
20
|
+
@url = url
|
21
|
+
end
|
22
|
+
|
23
|
+
def connect(token)
|
24
|
+
# connect to endpoint
|
25
|
+
endpoint = Async::HTTP::Endpoint.parse(url, alpn_protocols: Async::HTTP::Protocol::HTTP1.names)
|
26
|
+
self.websocket = Async::WebSocket::Client.connect(endpoint)
|
27
|
+
|
28
|
+
# send authentication request
|
29
|
+
auth_request = JSON.generate({:kind => "AuthRequest", :token => token})
|
30
|
+
websocket.write(auth_request)
|
31
|
+
|
32
|
+
# receive authentication message
|
33
|
+
while message = websocket.read
|
34
|
+
message = JSON.parse(message)
|
35
|
+
if message['success'] == true
|
36
|
+
self.session_id = message['session_id']
|
37
|
+
break
|
38
|
+
else
|
39
|
+
raise VaasAuthenticationError
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def get_authenticated_websocket
|
45
|
+
raise VaasInvalidStateError unless websocket
|
46
|
+
raise VaasInvalidStateError, "connect() was not awaited" unless session_id
|
47
|
+
raise VaasConnectionClosedError if websocket.closed?
|
48
|
+
websocket
|
49
|
+
end
|
50
|
+
|
51
|
+
def close
|
52
|
+
websocket&.close
|
53
|
+
end
|
54
|
+
|
55
|
+
def __for_sha256(sha256, guid)
|
56
|
+
# send verdict request with sha256
|
57
|
+
websocket = get_authenticated_websocket
|
58
|
+
guid = guid || SecureRandom.uuid.to_s
|
59
|
+
verdict_request = JSON.generate({:kind => "VerdictRequest",
|
60
|
+
:session_id => session_id,
|
61
|
+
:sha256 => sha256,
|
62
|
+
:guid => guid})
|
63
|
+
websocket.write(verdict_request)
|
64
|
+
|
65
|
+
# receive verdict message
|
66
|
+
while message = websocket.read
|
67
|
+
message = JSON.parse(message)
|
68
|
+
if message['kind'] == "VerdictResponse"
|
69
|
+
return message
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
def for_sha256(sha256, guid = nil)
|
75
|
+
response = __for_sha256(sha256, guid)
|
76
|
+
VaasVerdict.new(response)
|
77
|
+
end
|
78
|
+
|
79
|
+
def for_file(path, guid = nil)
|
80
|
+
# get sha256 of file and send verdict request
|
81
|
+
sha256 = Digest::SHA256.file(path).hexdigest
|
82
|
+
response = __for_sha256(sha256, guid)
|
83
|
+
|
84
|
+
# upload file if verdict is unknown
|
85
|
+
if response['verdict'] == 'Unknown'
|
86
|
+
upload(response, path)
|
87
|
+
else
|
88
|
+
return VaasVerdict.new(response)
|
89
|
+
end
|
90
|
+
|
91
|
+
# receive verdict message of uploaded file
|
92
|
+
while message = websocket.read
|
93
|
+
message = JSON.parse(message)
|
94
|
+
if message['kind'] == "VerdictResponse" && message['verdict'] != "Unknown"
|
95
|
+
return VaasVerdict.new(message)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
def for_url(url, guid = nil)
|
101
|
+
#send verdict request with url
|
102
|
+
websocket = get_authenticated_websocket
|
103
|
+
guid = guid || SecureRandom.uuid.to_s
|
104
|
+
url = URI(url).to_s
|
105
|
+
verdict_request = JSON.generate({:kind => "VerdictRequestForUrl",
|
106
|
+
:session_id => session_id,
|
107
|
+
:guid => guid,
|
108
|
+
:url => url})
|
109
|
+
websocket.write(verdict_request)
|
110
|
+
|
111
|
+
# receive verdict message
|
112
|
+
while message = websocket.read
|
113
|
+
message = JSON.parse(message)
|
114
|
+
if message['kind'] == "VerdictResponse"
|
115
|
+
return VaasVerdict.new(message)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
def upload (message, path)
|
121
|
+
token = message['upload_token']
|
122
|
+
url = message['url']
|
123
|
+
|
124
|
+
Async do
|
125
|
+
client = Async::HTTP::Internet.new
|
126
|
+
|
127
|
+
header = [['authorization', token]]
|
128
|
+
body = Protocol::HTTP::Body::File.open(File.join(path))
|
129
|
+
|
130
|
+
client.put(url, header, body).read
|
131
|
+
|
132
|
+
rescue => e
|
133
|
+
raise VaasUploadError, e
|
134
|
+
ensure
|
135
|
+
client&.close
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
data/lib/vaas/version.rb
ADDED
data/lib/vaas.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'vaas/version'
|
data/vaas.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'vaas/version'
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "vaas"
|
6
|
+
s.version = VAAS::VERSION
|
7
|
+
s.summary = "Verdict as a Service by G Data"
|
8
|
+
s.description = "Simple gem to get the verdict of files from G Data"
|
9
|
+
s.authors = ["Allie Weitenkamp"]
|
10
|
+
s.email = "opensource@gdata.de"
|
11
|
+
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
12
|
+
s.homepage = "https://github.com/GDATASoftwareAG/vaas"
|
13
|
+
s.license = "MIT"
|
14
|
+
s.require_paths = ["lib"]
|
15
|
+
s.metadata = { "documentation_uri" => "https://github.com/GDATASoftwareAG/vaas/blob/main/ruby/README.md" }
|
16
|
+
|
17
|
+
s.add_dependency 'async', '~> 2.3.1'
|
18
|
+
s.add_dependency 'async-http', '~> 0.59.4'
|
19
|
+
s.add_dependency 'async-websocket', '~> 0.22.1'
|
20
|
+
|
21
|
+
s.add_development_dependency "minitest", '~> 5.17.0'
|
22
|
+
s.add_development_dependency 'dotenv', '~> 2.8.1'
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,128 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vaas
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Allie Weitenkamp
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-01-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: async
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.3.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.3.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: async-http
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.59.4
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.59.4
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: async-websocket
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.22.1
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.22.1
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 5.17.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 5.17.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: dotenv
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.8.1
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.8.1
|
83
|
+
description: Simple gem to get the verdict of files from G Data
|
84
|
+
email: opensource@gdata.de
|
85
|
+
executables: []
|
86
|
+
extensions: []
|
87
|
+
extra_rdoc_files: []
|
88
|
+
files:
|
89
|
+
- ".devcontainer/Dockerfile"
|
90
|
+
- ".devcontainer/devcontainer.json"
|
91
|
+
- ".vscode/launch.json"
|
92
|
+
- Gemfile
|
93
|
+
- README.md
|
94
|
+
- examples/example_with_lists.rb
|
95
|
+
- examples/example_with_reconnect.rb
|
96
|
+
- examples/simple_example.rb
|
97
|
+
- lib/vaas.rb
|
98
|
+
- lib/vaas/client_credentials_grant_authenticator.rb
|
99
|
+
- lib/vaas/vaas_errors.rb
|
100
|
+
- lib/vaas/vaas_main.rb
|
101
|
+
- lib/vaas/vaas_verdict.rb
|
102
|
+
- lib/vaas/version.rb
|
103
|
+
- vaas.gemspec
|
104
|
+
homepage: https://github.com/GDATASoftwareAG/vaas
|
105
|
+
licenses:
|
106
|
+
- MIT
|
107
|
+
metadata:
|
108
|
+
documentation_uri: https://github.com/GDATASoftwareAG/vaas/blob/main/ruby/README.md
|
109
|
+
post_install_message:
|
110
|
+
rdoc_options: []
|
111
|
+
require_paths:
|
112
|
+
- lib
|
113
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0'
|
123
|
+
requirements: []
|
124
|
+
rubygems_version: 3.3.26
|
125
|
+
signing_key:
|
126
|
+
specification_version: 4
|
127
|
+
summary: Verdict as a Service by G Data
|
128
|
+
test_files: []
|