Module: Controls::Client::ThreatVectors

Included in:
Controls::Client
Defined in:
lib/controls/client/threat_vectors.rb

Overview

A module to encapsulate API methods related to threats and threat vectors

Since:

  • API v1.0

Version:

  • v1.0.0

Threat Vector Methods collapse

Instance Method Details

#threat_threat_vectors(threat) ⇒ Array<Hash> Also known as: threat_vectors_by_threat

Returns a list of hashes representing threats.

Parameters:

  • threat (String)

    the threat to search for threat vectors by

Returns:

  • (Array<Hash>)

    a list of hashes representing threats

Since:

  • API v1.0



21
22
23
# File 'lib/controls/client/threat_vectors.rb', line 21

def threat_threat_vectors(threat)
  get "/threats/#{threat}/threat_vectors"
end

#threat_vectors(vector = nil) ⇒ String

Returns a hash representing the specified threat vector.

Parameters:

  • vector (String) (defaults to: nil)

    the threat vector to search for

Returns:

  • (String)

    a hash representing the specified threat vector

Since:

  • API v1.0



11
12
13
14
15
16
17
# File 'lib/controls/client/threat_vectors.rb', line 11

def threat_vectors(vector = nil)
  if vector
    get "/threat_vectors/#{vector}"
  else
    get '/threat_vectors'
  end
end