dependency-tracker-client 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +201 -0
- data/README.md +276 -0
- data/Rakefile +10 -0
- data/dependency-tracker-client.gemspec +39 -0
- data/docs/About.md +25 -0
- data/docs/Analysis.md +21 -0
- data/docs/AnalysisApi.md +177 -0
- data/docs/AnalysisComment.md +21 -0
- data/docs/AnalysisRequest.md +27 -0
- data/docs/ApiKey.md +17 -0
- data/docs/BadgeApi.md +102 -0
- data/docs/BodyPart.md +31 -0
- data/docs/BomApi.md +335 -0
- data/docs/BomSubmitRequest.md +25 -0
- data/docs/CalculatorApi.md +61 -0
- data/docs/CloneProjectRequest.md +19 -0
- data/docs/Component.md +69 -0
- data/docs/ComponentApi.md +373 -0
- data/docs/ComponentMetrics.md +43 -0
- data/docs/ConfigProperty.md +25 -0
- data/docs/ConfigPropertyApi.md +167 -0
- data/docs/ContentDisposition.md +29 -0
- data/docs/Cwe.md +19 -0
- data/docs/CweApi.md +110 -0
- data/docs/DefaultApi.md +434 -0
- data/docs/Dependency.md +27 -0
- data/docs/DependencyApi.md +222 -0
- data/docs/DependencyMetrics.md +45 -0
- data/docs/DependencyRequest.md +21 -0
- data/docs/Finding.md +23 -0
- data/docs/FindingApi.md +113 -0
- data/docs/FormDataBodyPart.md +39 -0
- data/docs/FormDataContentDisposition.md +31 -0
- data/docs/FormDataMultiPart.md +35 -0
- data/docs/Framework.md +23 -0
- data/docs/IdentifiableObject.md +17 -0
- data/docs/LdapApi.md +220 -0
- data/docs/LdapUser.md +25 -0
- data/docs/License.md +37 -0
- data/docs/LicenseApi.md +159 -0
- data/docs/ManagedUser.md +37 -0
- data/docs/MappedLdapGroup.md +19 -0
- data/docs/MappedLdapGroupRequest.md +19 -0
- data/docs/MediaType.md +25 -0
- data/docs/MetricsApi.md +922 -0
- data/docs/MultiPart.md +33 -0
- data/docs/NotificationPublisher.md +29 -0
- data/docs/NotificationRule.md +35 -0
- data/docs/PackageURL.md +29 -0
- data/docs/ParameterizedHeader.md +19 -0
- data/docs/Permission.md +19 -0
- data/docs/PermissionApi.md +279 -0
- data/docs/PortfolioMetrics.md +53 -0
- data/docs/Project.md +43 -0
- data/docs/ProjectApi.md +445 -0
- data/docs/ProjectMetrics.md +47 -0
- data/docs/ProjectProperty.md +27 -0
- data/docs/ProjectPropertyApi.md +232 -0
- data/docs/Repository.md +29 -0
- data/docs/RepositoryApi.md +325 -0
- data/docs/RepositoryMetaComponent.md +27 -0
- data/docs/Score.md +23 -0
- data/docs/SearchApi.md +120 -0
- data/docs/SearchResult.md +17 -0
- data/docs/Tag.md +19 -0
- data/docs/Team.md +29 -0
- data/docs/TeamApi.md +432 -0
- data/docs/UserApi.md +715 -0
- data/docs/UserPrincipal.md +27 -0
- data/docs/VersionApi.md +52 -0
- data/docs/Vulnerability.md +69 -0
- data/docs/VulnerabilityApi.md +666 -0
- data/docs/VulnerabilityMetrics.md +23 -0
- data/docs/VulnerableSoftware.md +69 -0
- data/lib/dependency-tracker-client/api/analysis_api.rb +209 -0
- data/lib/dependency-tracker-client/api/badge_api.rb +148 -0
- data/lib/dependency-tracker-client/api/bom_api.rb +382 -0
- data/lib/dependency-tracker-client/api/calculator_api.rb +83 -0
- data/lib/dependency-tracker-client/api/component_api.rb +422 -0
- data/lib/dependency-tracker-client/api/config_property_api.rb +192 -0
- data/lib/dependency-tracker-client/api/cwe_api.rb +136 -0
- data/lib/dependency-tracker-client/api/default_api.rb +491 -0
- data/lib/dependency-tracker-client/api/dependency_api.rb +254 -0
- data/lib/dependency-tracker-client/api/finding_api.rb +140 -0
- data/lib/dependency-tracker-client/api/ldap_api.rb +254 -0
- data/lib/dependency-tracker-client/api/license_api.rb +190 -0
- data/lib/dependency-tracker-client/api/metrics_api.rb +1086 -0
- data/lib/dependency-tracker-client/api/permission_api.rb +342 -0
- data/lib/dependency-tracker-client/api/project_api.rb +504 -0
- data/lib/dependency-tracker-client/api/project_property_api.rb +274 -0
- data/lib/dependency-tracker-client/api/repository_api.rb +376 -0
- data/lib/dependency-tracker-client/api/search_api.rb +143 -0
- data/lib/dependency-tracker-client/api/team_api.rb +486 -0
- data/lib/dependency-tracker-client/api/user_api.rb +796 -0
- data/lib/dependency-tracker-client/api/version_api.rb +78 -0
- data/lib/dependency-tracker-client/api/vulnerability_api.rb +780 -0
- data/lib/dependency-tracker-client/api_client.rb +388 -0
- data/lib/dependency-tracker-client/api_error.rb +57 -0
- data/lib/dependency-tracker-client/configuration.rb +261 -0
- data/lib/dependency-tracker-client/models/about.rb +242 -0
- data/lib/dependency-tracker-client/models/analysis.rb +265 -0
- data/lib/dependency-tracker-client/models/analysis_comment.rb +234 -0
- data/lib/dependency-tracker-client/models/analysis_request.rb +371 -0
- data/lib/dependency-tracker-client/models/api_key.rb +250 -0
- data/lib/dependency-tracker-client/models/body_part.rb +273 -0
- data/lib/dependency-tracker-client/models/bom_submit_request.rb +328 -0
- data/lib/dependency-tracker-client/models/clone_project_request.rb +267 -0
- data/lib/dependency-tracker-client/models/component.rb +900 -0
- data/lib/dependency-tracker-client/models/component_metrics.rb +338 -0
- data/lib/dependency-tracker-client/models/config_property.rb +421 -0
- data/lib/dependency-tracker-client/models/content_disposition.rb +262 -0
- data/lib/dependency-tracker-client/models/cwe.rb +259 -0
- data/lib/dependency-tracker-client/models/dependency.rb +266 -0
- data/lib/dependency-tracker-client/models/dependency_metrics.rb +352 -0
- data/lib/dependency-tracker-client/models/dependency_request.rb +257 -0
- data/lib/dependency-tracker-client/models/finding.rb +239 -0
- data/lib/dependency-tracker-client/models/form_data_body_part.rb +309 -0
- data/lib/dependency-tracker-client/models/form_data_content_disposition.rb +271 -0
- data/lib/dependency-tracker-client/models/form_data_multi_part.rb +295 -0
- data/lib/dependency-tracker-client/models/framework.rb +233 -0
- data/lib/dependency-tracker-client/models/identifiable_object.rb +206 -0
- data/lib/dependency-tracker-client/models/ldap_user.rb +351 -0
- data/lib/dependency-tracker-client/models/license.rb +373 -0
- data/lib/dependency-tracker-client/models/managed_user.rb +480 -0
- data/lib/dependency-tracker-client/models/mapped_ldap_group.rb +255 -0
- data/lib/dependency-tracker-client/models/mapped_ldap_group_request.rb +267 -0
- data/lib/dependency-tracker-client/models/media_type.rb +244 -0
- data/lib/dependency-tracker-client/models/multi_part.rb +284 -0
- data/lib/dependency-tracker-client/models/notification_publisher.rb +388 -0
- data/lib/dependency-tracker-client/models/notification_rule.rb +426 -0
- data/lib/dependency-tracker-client/models/package_url.rb +262 -0
- data/lib/dependency-tracker-client/models/parameterized_header.rb +217 -0
- data/lib/dependency-tracker-client/models/permission.rb +250 -0
- data/lib/dependency-tracker-client/models/portfolio_metrics.rb +378 -0
- data/lib/dependency-tracker-client/models/project.rb +420 -0
- data/lib/dependency-tracker-client/models/project_metrics.rb +356 -0
- data/lib/dependency-tracker-client/models/project_property.rb +430 -0
- data/lib/dependency-tracker-client/models/repository.rb +319 -0
- data/lib/dependency-tracker-client/models/repository_meta_component.rb +305 -0
- data/lib/dependency-tracker-client/models/score.rb +233 -0
- data/lib/dependency-tracker-client/models/search_result.rb +208 -0
- data/lib/dependency-tracker-client/models/tag.rb +252 -0
- data/lib/dependency-tracker-client/models/team.rb +310 -0
- data/lib/dependency-tracker-client/models/user_principal.rb +255 -0
- data/lib/dependency-tracker-client/models/vulnerability.rb +729 -0
- data/lib/dependency-tracker-client/models/vulnerability_metrics.rb +238 -0
- data/lib/dependency-tracker-client/models/vulnerable_software.rb +442 -0
- data/lib/dependency-tracker-client/version.rb +15 -0
- data/lib/dependency-tracker-client.rb +109 -0
- data/pkg/dependency-tracker-client-1.0.0.gem +0 -0
- data/spec/api/analysis_api_spec.rb +70 -0
- data/spec/api/badge_api_spec.rb +58 -0
- data/spec/api/bom_api_spec.rb +106 -0
- data/spec/api/calculator_api_spec.rb +46 -0
- data/spec/api/component_api_spec.rb +110 -0
- data/spec/api/config_property_api_spec.rb +67 -0
- data/spec/api/cwe_api_spec.rb +56 -0
- data/spec/api/default_api_spec.rb +123 -0
- data/spec/api/dependency_api_spec.rb +79 -0
- data/spec/api/finding_api_spec.rb +57 -0
- data/spec/api/ldap_api_spec.rb +79 -0
- data/spec/api/license_api_spec.rb +66 -0
- data/spec/api/metrics_api_spec.rb +233 -0
- data/spec/api/permission_api_spec.rb +94 -0
- data/spec/api/project_api_spec.rb +126 -0
- data/spec/api/project_property_api_spec.rb +82 -0
- data/spec/api/repository_api_spec.rb +100 -0
- data/spec/api/search_api_spec.rb +59 -0
- data/spec/api/team_api_spec.rb +122 -0
- data/spec/api/user_api_spec.rb +183 -0
- data/spec/api/version_api_spec.rb +46 -0
- data/spec/api/vulnerability_api_spec.rb +177 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/about_spec.rb +65 -0
- data/spec/models/analysis_comment_spec.rb +53 -0
- data/spec/models/analysis_request_spec.rb +75 -0
- data/spec/models/analysis_spec.rb +57 -0
- data/spec/models/api_key_spec.rb +41 -0
- data/spec/models/body_part_spec.rb +83 -0
- data/spec/models/bom_submit_request_spec.rb +65 -0
- data/spec/models/clone_project_request_spec.rb +47 -0
- data/spec/models/component_metrics_spec.rb +119 -0
- data/spec/models/component_spec.rb +201 -0
- data/spec/models/config_property_spec.rb +69 -0
- data/spec/models/content_disposition_spec.rb +77 -0
- data/spec/models/cwe_spec.rb +47 -0
- data/spec/models/dependency_metrics_spec.rb +125 -0
- data/spec/models/dependency_request_spec.rb +53 -0
- data/spec/models/dependency_spec.rb +71 -0
- data/spec/models/finding_spec.rb +59 -0
- data/spec/models/form_data_body_part_spec.rb +107 -0
- data/spec/models/form_data_content_disposition_spec.rb +83 -0
- data/spec/models/form_data_multi_part_spec.rb +95 -0
- data/spec/models/framework_spec.rb +59 -0
- data/spec/models/identifiable_object_spec.rb +41 -0
- data/spec/models/ldap_user_spec.rb +65 -0
- data/spec/models/license_spec.rb +101 -0
- data/spec/models/managed_user_spec.rb +101 -0
- data/spec/models/mapped_ldap_group_request_spec.rb +47 -0
- data/spec/models/mapped_ldap_group_spec.rb +47 -0
- data/spec/models/media_type_spec.rb +65 -0
- data/spec/models/multi_part_spec.rb +89 -0
- data/spec/models/notification_publisher_spec.rb +77 -0
- data/spec/models/notification_rule_spec.rb +107 -0
- data/spec/models/package_url_spec.rb +77 -0
- data/spec/models/parameterized_header_spec.rb +47 -0
- data/spec/models/permission_spec.rb +47 -0
- data/spec/models/portfolio_metrics_spec.rb +149 -0
- data/spec/models/project_metrics_spec.rb +131 -0
- data/spec/models/project_property_spec.rb +75 -0
- data/spec/models/project_spec.rb +119 -0
- data/spec/models/repository_meta_component_spec.rb +75 -0
- data/spec/models/repository_spec.rb +81 -0
- data/spec/models/score_spec.rb +59 -0
- data/spec/models/search_result_spec.rb +41 -0
- data/spec/models/tag_spec.rb +47 -0
- data/spec/models/team_spec.rb +77 -0
- data/spec/models/user_principal_spec.rb +71 -0
- data/spec/models/vulnerability_metrics_spec.rb +59 -0
- data/spec/models/vulnerability_spec.rb +201 -0
- data/spec/models/vulnerable_software_spec.rb +197 -0
- data/spec/spec_helper.rb +111 -0
- data/tmp/tmp.rb +11 -0
- metadata +402 -0
@@ -0,0 +1,666 @@
|
|
1
|
+
# DependencyTracker::VulnerabilityApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://localhost/api*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**assign_vulnerability**](VulnerabilityApi.md#assign_vulnerability) | **POST** /v1/vulnerability/source/{source}/vuln/{vulnId}/component/{component} | Assigns a vulnerability to a component
|
8
|
+
[**assign_vulnerability1**](VulnerabilityApi.md#assign_vulnerability1) | **POST** /v1/vulnerability/{uuid}/component/{component} | Assigns a vulnerability to a component
|
9
|
+
[**create_vulnerability**](VulnerabilityApi.md#create_vulnerability) | **PUT** /v1/vulnerability | Creates a new vulnerability
|
10
|
+
[**get_affected_project**](VulnerabilityApi.md#get_affected_project) | **GET** /v1/vulnerability/source/{source}/vuln/{vuln}/projects | Returns a list of all projects affected by a specific vulnerability
|
11
|
+
[**get_all_vulnerabilities**](VulnerabilityApi.md#get_all_vulnerabilities) | **GET** /v1/vulnerability | Returns a list of all vulnerabilities
|
12
|
+
[**get_vulnerabilities_by_component**](VulnerabilityApi.md#get_vulnerabilities_by_component) | **GET** /v1/vulnerability/component/{ident} | Returns a list of all vulnerabilities for a specific component
|
13
|
+
[**get_vulnerabilities_by_project**](VulnerabilityApi.md#get_vulnerabilities_by_project) | **GET** /v1/vulnerability/project/{uuid} | Returns a list of all vulnerabilities for a specific project
|
14
|
+
[**get_vulnerability_by_uuid**](VulnerabilityApi.md#get_vulnerability_by_uuid) | **GET** /v1/vulnerability/{uuid} | Returns a specific vulnerability
|
15
|
+
[**get_vulnerability_by_vuln_id**](VulnerabilityApi.md#get_vulnerability_by_vuln_id) | **GET** /v1/vulnerability/source/{source}/vuln/{vuln} | Returns a specific vulnerability
|
16
|
+
[**unassign_vulnerability**](VulnerabilityApi.md#unassign_vulnerability) | **DELETE** /v1/vulnerability/source/{source}/vuln/{vulnId}/component/{component} | Removes assignment of a vulnerability from a component
|
17
|
+
[**unassign_vulnerability1**](VulnerabilityApi.md#unassign_vulnerability1) | **DELETE** /v1/vulnerability/{uuid}/component/{component} | Removes assignment of a vulnerability from a component
|
18
|
+
[**update_vulnerability**](VulnerabilityApi.md#update_vulnerability) | **POST** /v1/vulnerability | Updates an internal vulnerability
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
## assign_vulnerability
|
23
|
+
|
24
|
+
> assign_vulnerability(source, vuln_id, component)
|
25
|
+
|
26
|
+
Assigns a vulnerability to a component
|
27
|
+
|
28
|
+
### Example
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
# load the gem
|
32
|
+
require 'dependency-tracker-client'
|
33
|
+
# setup authorization
|
34
|
+
DependencyTracker.configure do |config|
|
35
|
+
# Configure API key authorization: X-Api-Key
|
36
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
37
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
38
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
39
|
+
end
|
40
|
+
|
41
|
+
api_instance = DependencyTracker::VulnerabilityApi.new
|
42
|
+
source = 'source_example' # String | The vulnerability source
|
43
|
+
vuln_id = 'vuln_id_example' # String | The vulnId
|
44
|
+
component = 'component_example' # String | The UUID of the component
|
45
|
+
|
46
|
+
begin
|
47
|
+
#Assigns a vulnerability to a component
|
48
|
+
api_instance.assign_vulnerability(source, vuln_id, component)
|
49
|
+
rescue DependencyTracker::ApiError => e
|
50
|
+
puts "Exception when calling VulnerabilityApi->assign_vulnerability: #{e}"
|
51
|
+
end
|
52
|
+
```
|
53
|
+
|
54
|
+
### Parameters
|
55
|
+
|
56
|
+
|
57
|
+
Name | Type | Description | Notes
|
58
|
+
------------- | ------------- | ------------- | -------------
|
59
|
+
**source** | **String**| The vulnerability source |
|
60
|
+
**vuln_id** | **String**| The vulnId |
|
61
|
+
**component** | **String**| The UUID of the component |
|
62
|
+
|
63
|
+
### Return type
|
64
|
+
|
65
|
+
nil (empty response body)
|
66
|
+
|
67
|
+
### Authorization
|
68
|
+
|
69
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
70
|
+
|
71
|
+
### HTTP request headers
|
72
|
+
|
73
|
+
- **Content-Type**: Not defined
|
74
|
+
- **Accept**: Not defined
|
75
|
+
|
76
|
+
|
77
|
+
## assign_vulnerability1
|
78
|
+
|
79
|
+
> assign_vulnerability1(uuid, component)
|
80
|
+
|
81
|
+
Assigns a vulnerability to a component
|
82
|
+
|
83
|
+
### Example
|
84
|
+
|
85
|
+
```ruby
|
86
|
+
# load the gem
|
87
|
+
require 'dependency-tracker-client'
|
88
|
+
# setup authorization
|
89
|
+
DependencyTracker.configure do |config|
|
90
|
+
# Configure API key authorization: X-Api-Key
|
91
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
92
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
93
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
94
|
+
end
|
95
|
+
|
96
|
+
api_instance = DependencyTracker::VulnerabilityApi.new
|
97
|
+
uuid = 'uuid_example' # String | The UUID of the vulnerability
|
98
|
+
component = 'component_example' # String | The UUID of the component
|
99
|
+
|
100
|
+
begin
|
101
|
+
#Assigns a vulnerability to a component
|
102
|
+
api_instance.assign_vulnerability1(uuid, component)
|
103
|
+
rescue DependencyTracker::ApiError => e
|
104
|
+
puts "Exception when calling VulnerabilityApi->assign_vulnerability1: #{e}"
|
105
|
+
end
|
106
|
+
```
|
107
|
+
|
108
|
+
### Parameters
|
109
|
+
|
110
|
+
|
111
|
+
Name | Type | Description | Notes
|
112
|
+
------------- | ------------- | ------------- | -------------
|
113
|
+
**uuid** | **String**| The UUID of the vulnerability |
|
114
|
+
**component** | **String**| The UUID of the component |
|
115
|
+
|
116
|
+
### Return type
|
117
|
+
|
118
|
+
nil (empty response body)
|
119
|
+
|
120
|
+
### Authorization
|
121
|
+
|
122
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
123
|
+
|
124
|
+
### HTTP request headers
|
125
|
+
|
126
|
+
- **Content-Type**: Not defined
|
127
|
+
- **Accept**: Not defined
|
128
|
+
|
129
|
+
|
130
|
+
## create_vulnerability
|
131
|
+
|
132
|
+
> Vulnerability create_vulnerability(opts)
|
133
|
+
|
134
|
+
Creates a new vulnerability
|
135
|
+
|
136
|
+
### Example
|
137
|
+
|
138
|
+
```ruby
|
139
|
+
# load the gem
|
140
|
+
require 'dependency-tracker-client'
|
141
|
+
# setup authorization
|
142
|
+
DependencyTracker.configure do |config|
|
143
|
+
# Configure API key authorization: X-Api-Key
|
144
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
145
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
146
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
147
|
+
end
|
148
|
+
|
149
|
+
api_instance = DependencyTracker::VulnerabilityApi.new
|
150
|
+
opts = {
|
151
|
+
body: DependencyTracker::Vulnerability.new # Vulnerability |
|
152
|
+
}
|
153
|
+
|
154
|
+
begin
|
155
|
+
#Creates a new vulnerability
|
156
|
+
result = api_instance.create_vulnerability(opts)
|
157
|
+
p result
|
158
|
+
rescue DependencyTracker::ApiError => e
|
159
|
+
puts "Exception when calling VulnerabilityApi->create_vulnerability: #{e}"
|
160
|
+
end
|
161
|
+
```
|
162
|
+
|
163
|
+
### Parameters
|
164
|
+
|
165
|
+
|
166
|
+
Name | Type | Description | Notes
|
167
|
+
------------- | ------------- | ------------- | -------------
|
168
|
+
**body** | [**Vulnerability**](Vulnerability.md)| | [optional]
|
169
|
+
|
170
|
+
### Return type
|
171
|
+
|
172
|
+
[**Vulnerability**](Vulnerability.md)
|
173
|
+
|
174
|
+
### Authorization
|
175
|
+
|
176
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
177
|
+
|
178
|
+
### HTTP request headers
|
179
|
+
|
180
|
+
- **Content-Type**: application/json
|
181
|
+
- **Accept**: application/json
|
182
|
+
|
183
|
+
|
184
|
+
## get_affected_project
|
185
|
+
|
186
|
+
> Array<Project> get_affected_project(source, vuln)
|
187
|
+
|
188
|
+
Returns a list of all projects affected by a specific vulnerability
|
189
|
+
|
190
|
+
### Example
|
191
|
+
|
192
|
+
```ruby
|
193
|
+
# load the gem
|
194
|
+
require 'dependency-tracker-client'
|
195
|
+
# setup authorization
|
196
|
+
DependencyTracker.configure do |config|
|
197
|
+
# Configure API key authorization: X-Api-Key
|
198
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
199
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
200
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
201
|
+
end
|
202
|
+
|
203
|
+
api_instance = DependencyTracker::VulnerabilityApi.new
|
204
|
+
source = 'source_example' # String |
|
205
|
+
vuln = 'vuln_example' # String |
|
206
|
+
|
207
|
+
begin
|
208
|
+
#Returns a list of all projects affected by a specific vulnerability
|
209
|
+
result = api_instance.get_affected_project(source, vuln)
|
210
|
+
p result
|
211
|
+
rescue DependencyTracker::ApiError => e
|
212
|
+
puts "Exception when calling VulnerabilityApi->get_affected_project: #{e}"
|
213
|
+
end
|
214
|
+
```
|
215
|
+
|
216
|
+
### Parameters
|
217
|
+
|
218
|
+
|
219
|
+
Name | Type | Description | Notes
|
220
|
+
------------- | ------------- | ------------- | -------------
|
221
|
+
**source** | **String**| |
|
222
|
+
**vuln** | **String**| |
|
223
|
+
|
224
|
+
### Return type
|
225
|
+
|
226
|
+
[**Array<Project>**](Project.md)
|
227
|
+
|
228
|
+
### Authorization
|
229
|
+
|
230
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
231
|
+
|
232
|
+
### HTTP request headers
|
233
|
+
|
234
|
+
- **Content-Type**: Not defined
|
235
|
+
- **Accept**: application/json
|
236
|
+
|
237
|
+
|
238
|
+
## get_all_vulnerabilities
|
239
|
+
|
240
|
+
> Array<Vulnerability> get_all_vulnerabilities
|
241
|
+
|
242
|
+
Returns a list of all vulnerabilities
|
243
|
+
|
244
|
+
### Example
|
245
|
+
|
246
|
+
```ruby
|
247
|
+
# load the gem
|
248
|
+
require 'dependency-tracker-client'
|
249
|
+
# setup authorization
|
250
|
+
DependencyTracker.configure do |config|
|
251
|
+
# Configure API key authorization: X-Api-Key
|
252
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
253
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
254
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
255
|
+
end
|
256
|
+
|
257
|
+
api_instance = DependencyTracker::VulnerabilityApi.new
|
258
|
+
|
259
|
+
begin
|
260
|
+
#Returns a list of all vulnerabilities
|
261
|
+
result = api_instance.get_all_vulnerabilities
|
262
|
+
p result
|
263
|
+
rescue DependencyTracker::ApiError => e
|
264
|
+
puts "Exception when calling VulnerabilityApi->get_all_vulnerabilities: #{e}"
|
265
|
+
end
|
266
|
+
```
|
267
|
+
|
268
|
+
### Parameters
|
269
|
+
|
270
|
+
This endpoint does not need any parameter.
|
271
|
+
|
272
|
+
### Return type
|
273
|
+
|
274
|
+
[**Array<Vulnerability>**](Vulnerability.md)
|
275
|
+
|
276
|
+
### Authorization
|
277
|
+
|
278
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
279
|
+
|
280
|
+
### HTTP request headers
|
281
|
+
|
282
|
+
- **Content-Type**: Not defined
|
283
|
+
- **Accept**: application/json
|
284
|
+
|
285
|
+
|
286
|
+
## get_vulnerabilities_by_component
|
287
|
+
|
288
|
+
> Array<Vulnerability> get_vulnerabilities_by_component(ident, opts)
|
289
|
+
|
290
|
+
Returns a list of all vulnerabilities for a specific component
|
291
|
+
|
292
|
+
A valid UUID of the component may be specified, or the MD5 or SHA1 hash of the component
|
293
|
+
|
294
|
+
### Example
|
295
|
+
|
296
|
+
```ruby
|
297
|
+
# load the gem
|
298
|
+
require 'dependency-tracker-client'
|
299
|
+
# setup authorization
|
300
|
+
DependencyTracker.configure do |config|
|
301
|
+
# Configure API key authorization: X-Api-Key
|
302
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
303
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
304
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
305
|
+
end
|
306
|
+
|
307
|
+
api_instance = DependencyTracker::VulnerabilityApi.new
|
308
|
+
ident = 'ident_example' # String |
|
309
|
+
opts = {
|
310
|
+
suppressed: true # Boolean | Optionally includes suppressed vulnerabilities
|
311
|
+
}
|
312
|
+
|
313
|
+
begin
|
314
|
+
#Returns a list of all vulnerabilities for a specific component
|
315
|
+
result = api_instance.get_vulnerabilities_by_component(ident, opts)
|
316
|
+
p result
|
317
|
+
rescue DependencyTracker::ApiError => e
|
318
|
+
puts "Exception when calling VulnerabilityApi->get_vulnerabilities_by_component: #{e}"
|
319
|
+
end
|
320
|
+
```
|
321
|
+
|
322
|
+
### Parameters
|
323
|
+
|
324
|
+
|
325
|
+
Name | Type | Description | Notes
|
326
|
+
------------- | ------------- | ------------- | -------------
|
327
|
+
**ident** | **String**| |
|
328
|
+
**suppressed** | **Boolean**| Optionally includes suppressed vulnerabilities | [optional]
|
329
|
+
|
330
|
+
### Return type
|
331
|
+
|
332
|
+
[**Array<Vulnerability>**](Vulnerability.md)
|
333
|
+
|
334
|
+
### Authorization
|
335
|
+
|
336
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
337
|
+
|
338
|
+
### HTTP request headers
|
339
|
+
|
340
|
+
- **Content-Type**: Not defined
|
341
|
+
- **Accept**: application/json
|
342
|
+
|
343
|
+
|
344
|
+
## get_vulnerabilities_by_project
|
345
|
+
|
346
|
+
> Array<Vulnerability> get_vulnerabilities_by_project(uuid, opts)
|
347
|
+
|
348
|
+
Returns a list of all vulnerabilities for a specific project
|
349
|
+
|
350
|
+
### Example
|
351
|
+
|
352
|
+
```ruby
|
353
|
+
# load the gem
|
354
|
+
require 'dependency-tracker-client'
|
355
|
+
# setup authorization
|
356
|
+
DependencyTracker.configure do |config|
|
357
|
+
# Configure API key authorization: X-Api-Key
|
358
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
359
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
360
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
361
|
+
end
|
362
|
+
|
363
|
+
api_instance = DependencyTracker::VulnerabilityApi.new
|
364
|
+
uuid = 'uuid_example' # String |
|
365
|
+
opts = {
|
366
|
+
suppressed: true # Boolean | Optionally includes suppressed vulnerabilities
|
367
|
+
}
|
368
|
+
|
369
|
+
begin
|
370
|
+
#Returns a list of all vulnerabilities for a specific project
|
371
|
+
result = api_instance.get_vulnerabilities_by_project(uuid, opts)
|
372
|
+
p result
|
373
|
+
rescue DependencyTracker::ApiError => e
|
374
|
+
puts "Exception when calling VulnerabilityApi->get_vulnerabilities_by_project: #{e}"
|
375
|
+
end
|
376
|
+
```
|
377
|
+
|
378
|
+
### Parameters
|
379
|
+
|
380
|
+
|
381
|
+
Name | Type | Description | Notes
|
382
|
+
------------- | ------------- | ------------- | -------------
|
383
|
+
**uuid** | **String**| |
|
384
|
+
**suppressed** | **Boolean**| Optionally includes suppressed vulnerabilities | [optional]
|
385
|
+
|
386
|
+
### Return type
|
387
|
+
|
388
|
+
[**Array<Vulnerability>**](Vulnerability.md)
|
389
|
+
|
390
|
+
### Authorization
|
391
|
+
|
392
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
393
|
+
|
394
|
+
### HTTP request headers
|
395
|
+
|
396
|
+
- **Content-Type**: Not defined
|
397
|
+
- **Accept**: application/json
|
398
|
+
|
399
|
+
|
400
|
+
## get_vulnerability_by_uuid
|
401
|
+
|
402
|
+
> Vulnerability get_vulnerability_by_uuid(uuid)
|
403
|
+
|
404
|
+
Returns a specific vulnerability
|
405
|
+
|
406
|
+
### Example
|
407
|
+
|
408
|
+
```ruby
|
409
|
+
# load the gem
|
410
|
+
require 'dependency-tracker-client'
|
411
|
+
# setup authorization
|
412
|
+
DependencyTracker.configure do |config|
|
413
|
+
# Configure API key authorization: X-Api-Key
|
414
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
415
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
416
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
417
|
+
end
|
418
|
+
|
419
|
+
api_instance = DependencyTracker::VulnerabilityApi.new
|
420
|
+
uuid = 'uuid_example' # String | The UUID of the vulnerability
|
421
|
+
|
422
|
+
begin
|
423
|
+
#Returns a specific vulnerability
|
424
|
+
result = api_instance.get_vulnerability_by_uuid(uuid)
|
425
|
+
p result
|
426
|
+
rescue DependencyTracker::ApiError => e
|
427
|
+
puts "Exception when calling VulnerabilityApi->get_vulnerability_by_uuid: #{e}"
|
428
|
+
end
|
429
|
+
```
|
430
|
+
|
431
|
+
### Parameters
|
432
|
+
|
433
|
+
|
434
|
+
Name | Type | Description | Notes
|
435
|
+
------------- | ------------- | ------------- | -------------
|
436
|
+
**uuid** | **String**| The UUID of the vulnerability |
|
437
|
+
|
438
|
+
### Return type
|
439
|
+
|
440
|
+
[**Vulnerability**](Vulnerability.md)
|
441
|
+
|
442
|
+
### Authorization
|
443
|
+
|
444
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
445
|
+
|
446
|
+
### HTTP request headers
|
447
|
+
|
448
|
+
- **Content-Type**: Not defined
|
449
|
+
- **Accept**: application/json
|
450
|
+
|
451
|
+
|
452
|
+
## get_vulnerability_by_vuln_id
|
453
|
+
|
454
|
+
> Vulnerability get_vulnerability_by_vuln_id(source, vuln)
|
455
|
+
|
456
|
+
Returns a specific vulnerability
|
457
|
+
|
458
|
+
### Example
|
459
|
+
|
460
|
+
```ruby
|
461
|
+
# load the gem
|
462
|
+
require 'dependency-tracker-client'
|
463
|
+
# setup authorization
|
464
|
+
DependencyTracker.configure do |config|
|
465
|
+
# Configure API key authorization: X-Api-Key
|
466
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
467
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
468
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
469
|
+
end
|
470
|
+
|
471
|
+
api_instance = DependencyTracker::VulnerabilityApi.new
|
472
|
+
source = 'source_example' # String |
|
473
|
+
vuln = 'vuln_example' # String |
|
474
|
+
|
475
|
+
begin
|
476
|
+
#Returns a specific vulnerability
|
477
|
+
result = api_instance.get_vulnerability_by_vuln_id(source, vuln)
|
478
|
+
p result
|
479
|
+
rescue DependencyTracker::ApiError => e
|
480
|
+
puts "Exception when calling VulnerabilityApi->get_vulnerability_by_vuln_id: #{e}"
|
481
|
+
end
|
482
|
+
```
|
483
|
+
|
484
|
+
### Parameters
|
485
|
+
|
486
|
+
|
487
|
+
Name | Type | Description | Notes
|
488
|
+
------------- | ------------- | ------------- | -------------
|
489
|
+
**source** | **String**| |
|
490
|
+
**vuln** | **String**| |
|
491
|
+
|
492
|
+
### Return type
|
493
|
+
|
494
|
+
[**Vulnerability**](Vulnerability.md)
|
495
|
+
|
496
|
+
### Authorization
|
497
|
+
|
498
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
499
|
+
|
500
|
+
### HTTP request headers
|
501
|
+
|
502
|
+
- **Content-Type**: Not defined
|
503
|
+
- **Accept**: application/json
|
504
|
+
|
505
|
+
|
506
|
+
## unassign_vulnerability
|
507
|
+
|
508
|
+
> unassign_vulnerability(source, vuln_id, component)
|
509
|
+
|
510
|
+
Removes assignment of a vulnerability from a component
|
511
|
+
|
512
|
+
### Example
|
513
|
+
|
514
|
+
```ruby
|
515
|
+
# load the gem
|
516
|
+
require 'dependency-tracker-client'
|
517
|
+
# setup authorization
|
518
|
+
DependencyTracker.configure do |config|
|
519
|
+
# Configure API key authorization: X-Api-Key
|
520
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
521
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
522
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
523
|
+
end
|
524
|
+
|
525
|
+
api_instance = DependencyTracker::VulnerabilityApi.new
|
526
|
+
source = 'source_example' # String | The vulnerability source
|
527
|
+
vuln_id = 'vuln_id_example' # String | The vulnId
|
528
|
+
component = 'component_example' # String | The UUID of the component
|
529
|
+
|
530
|
+
begin
|
531
|
+
#Removes assignment of a vulnerability from a component
|
532
|
+
api_instance.unassign_vulnerability(source, vuln_id, component)
|
533
|
+
rescue DependencyTracker::ApiError => e
|
534
|
+
puts "Exception when calling VulnerabilityApi->unassign_vulnerability: #{e}"
|
535
|
+
end
|
536
|
+
```
|
537
|
+
|
538
|
+
### Parameters
|
539
|
+
|
540
|
+
|
541
|
+
Name | Type | Description | Notes
|
542
|
+
------------- | ------------- | ------------- | -------------
|
543
|
+
**source** | **String**| The vulnerability source |
|
544
|
+
**vuln_id** | **String**| The vulnId |
|
545
|
+
**component** | **String**| The UUID of the component |
|
546
|
+
|
547
|
+
### Return type
|
548
|
+
|
549
|
+
nil (empty response body)
|
550
|
+
|
551
|
+
### Authorization
|
552
|
+
|
553
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
554
|
+
|
555
|
+
### HTTP request headers
|
556
|
+
|
557
|
+
- **Content-Type**: Not defined
|
558
|
+
- **Accept**: Not defined
|
559
|
+
|
560
|
+
|
561
|
+
## unassign_vulnerability1
|
562
|
+
|
563
|
+
> unassign_vulnerability1(uuid, component)
|
564
|
+
|
565
|
+
Removes assignment of a vulnerability from a component
|
566
|
+
|
567
|
+
### Example
|
568
|
+
|
569
|
+
```ruby
|
570
|
+
# load the gem
|
571
|
+
require 'dependency-tracker-client'
|
572
|
+
# setup authorization
|
573
|
+
DependencyTracker.configure do |config|
|
574
|
+
# Configure API key authorization: X-Api-Key
|
575
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
576
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
577
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
578
|
+
end
|
579
|
+
|
580
|
+
api_instance = DependencyTracker::VulnerabilityApi.new
|
581
|
+
uuid = 'uuid_example' # String | The UUID of the vulnerability
|
582
|
+
component = 'component_example' # String | The UUID of the component
|
583
|
+
|
584
|
+
begin
|
585
|
+
#Removes assignment of a vulnerability from a component
|
586
|
+
api_instance.unassign_vulnerability1(uuid, component)
|
587
|
+
rescue DependencyTracker::ApiError => e
|
588
|
+
puts "Exception when calling VulnerabilityApi->unassign_vulnerability1: #{e}"
|
589
|
+
end
|
590
|
+
```
|
591
|
+
|
592
|
+
### Parameters
|
593
|
+
|
594
|
+
|
595
|
+
Name | Type | Description | Notes
|
596
|
+
------------- | ------------- | ------------- | -------------
|
597
|
+
**uuid** | **String**| The UUID of the vulnerability |
|
598
|
+
**component** | **String**| The UUID of the component |
|
599
|
+
|
600
|
+
### Return type
|
601
|
+
|
602
|
+
nil (empty response body)
|
603
|
+
|
604
|
+
### Authorization
|
605
|
+
|
606
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
607
|
+
|
608
|
+
### HTTP request headers
|
609
|
+
|
610
|
+
- **Content-Type**: Not defined
|
611
|
+
- **Accept**: Not defined
|
612
|
+
|
613
|
+
|
614
|
+
## update_vulnerability
|
615
|
+
|
616
|
+
> Project update_vulnerability(opts)
|
617
|
+
|
618
|
+
Updates an internal vulnerability
|
619
|
+
|
620
|
+
### Example
|
621
|
+
|
622
|
+
```ruby
|
623
|
+
# load the gem
|
624
|
+
require 'dependency-tracker-client'
|
625
|
+
# setup authorization
|
626
|
+
DependencyTracker.configure do |config|
|
627
|
+
# Configure API key authorization: X-Api-Key
|
628
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
629
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
630
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
631
|
+
end
|
632
|
+
|
633
|
+
api_instance = DependencyTracker::VulnerabilityApi.new
|
634
|
+
opts = {
|
635
|
+
body: DependencyTracker::Vulnerability.new # Vulnerability |
|
636
|
+
}
|
637
|
+
|
638
|
+
begin
|
639
|
+
#Updates an internal vulnerability
|
640
|
+
result = api_instance.update_vulnerability(opts)
|
641
|
+
p result
|
642
|
+
rescue DependencyTracker::ApiError => e
|
643
|
+
puts "Exception when calling VulnerabilityApi->update_vulnerability: #{e}"
|
644
|
+
end
|
645
|
+
```
|
646
|
+
|
647
|
+
### Parameters
|
648
|
+
|
649
|
+
|
650
|
+
Name | Type | Description | Notes
|
651
|
+
------------- | ------------- | ------------- | -------------
|
652
|
+
**body** | [**Vulnerability**](Vulnerability.md)| | [optional]
|
653
|
+
|
654
|
+
### Return type
|
655
|
+
|
656
|
+
[**Project**](Project.md)
|
657
|
+
|
658
|
+
### Authorization
|
659
|
+
|
660
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
661
|
+
|
662
|
+
### HTTP request headers
|
663
|
+
|
664
|
+
- **Content-Type**: application/json
|
665
|
+
- **Accept**: application/json
|
666
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# DependencyTracker::VulnerabilityMetrics
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**year** | **Integer** | | [optional]
|
8
|
+
**month** | **Integer** | | [optional]
|
9
|
+
**count** | **Integer** | | [optional]
|
10
|
+
**measured_at** | **Integer** | |
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'DependencyTracker'
|
16
|
+
|
17
|
+
instance = DependencyTracker::VulnerabilityMetrics.new(year: null,
|
18
|
+
month: null,
|
19
|
+
count: null,
|
20
|
+
measured_at: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|