@cyclonedx/cyclonedx-library 1.9.2 → 1.11.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.
- package/README.md +23 -2
- package/dist.d/_helpers/packageJson.d.ts +2 -2
- package/dist.d/_helpers/packageUrl.d.ts +3 -3
- package/dist.d/_helpers/sortable.d.ts +38 -2
- package/dist.d/_helpers/sortable.d.ts.map +1 -1
- package/dist.d/builders/fromNodePackageJson.node.d.ts +5 -5
- package/dist.d/builders/fromNodePackageJson.node.d.ts.map +1 -1
- package/dist.d/enums/index.d.ts +2 -0
- package/dist.d/enums/index.d.ts.map +1 -1
- package/dist.d/enums/vulnerability/affectStatus.d.ts +25 -0
- package/dist.d/enums/vulnerability/affectStatus.d.ts.map +1 -0
- package/dist.d/enums/vulnerability/analysisJustification.d.ts +31 -0
- package/dist.d/enums/vulnerability/analysisJustification.d.ts.map +1 -0
- package/dist.d/enums/vulnerability/analysisResponse.d.ts +31 -0
- package/dist.d/enums/vulnerability/analysisResponse.d.ts.map +1 -0
- package/dist.d/enums/vulnerability/analysisState.d.ts +28 -0
- package/dist.d/enums/vulnerability/analysisState.d.ts.map +1 -0
- package/dist.d/enums/vulnerability/index.d.ts +25 -0
- package/dist.d/enums/vulnerability/index.d.ts.map +1 -0
- package/dist.d/enums/vulnerability/ratingMethod.d.ts +35 -0
- package/dist.d/enums/vulnerability/ratingMethod.d.ts.map +1 -0
- package/dist.d/enums/vulnerability/severity.d.ts +34 -0
- package/dist.d/enums/vulnerability/severity.d.ts.map +1 -0
- package/dist.d/factories/fromNodePackageJson.node.d.ts +5 -5
- package/dist.d/factories/fromNodePackageJson.node.d.ts.map +1 -1
- package/dist.d/factories/license.d.ts +4 -3
- package/dist.d/factories/license.d.ts.map +1 -1
- package/dist.d/factories/packageUrl.d.ts +1 -1
- package/dist.d/factories/packageUrl.d.ts.map +1 -1
- package/dist.d/models/attachment.d.ts +3 -4
- package/dist.d/models/attachment.d.ts.map +1 -1
- package/dist.d/models/bom.d.ts +10 -8
- package/dist.d/models/bom.d.ts.map +1 -1
- package/dist.d/models/component.d.ts +13 -13
- package/dist.d/models/component.d.ts.map +1 -1
- package/dist.d/models/externalReference.d.ts +7 -7
- package/dist.d/models/externalReference.d.ts.map +1 -1
- package/dist.d/models/hash.d.ts +2 -2
- package/dist.d/models/hash.d.ts.map +1 -1
- package/dist.d/models/index.d.ts +2 -0
- package/dist.d/models/index.d.ts.map +1 -1
- package/dist.d/models/license.d.ts +11 -12
- package/dist.d/models/license.d.ts.map +1 -1
- package/dist.d/models/metadata.d.ts +4 -5
- package/dist.d/models/metadata.d.ts.map +1 -1
- package/dist.d/models/organizationalContact.d.ts +6 -6
- package/dist.d/models/organizationalContact.d.ts.map +1 -1
- package/dist.d/models/organizationalEntity.d.ts +8 -4
- package/dist.d/models/organizationalEntity.d.ts.map +1 -1
- package/dist.d/models/property.d.ts +5 -4
- package/dist.d/models/property.d.ts.map +1 -1
- package/dist.d/models/swid.d.ts +7 -8
- package/dist.d/models/swid.d.ts.map +1 -1
- package/dist.d/models/tool.d.ts +6 -6
- package/dist.d/models/tool.d.ts.map +1 -1
- package/dist.d/models/vulnerability/advisory.d.ts +32 -0
- package/dist.d/models/vulnerability/advisory.d.ts.map +1 -0
- package/dist.d/models/vulnerability/affect.d.ts +55 -0
- package/dist.d/models/vulnerability/affect.d.ts.map +1 -0
- package/dist.d/models/vulnerability/analysis.d.ts +36 -0
- package/dist.d/models/vulnerability/analysis.d.ts.map +1 -0
- package/dist.d/models/vulnerability/credits.d.ts +32 -0
- package/dist.d/models/vulnerability/credits.d.ts.map +1 -0
- package/dist.d/models/vulnerability/index.d.ts +27 -0
- package/dist.d/models/vulnerability/index.d.ts.map +1 -0
- package/dist.d/models/vulnerability/rating.d.ts +43 -0
- package/dist.d/models/vulnerability/rating.d.ts.map +1 -0
- package/dist.d/models/vulnerability/reference.d.ts +42 -0
- package/dist.d/models/vulnerability/reference.d.ts.map +1 -0
- package/dist.d/{_helpers/sortableSet.d.ts → models/vulnerability/source.d.ts} +10 -6
- package/dist.d/models/vulnerability/source.d.ts.map +1 -0
- package/dist.d/models/vulnerability/vulnerability.d.ts +77 -0
- package/dist.d/models/vulnerability/vulnerability.d.ts.map +1 -0
- package/dist.d/serialize/baseSerializer.d.ts +5 -5
- package/dist.d/serialize/baseSerializer.d.ts.map +1 -1
- package/dist.d/serialize/bomRefDiscriminator.d.ts +1 -1
- package/dist.d/serialize/bomRefDiscriminator.d.ts.map +1 -1
- package/dist.d/serialize/json/normalize.d.ts +21 -22
- package/dist.d/serialize/json/normalize.d.ts.map +1 -1
- package/dist.d/serialize/json/types.d.ts +10 -9
- package/dist.d/serialize/json/types.d.ts.map +1 -1
- package/dist.d/serialize/jsonSerializer.d.ts +5 -5
- package/dist.d/serialize/jsonSerializer.d.ts.map +1 -1
- package/dist.d/serialize/types.d.ts +2 -2
- package/dist.d/serialize/types.d.ts.map +1 -1
- package/dist.d/serialize/xml/normalize.d.ts +22 -23
- package/dist.d/serialize/xml/normalize.d.ts.map +1 -1
- package/dist.d/serialize/xml/types.d.ts +6 -7
- package/dist.d/serialize/xml/types.d.ts.map +1 -1
- package/dist.d/serialize/xmlBaseSerializer.d.ts +5 -5
- package/dist.d/serialize/xmlBaseSerializer.d.ts.map +1 -1
- package/dist.d/serialize/xmlSerializer.node.d.ts +2 -2
- package/dist.d/serialize/xmlSerializer.node.d.ts.map +1 -1
- package/dist.d/serialize/xmlSerializer.web.d.ts +2 -2
- package/dist.d/serialize/xmlSerializer.web.d.ts.map +1 -1
- package/dist.d/spdx.d.ts +4 -4
- package/dist.d/spdx.d.ts.map +1 -1
- package/dist.d/spec.d.ts +2 -4
- package/dist.d/spec.d.ts.map +1 -1
- package/dist.d/types/cpe.d.ts +3 -3
- package/dist.d/types/cwe.d.ts +37 -0
- package/dist.d/types/cwe.d.ts.map +1 -0
- package/dist.d/types/index.d.ts +1 -0
- package/dist.d/types/index.d.ts.map +1 -1
- package/dist.d/types/integer.d.ts +3 -3
- package/dist.d/types/mimeType.d.ts +1 -1
- package/dist.d/types/urn.d.ts +3 -3
- package/dist.node/_helpers/sortable.js +39 -0
- package/dist.node/_helpers/sortable.js.map +1 -1
- package/dist.node/builders/fromNodePackageJson.node.js.map +1 -1
- package/dist.node/enums/index.js +2 -0
- package/dist.node/enums/index.js.map +1 -1
- package/dist.node/enums/vulnerability/affectStatus.js +28 -0
- package/dist.node/enums/vulnerability/affectStatus.js.map +1 -0
- package/dist.node/enums/vulnerability/analysisJustification.js +34 -0
- package/dist.node/enums/vulnerability/analysisJustification.js.map +1 -0
- package/dist.node/enums/vulnerability/analysisResponse.js +34 -0
- package/dist.node/enums/vulnerability/analysisResponse.js.map +1 -0
- package/dist.node/enums/vulnerability/analysisState.js +31 -0
- package/dist.node/enums/vulnerability/analysisState.js.map +1 -0
- package/dist.node/enums/vulnerability/index.js +41 -0
- package/dist.node/enums/vulnerability/index.js.map +1 -0
- package/dist.node/enums/vulnerability/ratingMethod.js +30 -0
- package/dist.node/enums/vulnerability/ratingMethod.js.map +1 -0
- package/dist.node/enums/vulnerability/severity.js +32 -0
- package/dist.node/enums/vulnerability/severity.js.map +1 -0
- package/dist.node/factories/fromNodePackageJson.node.js.map +1 -1
- package/dist.node/factories/license.js.map +1 -1
- package/dist.node/models/attachment.js.map +1 -1
- package/dist.node/models/bom.js +2 -0
- package/dist.node/models/bom.js.map +1 -1
- package/dist.node/models/component.js +3 -3
- package/dist.node/models/component.js.map +1 -1
- package/dist.node/models/externalReference.js +2 -2
- package/dist.node/models/externalReference.js.map +1 -1
- package/dist.node/models/index.js +2 -0
- package/dist.node/models/index.js.map +1 -1
- package/dist.node/models/license.js.map +1 -1
- package/dist.node/models/metadata.js.map +1 -1
- package/dist.node/models/organizationalContact.js +2 -2
- package/dist.node/models/organizationalContact.js.map +1 -1
- package/dist.node/models/organizationalEntity.js +10 -1
- package/dist.node/models/organizationalEntity.js.map +1 -1
- package/dist.node/models/property.js +2 -2
- package/dist.node/models/property.js.map +1 -1
- package/dist.node/models/swid.js.map +1 -1
- package/dist.node/models/tool.js +2 -2
- package/dist.node/models/tool.js.map +1 -1
- package/dist.node/models/vulnerability/advisory.js +32 -0
- package/dist.node/models/vulnerability/advisory.js.map +1 -0
- package/dist.node/models/vulnerability/affect.js +49 -0
- package/dist.node/models/vulnerability/affect.js.map +1 -0
- package/dist.node/models/vulnerability/analysis.js +32 -0
- package/dist.node/models/vulnerability/analysis.js.map +1 -0
- package/dist.node/models/vulnerability/credits.js +31 -0
- package/dist.node/models/vulnerability/credits.js.map +1 -0
- package/dist.node/models/vulnerability/index.js +43 -0
- package/dist.node/models/vulnerability/index.js.map +1 -0
- package/dist.node/models/vulnerability/rating.js +36 -0
- package/dist.node/models/vulnerability/rating.js.map +1 -0
- package/dist.node/models/vulnerability/reference.js +32 -0
- package/dist.node/models/vulnerability/reference.js.map +1 -0
- package/dist.node/{_helpers/sortableSet.js → models/vulnerability/source.js} +7 -6
- package/dist.node/models/vulnerability/source.js.map +1 -0
- package/dist.node/models/vulnerability/vulnerability.js +73 -0
- package/dist.node/models/vulnerability/vulnerability.js.map +1 -0
- package/dist.node/resources.node.js +16 -16
- package/dist.node/resources.node.js.map +1 -1
- package/dist.node/serialize/bomRefDiscriminator.js +1 -1
- package/dist.node/serialize/bomRefDiscriminator.js.map +1 -1
- package/dist.node/serialize/json/normalize.js +14 -14
- package/dist.node/serialize/json/normalize.js.map +1 -1
- package/dist.node/serialize/json/types.js.map +1 -1
- package/dist.node/serialize/xml/normalize.js +14 -14
- package/dist.node/serialize/xml/normalize.js.map +1 -1
- package/dist.node/serialize/xml/types.js.map +1 -1
- package/dist.node/serialize/xmlBaseSerializer.js +2 -2
- package/dist.node/serialize/xmlBaseSerializer.js.map +1 -1
- package/dist.node/spec.js +5 -5
- package/dist.node/spec.js.map +1 -1
- package/dist.node/types/cwe.js +31 -0
- package/dist.node/types/cwe.js.map +1 -0
- package/dist.node/types/index.js +1 -0
- package/dist.node/types/index.js.map +1 -1
- package/dist.web/lib.dev.js +1023 -204
- package/dist.web/lib.dev.js.map +1 -1
- package/dist.web/lib.js +1 -1
- package/libs/universal-node-xml/index.d.ts +2 -2
- package/libs/universal-node-xml/index.js +0 -1
- package/libs/universal-node-xml/stringifiers/helpers.js +1 -2
- package/libs/universal-node-xml/stringifiers/xmlbuilder2.js +3 -4
- package/package.json +13 -6
- package/src/_helpers/packageJson.ts +2 -2
- package/src/_helpers/packageUrl.ts +3 -3
- package/src/_helpers/sortable.ts +72 -2
- package/src/builders/fromNodePackageJson.node.ts +12 -11
- package/src/enums/index.ts +3 -0
- package/src/enums/vulnerability/affectStatus.ts +25 -0
- package/src/enums/vulnerability/analysisJustification.ts +31 -0
- package/src/enums/vulnerability/analysisResponse.ts +33 -0
- package/src/enums/vulnerability/analysisState.ts +28 -0
- package/src/enums/vulnerability/index.ts +25 -0
- package/src/enums/vulnerability/ratingMethod.ts +35 -0
- package/src/enums/vulnerability/severity.ts +34 -0
- package/src/factories/fromNodePackageJson.node.ts +17 -15
- package/src/factories/license.ts +4 -3
- package/src/factories/packageUrl.ts +1 -1
- package/src/models/attachment.ts +3 -3
- package/src/models/bom.ts +14 -9
- package/src/models/component.ts +17 -15
- package/src/models/externalReference.ts +7 -6
- package/src/models/hash.ts +2 -2
- package/src/models/index.ts +3 -0
- package/src/models/license.ts +18 -13
- package/src/models/metadata.ts +4 -4
- package/src/models/organizationalContact.ts +6 -6
- package/src/models/organizationalEntity.ts +15 -3
- package/src/models/property.ts +5 -4
- package/src/models/swid.ts +9 -8
- package/src/models/tool.ts +6 -5
- package/src/{_helpers/sortableSet.ts → models/vulnerability/advisory.ts} +14 -8
- package/src/models/vulnerability/affect.ts +72 -0
- package/src/models/vulnerability/analysis.ts +44 -0
- package/src/models/vulnerability/credits.ts +38 -0
- package/src/models/vulnerability/index.ts +27 -0
- package/src/models/vulnerability/rating.ts +54 -0
- package/src/models/vulnerability/reference.ts +47 -0
- package/src/models/vulnerability/source.ts +35 -0
- package/src/models/vulnerability/vulnerability.ts +103 -0
- package/src/resources.node.ts +16 -16
- package/src/serialize/baseSerializer.ts +6 -6
- package/src/serialize/bomRefDiscriminator.ts +3 -3
- package/src/serialize/index.common.ts +3 -3
- package/src/serialize/index.node.ts +1 -1
- package/src/serialize/index.web.ts +1 -1
- package/src/serialize/json/index.ts +1 -1
- package/src/serialize/json/normalize.ts +24 -25
- package/src/serialize/json/types.ts +11 -11
- package/src/serialize/jsonSerializer.ts +5 -5
- package/src/serialize/types.ts +2 -2
- package/src/serialize/xml/index.ts +1 -1
- package/src/serialize/xml/normalize.ts +25 -25
- package/src/serialize/xml/types.ts +6 -9
- package/src/serialize/xmlBaseSerializer.ts +7 -7
- package/src/serialize/xmlSerializer.node.ts +2 -2
- package/src/serialize/xmlSerializer.web.ts +3 -3
- package/src/spdx.ts +4 -4
- package/src/spec.ts +6 -8
- package/src/types/cpe.ts +3 -3
- package/src/types/cwe.ts +42 -0
- package/src/types/index.ts +1 -0
- package/src/types/integer.ts +3 -3
- package/src/types/mimeType.ts +1 -1
- package/src/types/urn.ts +3 -3
- package/tsconfig.node.json +1 -0
- package/tsconfig.web.json +4 -1
- package/tsdoc.json +16 -0
- package/typedoc.json +17 -0
- package/typedoc.node.json +8 -0
- package/typedoc.web.json +8 -0
- package/webpack.config.js +0 -2
- package/dist.d/_helpers/sortableSet.d.ts.map +0 -1
- package/dist.node/_helpers/sortableSet.js.map +0 -1
package/README.md
CHANGED
|
@@ -38,6 +38,14 @@ written in _TypeScript_ and compiled for the target.
|
|
|
38
38
|
* `ComponentType`
|
|
39
39
|
* `ExternalReferenceType`
|
|
40
40
|
* `HashAlgorithm`
|
|
41
|
+
* Vulnerability related:
|
|
42
|
+
_Release stage is “beta”._ These namespace and enums have been released to third-party developers experimentally for the purpose of collecting feedback. These enums should not be used in production, because their contracts may change without notice.
|
|
43
|
+
* `AffectStatus`
|
|
44
|
+
* `AnalysisJustification`
|
|
45
|
+
* `AnalysisResponse`
|
|
46
|
+
* `AnalysisState`
|
|
47
|
+
* `RatingMethod`
|
|
48
|
+
* `Severity`
|
|
41
49
|
* Data models for the following use cases:
|
|
42
50
|
* `Attachment`
|
|
43
51
|
* `Bom`
|
|
@@ -48,10 +56,21 @@ written in _TypeScript_ and compiled for the target.
|
|
|
48
56
|
* `LicenseExpression`, `NamedLicense`, `SpdxLicense`, `LicenseRepository`
|
|
49
57
|
* `Metadata`
|
|
50
58
|
* `OrganizationalContact`, `OrganizationalContactRepository`
|
|
51
|
-
* `OrganizationalEntity`
|
|
59
|
+
* `OrganizationalEntity`, `OrganizationalEntityRepository`
|
|
52
60
|
* `Property`, `PropertyRepository`
|
|
53
61
|
* `SWID`
|
|
54
62
|
* `Tool`, `ToolRepository`
|
|
63
|
+
* Vulnerability related:
|
|
64
|
+
_Release stage is “beta”._ These namespace and models have been released to third-party developers experimentally for the purpose of collecting feedback. These models should not be used in production, because their contracts may change without notice.
|
|
65
|
+
_Attention_: These models are not yet supported by serializers nor normalizers.
|
|
66
|
+
* `Advisory`, `AdvisoryRepository`
|
|
67
|
+
* `Affect`, `AffectRepository`, `AffectedSingleVersion`, `AffectedVersionRange`, `AffectedVersionRepository`
|
|
68
|
+
* `Analysis`
|
|
69
|
+
* `Credits`
|
|
70
|
+
* `Rating`, `RatingRepository`
|
|
71
|
+
* `Reference`, `ReferenceRepository`
|
|
72
|
+
* `Source`
|
|
73
|
+
* `Vulnerability`, `VulnerabilityRepository`
|
|
55
74
|
* Factories for the following use cases:
|
|
56
75
|
* Create data models from any license descriptor string
|
|
57
76
|
* Create `PackageURL` from `Component` data models
|
|
@@ -138,6 +157,8 @@ bom.metadata.component.dependencies.add(componentA.bomRef)
|
|
|
138
157
|
There is no pre-rendered documentation at the time.
|
|
139
158
|
Instead, there are annotated type definitions, so that your IDE and tools may pick up the documentation when you use this library downstream.
|
|
140
159
|
|
|
160
|
+
Additionally, there is a prepared set of configs for [TypeDoc](https://typedoc.org), so that you can build the API documentation from source via `npm run api-doc`.
|
|
161
|
+
|
|
141
162
|
## Development & Contributing
|
|
142
163
|
|
|
143
164
|
Feel free to open issues, bugreports or pull requests.
|
|
@@ -154,7 +175,7 @@ See the [LICENSE][license_file] file for the full license.
|
|
|
154
175
|
[contributing_file]: https://github.com/CycloneDX/cyclonedx-javascript-library/blob/main/CONTRIBUTING.md
|
|
155
176
|
[examples]: https://github.com/CycloneDX/cyclonedx-javascript-library/tree/main/examples/README.md
|
|
156
177
|
|
|
157
|
-
[shield_gh-workflow-test]:
|
|
178
|
+
[shield_gh-workflow-test]: https://img.shields.io/github/actions/workflow/status/CycloneDX/cyclonedx-javascript-library/nodejs.yml?branch=main&logo=GitHub&logoColor=white "tests"
|
|
158
179
|
[shield_npm-version]: https://img.shields.io/npm/v/@cyclonedx/cyclonedx-library?logo=npm&logoColor=white "npm"
|
|
159
180
|
[shield_license]: https://img.shields.io/github/license/CycloneDX/cyclonedx-javascript-library?logo=open%20source%20initiative&logoColor=white "license"
|
|
160
181
|
[shield_website]: https://img.shields.io/badge/https://-cyclonedx.org-blue.svg "homepage"
|
|
@@ -22,8 +22,8 @@ Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
|
22
22
|
*/
|
|
23
23
|
export declare function splitNameGroup(data: string): [string, string?];
|
|
24
24
|
/**
|
|
25
|
-
* @see {@link https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/package.json PackageJson spec}
|
|
26
|
-
* @see {@link https://docs.npmjs.com/cli/v8/configuring-npm/package-json PackageJson description}
|
|
25
|
+
* @see {@link https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/package.json | PackageJson spec}
|
|
26
|
+
* @see {@link https://docs.npmjs.com/cli/v8/configuring-npm/package-json | PackageJson description}
|
|
27
27
|
*/
|
|
28
28
|
export interface PackageJson {
|
|
29
29
|
name?: string;
|
|
@@ -18,11 +18,11 @@ Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
|
18
18
|
*/
|
|
19
19
|
/**
|
|
20
20
|
* Known PURL qualifier names.
|
|
21
|
-
* To be used until {@link https://github.com/package-url/packageurl-js/pull/34} gets merged and released,
|
|
22
|
-
* and {@link https://github.com/package-url/packageurl-js/issues/35} gets sorted out.
|
|
21
|
+
* To be used until {@link https://github.com/package-url/packageurl-js/pull/34 | PackageURL PR#34} gets merged and released,
|
|
22
|
+
* and {@link https://github.com/package-url/packageurl-js/issues/35 | PackageURL Issue#35} gets sorted out.
|
|
23
23
|
*
|
|
24
24
|
* For the list/spec of the well-known keys,
|
|
25
|
-
* see {@link https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst#known-qualifiers-keyvalue-pairs}
|
|
25
|
+
* see {@link https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst#known-qualifiers-keyvalue-pairs | known qualifiers key/value-pairs}
|
|
26
26
|
*/
|
|
27
27
|
export declare const enum PackageUrlQualifierNames {
|
|
28
28
|
DownloadURL = "download_url",
|
|
@@ -16,7 +16,43 @@ limitations under the License.
|
|
|
16
16
|
SPDX-License-Identifier: Apache-2.0
|
|
17
17
|
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
18
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
import type { Stringable } from './stringable';
|
|
20
|
+
export interface Sortable<TItem> {
|
|
21
|
+
sorted: () => TItem[];
|
|
21
22
|
}
|
|
23
|
+
export interface Comparable<TOther> {
|
|
24
|
+
/**
|
|
25
|
+
* Compare one object with another.
|
|
26
|
+
*
|
|
27
|
+
* The purpose of this method is not to test for equality, but have deterministic comparability.
|
|
28
|
+
* As long as this method is deterministic, there is no need for a proper ordering in any result/downstream.
|
|
29
|
+
*/
|
|
30
|
+
compare: (other: TOther) => number;
|
|
31
|
+
}
|
|
32
|
+
declare const compareObjectsSymbol: unique symbol;
|
|
33
|
+
export type SortableIterable<TItem> = Iterable<TItem> & Sortable<TItem>;
|
|
34
|
+
declare abstract class SortableSet<TItem> extends Set<TItem> implements SortableIterable<TItem>, Comparable<Sortable<TItem>> {
|
|
35
|
+
/**
|
|
36
|
+
* Comparator function to apply to two items.
|
|
37
|
+
*/
|
|
38
|
+
protected abstract [compareObjectsSymbol](a: TItem, b: TItem): number;
|
|
39
|
+
/**
|
|
40
|
+
* Get a sorted array of all items in the collection..
|
|
41
|
+
*/
|
|
42
|
+
sorted(): TItem[];
|
|
43
|
+
/**
|
|
44
|
+
* Comparator function to apply to two objects of the collection..
|
|
45
|
+
*/
|
|
46
|
+
compare(other: Sortable<TItem>): number;
|
|
47
|
+
}
|
|
48
|
+
export declare class SortableComparables<TItem extends Comparable<TItem>> extends SortableSet<TItem> {
|
|
49
|
+
protected [compareObjectsSymbol](a: TItem, b: TItem): number;
|
|
50
|
+
}
|
|
51
|
+
export declare class SortableStringables<TItem extends Stringable = Stringable> extends SortableSet<TItem> {
|
|
52
|
+
protected [compareObjectsSymbol](a: TItem, b: TItem): number;
|
|
53
|
+
}
|
|
54
|
+
export declare class SortableNumbers<TItem extends number = number> extends SortableSet<TItem> {
|
|
55
|
+
protected [compareObjectsSymbol](a: TItem, b: TItem): number;
|
|
56
|
+
}
|
|
57
|
+
export {};
|
|
22
58
|
//# sourceMappingURL=sortable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sortable.d.ts","sourceRoot":"","sources":["../../src/_helpers/sortable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,MAAM,WAAW,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"sortable.d.ts","sourceRoot":"","sources":["../../src/_helpers/sortable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE9C,MAAM,WAAW,QAAQ,CAAC,KAAK;IAC7B,MAAM,EAAE,MAAM,KAAK,EAAE,CAAA;CACtB;AAED,MAAM,WAAW,UAAU,CAAC,MAAM;IAChC;;;;;OAKG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;CACnC;AAED,QAAA,MAAM,oBAAoB,eAAsC,CAAA;AAEhE,MAAM,MAAM,gBAAgB,CAAC,KAAK,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;AAEvE,uBAAe,WAAW,CAAC,KAAK,CAAE,SAAQ,GAAG,CAAC,KAAK,CAAE,YAAW,gBAAgB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClH;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,CAAC,oBAAoB,CAAC,CAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM;IAEtE;;OAEG;IACH,MAAM,IAAK,KAAK,EAAE;IAIlB;;OAEG;IACH,OAAO,CAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,GAAG,MAAM;CAkBzC;AAED,qBAAa,mBAAmB,CAAC,KAAK,SAAS,UAAU,CAAC,KAAK,CAAC,CAAE,SAAQ,WAAW,CAAC,KAAK,CAAC;IAC1F,SAAS,CAAC,CAAC,oBAAoB,CAAC,CAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM;CAG9D;AAED,qBAAa,mBAAmB,CAAC,KAAK,SAAS,UAAU,GAAG,UAAU,CAAE,SAAQ,WAAW,CAAC,KAAK,CAAC;IAChG,SAAS,CAAC,CAAC,oBAAoB,CAAC,CAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM;CAG9D;AAED,qBAAa,eAAe,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,WAAW,CAAC,KAAK,CAAC;IACpF,SAAS,CAAC,CAAC,oBAAoB,CAAC,CAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM;CAG9D"}
|
|
@@ -16,15 +16,15 @@ limitations under the License.
|
|
|
16
16
|
SPDX-License-Identifier: Apache-2.0
|
|
17
17
|
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
18
|
*/
|
|
19
|
-
import { PackageJson } from '../_helpers/packageJson';
|
|
20
|
-
import * as Enums from '../enums';
|
|
21
|
-
import * as Factories from '../factories/index.node';
|
|
22
|
-
import * as Models from '../models';
|
|
23
19
|
/**
|
|
24
20
|
* Node-specifics.
|
|
25
21
|
*
|
|
26
|
-
* @see
|
|
22
|
+
* @see [PackageJson spec](https://docs.npmjs.com/cli/v8/configuring-npm/package-json)
|
|
27
23
|
*/
|
|
24
|
+
import type { PackageJson } from '../_helpers/packageJson';
|
|
25
|
+
import * as Enums from '../enums';
|
|
26
|
+
import type * as Factories from '../factories/index.node';
|
|
27
|
+
import * as Models from '../models';
|
|
28
28
|
/**
|
|
29
29
|
* Node-specific ToolBuilder.
|
|
30
30
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fromNodePackageJson.node.d.ts","sourceRoot":"","sources":["../../src/builders/fromNodePackageJson.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"fromNodePackageJson.node.d.ts","sourceRoot":"","sources":["../../src/builders/fromNodePackageJson.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAE1D,OAAO,KAAK,KAAK,MAAM,UAAU,CAAA;AACjC,OAAO,KAAK,KAAK,SAAS,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,MAAM,MAAM,WAAW,CAAA;AAEnC;;GAEG;AACH,qBAAa,WAAW;;gBAGT,aAAa,EAAE,WAAW,CAAC,eAAe,CAAC;IAIxD,IAAI,aAAa,IAAK,SAAS,CAAC,mBAAmB,CAAC,wBAAwB,CAE3E;IAID,QAAQ,CAAE,IAAI,EAAE,WAAW,GAAG,MAAM,CAAC,IAAI,GAAG,SAAS;CActD;AAED;;GAEG;AACH,qBAAa,gBAAgB;;gBAKzB,aAAa,EAAE,gBAAgB,CAAC,eAAe,CAAC,EAChD,cAAc,EAAE,gBAAgB,CAAC,gBAAgB,CAAC;IAMpD,IAAI,aAAa,IAAK,SAAS,CAAC,mBAAmB,CAAC,wBAAwB,CAE3E;IAED,IAAI,cAAc,IAAK,SAAS,CAAC,cAAc,CAE9C;IAED,aAAa,CAAE,IAAI,EAAE,WAAW,EAAE,IAAI,GAAE,KAAK,CAAC,aAA2C,GAAG,MAAM,CAAC,SAAS,GAAG,SAAS;CAwDzH"}
|
package/dist.d/enums/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/enums/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,yBAAyB,CAAA;AACvC,cAAc,kBAAkB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/enums/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,yBAAyB,CAAA;AACvC,cAAc,kBAAkB,CAAA;AAEhC,YAAY;AACZ,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
/** @beta */
|
|
20
|
+
export declare enum AffectStatus {
|
|
21
|
+
Affected = "affected",
|
|
22
|
+
Unaffected = "unaffected",
|
|
23
|
+
Unknown = "unknown"
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=affectStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"affectStatus.d.ts","sourceRoot":"","sources":["../../../src/enums/vulnerability/affectStatus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,YAAY;AACZ,oBAAY,YAAY;IACtB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,OAAO,YAAY;CACpB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
/** @beta */
|
|
20
|
+
export declare enum AnalysisJustification {
|
|
21
|
+
CodeNotPresent = "code_not_present",
|
|
22
|
+
CodeNotReachable = "code_not_reachable",
|
|
23
|
+
RequiresConfiguration = "requires_configuration",
|
|
24
|
+
RequiresDependency = "requires_dependency",
|
|
25
|
+
RequiresEnvironment = "requires_environment",
|
|
26
|
+
ProtectedByCompiler = "protected_by_compiler",
|
|
27
|
+
ProtectedAtRuntime = "protected_at_runtime",
|
|
28
|
+
ProtectedAtPerimeter = "protected_at_perimeter",
|
|
29
|
+
ProtectedByMitigatingControl = "protected_by_mitigating_control"
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=analysisJustification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analysisJustification.d.ts","sourceRoot":"","sources":["../../../src/enums/vulnerability/analysisJustification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,YAAY;AACZ,oBAAY,qBAAqB;IAC/B,cAAc,qBAAqB;IACnC,gBAAgB,uBAAuB;IACvC,qBAAqB,2BAA2B;IAChD,kBAAkB,wBAAwB;IAC1C,mBAAmB,yBAAyB;IAC5C,mBAAmB,0BAA0B;IAC7C,kBAAkB,yBAAyB;IAC3C,oBAAoB,2BAA2B;IAC/C,4BAA4B,oCAAoC;CACjE"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
import { SortableStringables } from '../../_helpers/sortable';
|
|
20
|
+
/** @beta */
|
|
21
|
+
export declare enum AnalysisResponse {
|
|
22
|
+
CanNotFix = "can_not_fix",
|
|
23
|
+
WillNotFix = "will_not_fix",
|
|
24
|
+
Update = "update",
|
|
25
|
+
Rollback = "rollback",
|
|
26
|
+
WorkaroundAvailable = "workaround_available"
|
|
27
|
+
}
|
|
28
|
+
/** @beta */
|
|
29
|
+
export declare class AnalysisResponseRepository extends SortableStringables<AnalysisResponse> {
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=analysisResponse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analysisResponse.d.ts","sourceRoot":"","sources":["../../../src/enums/vulnerability/analysisResponse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAE7D,YAAY;AACZ,oBAAY,gBAAgB;IAC1B,SAAS,gBAAgB;IACzB,UAAU,iBAAiB;IAC3B,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,mBAAmB,yBAAyB;CAC7C;AAED,YAAY;AACZ,qBAAa,0BAA2B,SAAQ,mBAAmB,CAAC,gBAAgB,CAAC;CACpF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
/** @beta */
|
|
20
|
+
export declare enum AnalysisState {
|
|
21
|
+
Resolved = "resolved",
|
|
22
|
+
ResolvedWithPedigree = "resolved_with_pedigree",
|
|
23
|
+
Exploitable = "exploitable",
|
|
24
|
+
InTriage = "in_triage",
|
|
25
|
+
FalsePositive = "false_positive",
|
|
26
|
+
NotAffected = "not_affected"
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=analysisState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analysisState.d.ts","sourceRoot":"","sources":["../../../src/enums/vulnerability/analysisState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,YAAY;AACZ,oBAAY,aAAa;IACvB,QAAQ,aAAa;IACrB,oBAAoB,2BAA2B;IAC/C,WAAW,gBAAgB;IAC3B,QAAQ,cAAc;IACtB,aAAa,mBAAmB;IAChC,WAAW,iBAAiB;CAC7B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
export * from './affectStatus';
|
|
20
|
+
export * from './analysisJustification';
|
|
21
|
+
export * from './analysisResponse';
|
|
22
|
+
export * from './analysisState';
|
|
23
|
+
export * from './ratingMethod';
|
|
24
|
+
export * from './severity';
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/enums/vulnerability/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,cAAc,gBAAgB,CAAA;AAC9B,cAAc,yBAAyB,CAAA;AACvC,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Specifies the severity or risk scoring methodology or standard used.
|
|
21
|
+
*
|
|
22
|
+
* @beta
|
|
23
|
+
*/
|
|
24
|
+
export declare enum RatingMethod {
|
|
25
|
+
/** [CVSS v2 standard](https://www.first.org/cvss/v2/) */
|
|
26
|
+
CVSSv2 = "CVSSv2",
|
|
27
|
+
/** [CVSS v3.0 standard](https://www.first.org/cvss/v3-0/) */
|
|
28
|
+
CVSSv3 = "CVSSv3",
|
|
29
|
+
/** [CVSS v3.1 standard](https://www.first.org/cvss/v3-1/) */
|
|
30
|
+
CVSSv31 = "CVSSv31",
|
|
31
|
+
/** [OWASP Risk Rating](https://owasp.org/www-community/OWASP_Risk_Rating_Methodology) */
|
|
32
|
+
OWASP = "OWASP",
|
|
33
|
+
Other = "other"
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=ratingMethod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ratingMethod.d.ts","sourceRoot":"","sources":["../../../src/enums/vulnerability/ratingMethod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF;;;;GAIG;AACH,oBAAY,YAAY;IACtB,yDAAyD;IACzD,MAAM,WAAW;IACjB,6DAA6D;IAC7D,MAAM,WAAW;IACjB,6DAA6D;IAC7D,OAAO,YAAY;IACnB,yFAAyF;IACzF,KAAK,UAAU;IACf,KAAK,UAAU;CAChB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Textual representation of the severity of the vulnerability adopted by the analysis method.
|
|
21
|
+
* If the analysis method uses values other than what is provided, the user is expected to translate appropriately.
|
|
22
|
+
*
|
|
23
|
+
* @beta
|
|
24
|
+
*/
|
|
25
|
+
export declare enum Severity {
|
|
26
|
+
Critical = "critical",
|
|
27
|
+
High = "high",
|
|
28
|
+
Medium = "medium",
|
|
29
|
+
Low = "low",
|
|
30
|
+
Info = "info",
|
|
31
|
+
None = "none",
|
|
32
|
+
Unknown = "unknown"
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=severity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"severity.d.ts","sourceRoot":"","sources":["../../../src/enums/vulnerability/severity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF;;;;;GAKG;AACH,oBAAY,QAAQ;IAClB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,IAAI,SAAS;IACb,OAAO,YAAY;CACpB"}
|
|
@@ -16,15 +16,15 @@ limitations under the License.
|
|
|
16
16
|
SPDX-License-Identifier: Apache-2.0
|
|
17
17
|
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
18
|
*/
|
|
19
|
-
import { PackageURL } from 'packageurl-js';
|
|
20
|
-
import { PackageJson } from '../_helpers/packageJson';
|
|
21
|
-
import * as Models from '../models';
|
|
22
|
-
import { PackageUrlFactory as PlainPackageUrlFactory } from './packageUrl';
|
|
23
19
|
/**
|
|
24
20
|
* Node-specifics.
|
|
25
21
|
*
|
|
26
|
-
* @see
|
|
22
|
+
* @see [PackageJson spec](https://docs.npmjs.com/cli/v8/configuring-npm/package-json)
|
|
27
23
|
*/
|
|
24
|
+
import type { PackageURL } from 'packageurl-js';
|
|
25
|
+
import type { PackageJson } from '../_helpers/packageJson';
|
|
26
|
+
import * as Models from '../models';
|
|
27
|
+
import { PackageUrlFactory as PlainPackageUrlFactory } from './packageUrl';
|
|
28
28
|
/**
|
|
29
29
|
* Node-specific ExternalReferenceFactory.
|
|
30
30
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fromNodePackageJson.node.d.ts","sourceRoot":"","sources":["../../src/factories/fromNodePackageJson.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"fromNodePackageJson.node.d.ts","sourceRoot":"","sources":["../../src/factories/fromNodePackageJson.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAG/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAG1D,OAAO,KAAK,MAAM,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,iBAAiB,IAAI,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAE1E;;GAEG;AACH,qBAAa,wBAAwB;IACnC,sBAAsB,CAAE,IAAI,EAAE,WAAW,GAAG,MAAM,CAAC,iBAAiB,EAAE;IAUtE,OAAO,CAAE,IAAI,EAAE,WAAW,GAAG,MAAM,CAAC,iBAAiB,GAAG,SAAS;IAsBjE,YAAY,CAAE,IAAI,EAAE,WAAW,GAAG,MAAM,CAAC,iBAAiB,GAAG,SAAS;IAUtE,gBAAgB,CAAE,IAAI,EAAE,WAAW,GAAG,MAAM,CAAC,iBAAiB,GAAG,SAAS;CAgB3E;AAID;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,sBAAsB;;IAClD,iBAAiB,CAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,IAAI,GAAE,OAAe,GAAG,UAAU,GAAG,SAAS;CAwCxG"}
|
|
@@ -16,16 +16,17 @@ limitations under the License.
|
|
|
16
16
|
SPDX-License-Identifier: Apache-2.0
|
|
17
17
|
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
18
|
*/
|
|
19
|
-
import { DisjunctiveLicense, License
|
|
19
|
+
import type { DisjunctiveLicense, License } from '../models';
|
|
20
|
+
import { LicenseExpression, NamedLicense, SpdxLicense } from '../models';
|
|
20
21
|
export declare class LicenseFactory {
|
|
21
22
|
makeFromString(value: string): License;
|
|
22
23
|
/**
|
|
23
|
-
* @throws {RangeError} if expression is not eligible
|
|
24
|
+
* @throws {@link RangeError} if expression is not eligible
|
|
24
25
|
*/
|
|
25
26
|
makeExpression(value: string): LicenseExpression;
|
|
26
27
|
makeDisjunctive(value: string): DisjunctiveLicense;
|
|
27
28
|
/**
|
|
28
|
-
* @throws {RangeError} if value is not supported SPDX id
|
|
29
|
+
* @throws {@link RangeError} if value is not supported SPDX id
|
|
29
30
|
*/
|
|
30
31
|
makeDisjunctiveWithId(value: string | any): SpdxLicense;
|
|
31
32
|
makeDisjunctiveWithName(value: string | any): NamedLicense;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"license.d.ts","sourceRoot":"","sources":["../../src/factories/license.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"license.d.ts","sourceRoot":"","sources":["../../src/factories/license.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAC5D,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAGxE,qBAAa,cAAc;IACzB,cAAc,CAAE,KAAK,EAAE,MAAM,GAAG,OAAO;IAQvC;;OAEG;IACH,cAAc,CAAE,KAAK,EAAE,MAAM,GAAG,iBAAiB;IAIjD,eAAe,CAAE,KAAK,EAAE,MAAM,GAAG,kBAAkB;IAQnD;;OAEG;IACH,qBAAqB,CAAE,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,WAAW;IASxD,uBAAuB,CAAE,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,YAAY;CAG5D"}
|
|
@@ -17,7 +17,7 @@ SPDX-License-Identifier: Apache-2.0
|
|
|
17
17
|
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
18
|
*/
|
|
19
19
|
import { PackageURL } from 'packageurl-js';
|
|
20
|
-
import { Component } from '../models';
|
|
20
|
+
import type { Component } from '../models';
|
|
21
21
|
export declare class PackageUrlFactory {
|
|
22
22
|
#private;
|
|
23
23
|
constructor(type: PackageUrlFactory['type']);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageUrl.d.ts","sourceRoot":"","sources":["../../src/factories/packageUrl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAI1C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"packageUrl.d.ts","sourceRoot":"","sources":["../../src/factories/packageUrl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAI1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAE1C,qBAAa,iBAAiB;;gBAGf,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC;IAI5C,IAAI,IAAI,IAAK,UAAU,CAAC,MAAM,CAAC,CAE9B;IAED,iBAAiB,CAAE,SAAS,EAAE,SAAS,EAAE,IAAI,GAAE,OAAe,GAAG,UAAU,GAAG,SAAS;CAoDxF"}
|
|
@@ -16,8 +16,8 @@ limitations under the License.
|
|
|
16
16
|
SPDX-License-Identifier: Apache-2.0
|
|
17
17
|
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
18
|
*/
|
|
19
|
-
import { AttachmentEncoding } from '../enums';
|
|
20
|
-
interface
|
|
19
|
+
import type { AttachmentEncoding } from '../enums';
|
|
20
|
+
export interface OptionalAttachmentProperties {
|
|
21
21
|
contentType?: Attachment['contentType'];
|
|
22
22
|
encoding?: Attachment['encoding'];
|
|
23
23
|
}
|
|
@@ -25,7 +25,6 @@ export declare class Attachment {
|
|
|
25
25
|
contentType?: string;
|
|
26
26
|
content: string;
|
|
27
27
|
encoding?: AttachmentEncoding;
|
|
28
|
-
constructor(content: Attachment['content'], op?:
|
|
28
|
+
constructor(content: Attachment['content'], op?: OptionalAttachmentProperties);
|
|
29
29
|
}
|
|
30
|
-
export {};
|
|
31
30
|
//# sourceMappingURL=attachment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../src/models/attachment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../src/models/attachment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAElD,MAAM,WAAW,4BAA4B;IAC3C,WAAW,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,CAAA;IACvC,QAAQ,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAA;CAClC;AAED,qBAAa,UAAU;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,kBAAkB,CAAA;gBAEhB,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,EAAE,EAAE,GAAE,4BAAiC;CAKnF"}
|
package/dist.d/models/bom.d.ts
CHANGED
|
@@ -16,34 +16,36 @@ limitations under the License.
|
|
|
16
16
|
SPDX-License-Identifier: Apache-2.0
|
|
17
17
|
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
18
|
*/
|
|
19
|
-
import { PositiveInteger, UrnUuid } from '../types';
|
|
19
|
+
import type { PositiveInteger, UrnUuid } from '../types';
|
|
20
20
|
import { ComponentRepository } from './component';
|
|
21
21
|
import { Metadata } from './metadata';
|
|
22
|
-
|
|
22
|
+
import { VulnerabilityRepository } from './vulnerability';
|
|
23
|
+
export interface OptionalBomProperties {
|
|
23
24
|
metadata?: Bom['metadata'];
|
|
24
25
|
components?: Bom['components'];
|
|
25
26
|
version?: Bom['version'];
|
|
27
|
+
vulnerabilities?: Bom['vulnerabilities'];
|
|
26
28
|
serialNumber?: Bom['serialNumber'];
|
|
27
29
|
}
|
|
28
30
|
export declare class Bom {
|
|
29
31
|
#private;
|
|
30
32
|
metadata: Metadata;
|
|
31
33
|
components: ComponentRepository;
|
|
34
|
+
vulnerabilities: VulnerabilityRepository;
|
|
32
35
|
/**
|
|
33
|
-
* @throws {TypeError} if
|
|
34
|
-
* @throws {TypeError} if
|
|
36
|
+
* @throws {@link TypeError} if `op.version` is neither {@link PositiveInteger} nor `undefined`
|
|
37
|
+
* @throws {@link TypeError} if `op.serialNumber` is neither {@link UrnUuid} nor `undefined`
|
|
35
38
|
*/
|
|
36
|
-
constructor(op?:
|
|
39
|
+
constructor(op?: OptionalBomProperties);
|
|
37
40
|
get version(): PositiveInteger;
|
|
38
41
|
/**
|
|
39
|
-
* @throws {TypeError} if value is not {@link PositiveInteger}
|
|
42
|
+
* @throws {@link TypeError} if value is not {@link PositiveInteger}
|
|
40
43
|
*/
|
|
41
44
|
set version(value: PositiveInteger);
|
|
42
45
|
get serialNumber(): UrnUuid | undefined;
|
|
43
46
|
/**
|
|
44
|
-
* @throws {TypeError} if value is neither {@link UrnUuid} nor
|
|
47
|
+
* @throws {@link TypeError} if value is neither {@link UrnUuid} nor `undefined`
|
|
45
48
|
*/
|
|
46
49
|
set serialNumber(value: UrnUuid | undefined);
|
|
47
50
|
}
|
|
48
|
-
export {};
|
|
49
51
|
//# sourceMappingURL=bom.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bom.d.ts","sourceRoot":"","sources":["../../src/models/bom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,OAAO,
|
|
1
|
+
{"version":3,"file":"bom.d.ts","sourceRoot":"","sources":["../../src/models/bom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAEzD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC,CAAA;IAC1B,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAA;IAC9B,OAAO,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,CAAA;IACxB,eAAe,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAA;IACxC,YAAY,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CACnC;AAED,qBAAa,GAAG;;IACd,QAAQ,EAAE,QAAQ,CAAA;IAClB,UAAU,EAAE,mBAAmB,CAAA;IAC/B,eAAe,EAAE,uBAAuB,CAAA;IAcxC;;;OAGG;gBACU,EAAE,GAAE,qBAA0B;IAQ3C,IAAI,OAAO,IAAK,eAAe,CAE9B;IAED;;OAEG;IACH,IAAI,OAAO,CAAE,KAAK,EAAE,eAAe,EAKlC;IAED,IAAI,YAAY,IAAK,OAAO,GAAG,SAAS,CAEvC;IAED;;OAEG;IACH,IAAI,YAAY,CAAE,KAAK,EAAE,OAAO,GAAG,SAAS,EAK3C;CACF"}
|