Skip to content

Commit

Permalink
chore: regenerating from latest spec for image vuln descriptions (#60)
Browse files Browse the repository at this point in the history
Regenerate the models from latest enterprise API spec to include
descriptions on image package vulnerability response

Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
  • Loading branch information
westonsteimel authored Jan 12, 2024
1 parent eac0f1b commit 3adb23e
Show file tree
Hide file tree
Showing 10 changed files with 219 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OPENAPI_GENERATOR_VERSION = v6.0.0

# --- anchore enterprise references
# a git tag/branch/commit within anchore/enterprise repo
ENTERPRISE_REF = 4add4d28e7187c74ec5d509a9dd8df3d1b6436b4
ENTERPRISE_REF = 69076f95de2e2c329790b41058fa2ca000335f73
ENTERPRISE_ROOT = $(PROJECT_ROOT)/enterprise
ENTERPRISE_OPENAPI_DOC = $(PROJECT_ROOT)/anchore-api-swagger-$(ENTERPRISE_REF).yaml

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12305,6 +12305,9 @@ components:
id:
type: string
description: NVD Vulnerability ID
description:
description: The full NVD description text for the vulnerability
type: string
cvss_v2:
$ref: '#/components/schemas/CVSSV2Scores'
cvss_v3:
Expand Down Expand Up @@ -12413,6 +12416,9 @@ components:
vuln:
type: string
description: The vulnerability identifier, such as CVE-2017-100, or RHSA-2017123
description:
description: The full description text for the vulnerability
type: string
fix:
type: string
description: The package containing a fix, if available
Expand Down
22 changes: 22 additions & 0 deletions pkg/enterprise/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14924,11 +14924,15 @@ components:
base_score: 0.8008281904610115
impact_score: 1.4658129805029452
exploitability_score: 6.027456183070403
description: description
id: id
properties:
id:
description: NVD Vulnerability ID
type: string
description:
description: The full NVD description text for the vulnerability
type: string
cvss_v2:
$ref: '#/components/schemas/CVSSV2Scores'
cvss_v3:
Expand Down Expand Up @@ -15083,6 +15087,7 @@ components:
base_score: 0.8008281904610115
impact_score: 1.4658129805029452
exploitability_score: 6.027456183070403
description: description
id: id
- cvss_v3:
base_score: 5.962133916683182
Expand All @@ -15092,6 +15097,7 @@ components:
base_score: 0.8008281904610115
impact_score: 1.4658129805029452
exploitability_score: 6.027456183070403
description: description
id: id
vendor_data:
- cvss_v3:
Expand All @@ -15112,6 +15118,7 @@ components:
impact_score: 1.4658129805029452
exploitability_score: 6.027456183070403
id: id
description: description
package_type: package_type
package_cpe: package_cpe
url: url
Expand All @@ -15128,6 +15135,9 @@ components:
vuln:
description: "The vulnerability identifier, such as CVE-2017-100, or RHSA-2017123"
type: string
description:
description: The full description text for the vulnerability
type: string
fix:
description: "The package containing a fix, if available"
type: string
Expand Down Expand Up @@ -17663,6 +17673,7 @@ components:
base_score: 0.8008281904610115
impact_score: 1.4658129805029452
exploitability_score: 6.027456183070403
description: description
id: id
- cvss_v3:
base_score: 5.962133916683182
Expand All @@ -17672,6 +17683,7 @@ components:
base_score: 0.8008281904610115
impact_score: 1.4658129805029452
exploitability_score: 6.027456183070403
description: description
id: id
vendor_data:
- cvss_v3:
Expand All @@ -17692,6 +17704,7 @@ components:
impact_score: 1.4658129805029452
exploitability_score: 6.027456183070403
id: id
description: description
package_type: package_type
package_cpe: package_cpe
url: url
Expand All @@ -17716,6 +17729,7 @@ components:
base_score: 0.8008281904610115
impact_score: 1.4658129805029452
exploitability_score: 6.027456183070403
description: description
id: id
- cvss_v3:
base_score: 5.962133916683182
Expand All @@ -17725,6 +17739,7 @@ components:
base_score: 0.8008281904610115
impact_score: 1.4658129805029452
exploitability_score: 6.027456183070403
description: description
id: id
vendor_data:
- cvss_v3:
Expand All @@ -17745,6 +17760,7 @@ components:
impact_score: 1.4658129805029452
exploitability_score: 6.027456183070403
id: id
description: description
package_type: package_type
package_cpe: package_cpe
url: url
Expand Down Expand Up @@ -18247,6 +18263,7 @@ components:
base_score: 0.8008281904610115
impact_score: 1.4658129805029452
exploitability_score: 6.027456183070403
description: description
id: id
- cvss_v3:
base_score: 5.962133916683182
Expand All @@ -18256,6 +18273,7 @@ components:
base_score: 0.8008281904610115
impact_score: 1.4658129805029452
exploitability_score: 6.027456183070403
description: description
id: id
vendor_data:
- cvss_v3:
Expand All @@ -18276,6 +18294,7 @@ components:
impact_score: 1.4658129805029452
exploitability_score: 6.027456183070403
id: id
description: description
package_type: package_type
package_cpe: package_cpe
url: url
Expand All @@ -18300,6 +18319,7 @@ components:
base_score: 0.8008281904610115
impact_score: 1.4658129805029452
exploitability_score: 6.027456183070403
description: description
id: id
- cvss_v3:
base_score: 5.962133916683182
Expand All @@ -18309,6 +18329,7 @@ components:
base_score: 0.8008281904610115
impact_score: 1.4658129805029452
exploitability_score: 6.027456183070403
description: description
id: id
vendor_data:
- cvss_v3:
Expand All @@ -18329,6 +18350,7 @@ components:
impact_score: 1.4658129805029452
exploitability_score: 6.027456183070403
id: id
description: description
package_type: package_type
package_cpe: package_cpe
url: url
Expand Down
26 changes: 26 additions & 0 deletions pkg/enterprise/docs/ImagePackageVulnerability.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Vuln** | Pointer to **string** | The vulnerability identifier, such as CVE-2017-100, or RHSA-2017123 | [optional]
**Description** | Pointer to **string** | The full description text for the vulnerability | [optional]
**Fix** | Pointer to **string** | The package containing a fix, if available | [optional]
**Severity** | Pointer to **string** | The severity of the vulnerability | [optional]
**Package** | Pointer to **string** | The package name and version that are vulnerable in the image | [optional]
Expand Down Expand Up @@ -67,6 +68,31 @@ SetVuln sets Vuln field to given value.

HasVuln returns a boolean if a field has been set.

### GetDescription

`func (o *ImagePackageVulnerability) GetDescription() string`

GetDescription returns the Description field if non-nil, zero value otherwise.

### GetDescriptionOk

`func (o *ImagePackageVulnerability) GetDescriptionOk() (*string, bool)`

GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetDescription

`func (o *ImagePackageVulnerability) SetDescription(v string)`

SetDescription sets Description field to given value.

### HasDescription

`func (o *ImagePackageVulnerability) HasDescription() bool`

HasDescription returns a boolean if a field has been set.

### GetFix

`func (o *ImagePackageVulnerability) GetFix() string`
Expand Down
26 changes: 26 additions & 0 deletions pkg/enterprise/docs/NvdDataObject.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | Pointer to **string** | NVD Vulnerability ID | [optional]
**Description** | Pointer to **string** | The full NVD description text for the vulnerability | [optional]
**CvssV2** | Pointer to [**CVSSV2Scores**](CVSSV2Scores.md) | | [optional]
**CvssV3** | Pointer to [**CVSSV3Scores**](CVSSV3Scores.md) | | [optional]

Expand Down Expand Up @@ -52,6 +53,31 @@ SetId sets Id field to given value.

HasId returns a boolean if a field has been set.

### GetDescription

`func (o *NvdDataObject) GetDescription() string`

GetDescription returns the Description field if non-nil, zero value otherwise.

### GetDescriptionOk

`func (o *NvdDataObject) GetDescriptionOk() (*string, bool)`

GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetDescription

`func (o *NvdDataObject) SetDescription(v string)`

SetDescription sets Description field to given value.

### HasDescription

`func (o *NvdDataObject) HasDescription() bool`

HasDescription returns a boolean if a field has been set.

### GetCvssV2

`func (o *NvdDataObject) GetCvssV2() CVSSV2Scores`
Expand Down
26 changes: 26 additions & 0 deletions pkg/enterprise/docs/PackageVulnerability.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Vuln** | Pointer to **string** | The vulnerability identifier, such as CVE-2017-100, or RHSA-2017123 | [optional]
**Description** | Pointer to **string** | The full description text for the vulnerability | [optional]
**Fix** | Pointer to **string** | The package containing a fix, if available | [optional]
**Severity** | Pointer to **string** | The severity of the vulnerability | [optional]
**Package** | Pointer to **string** | The package name and version that are vulnerable in the image | [optional]
Expand Down Expand Up @@ -66,6 +67,31 @@ SetVuln sets Vuln field to given value.

HasVuln returns a boolean if a field has been set.

### GetDescription

`func (o *PackageVulnerability) GetDescription() string`

GetDescription returns the Description field if non-nil, zero value otherwise.

### GetDescriptionOk

`func (o *PackageVulnerability) GetDescriptionOk() (*string, bool)`

GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetDescription

`func (o *PackageVulnerability) SetDescription(v string)`

SetDescription sets Description field to given value.

### HasDescription

`func (o *PackageVulnerability) HasDescription() bool`

HasDescription returns a boolean if a field has been set.

### GetFix

`func (o *PackageVulnerability) GetFix() string`
Expand Down
37 changes: 37 additions & 0 deletions pkg/enterprise/model_image_package_vulnerability.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3adb23e

Please sign in to comment.