diff --git a/generated/backend/DependencyAnalysis200Response.d.ts b/generated/backend/Analysis200Response.d.ts similarity index 77% rename from generated/backend/DependencyAnalysis200Response.d.ts rename to generated/backend/Analysis200Response.d.ts index efcc86f..d87e280 100644 --- a/generated/backend/DependencyAnalysis200Response.d.ts +++ b/generated/backend/Analysis200Response.d.ts @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -10,7 +10,7 @@ * Do not edit the class manually. */ import { AnalysisReport } from '../backend/AnalysisReport'; -export declare class DependencyAnalysis200Response { +export declare class Analysis200Response { 'jsonReport'?: AnalysisReport; 'htmlReport'?: any; static readonly discriminator: string | undefined; diff --git a/generated/backend/DependencyAnalysis200Response.js b/generated/backend/Analysis200Response.js similarity index 72% rename from generated/backend/DependencyAnalysis200Response.js rename to generated/backend/Analysis200Response.js index 31f1f6e..4844501 100644 --- a/generated/backend/DependencyAnalysis200Response.js +++ b/generated/backend/Analysis200Response.js @@ -1,15 +1,15 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export class DependencyAnalysis200Response { +export class Analysis200Response { 'jsonReport'; 'htmlReport'; static discriminator = undefined; @@ -28,7 +28,7 @@ export class DependencyAnalysis200Response { } ]; static getAttributeTypeMap() { - return DependencyAnalysis200Response.attributeTypeMap; + return Analysis200Response.attributeTypeMap; } constructor() { } diff --git a/generated/backend/DependencyAnalysis200Response.ts b/generated/backend/Analysis200Response.ts similarity index 77% rename from generated/backend/DependencyAnalysis200Response.ts rename to generated/backend/Analysis200Response.ts index 8df74e8..60f7122 100644 --- a/generated/backend/DependencyAnalysis200Response.ts +++ b/generated/backend/Analysis200Response.ts @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,7 +12,7 @@ import { AnalysisReport } from '../backend/AnalysisReport'; -export class DependencyAnalysis200Response { +export class Analysis200Response { 'jsonReport'?: AnalysisReport; 'htmlReport'?: any; @@ -33,7 +33,7 @@ export class DependencyAnalysis200Response { } ]; static getAttributeTypeMap() { - return DependencyAnalysis200Response.attributeTypeMap; + return Analysis200Response.attributeTypeMap; } public constructor() { diff --git a/generated/backend/AnalysisReport.d.ts b/generated/backend/AnalysisReport.d.ts index 3626ed3..4b4f5e0 100644 --- a/generated/backend/AnalysisReport.d.ts +++ b/generated/backend/AnalysisReport.d.ts @@ -1,19 +1,21 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { DependencyReport } from '../backend/DependencyReport'; -import { Summary } from '../backend/Summary'; +import { ProviderReport } from '../backend/ProviderReport'; +import { Scanned } from '../backend/Scanned'; export declare class AnalysisReport { - 'summary'?: Summary; - 'dependencies'?: Array; + 'scanned'?: Scanned; + 'providers'?: { + [key: string]: ProviderReport; + }; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; diff --git a/generated/backend/AnalysisReport.js b/generated/backend/AnalysisReport.js index b7792b9..63ef54e 100644 --- a/generated/backend/AnalysisReport.js +++ b/generated/backend/AnalysisReport.js @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -10,20 +10,20 @@ * Do not edit the class manually. */ export class AnalysisReport { - 'summary'; - 'dependencies'; + 'scanned'; + 'providers'; static discriminator = undefined; static attributeTypeMap = [ { - "name": "summary", - "baseName": "summary", - "type": "Summary", + "name": "scanned", + "baseName": "scanned", + "type": "Scanned", "format": "" }, { - "name": "dependencies", - "baseName": "dependencies", - "type": "Array", + "name": "providers", + "baseName": "providers", + "type": "{ [key: string]: ProviderReport; }", "format": "" } ]; diff --git a/generated/backend/AnalysisReport.ts b/generated/backend/AnalysisReport.ts index b7abd9a..d177dad 100644 --- a/generated/backend/AnalysisReport.ts +++ b/generated/backend/AnalysisReport.ts @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -10,26 +10,26 @@ * Do not edit the class manually. */ -import { DependencyReport } from '../backend/DependencyReport'; -import { Summary } from '../backend/Summary'; +import { ProviderReport } from '../backend/ProviderReport'; +import { Scanned } from '../backend/Scanned'; export class AnalysisReport { - 'summary'?: Summary; - 'dependencies'?: Array; + 'scanned'?: Scanned; + 'providers'?: { [key: string]: ProviderReport; }; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "summary", - "baseName": "summary", - "type": "Summary", + "name": "scanned", + "baseName": "scanned", + "type": "Scanned", "format": "" }, { - "name": "dependencies", - "baseName": "dependencies", - "type": "Array", + "name": "providers", + "baseName": "providers", + "type": "{ [key: string]: ProviderReport; }", "format": "" } ]; diff --git a/generated/backend/CvssVector.d.ts b/generated/backend/CvssVector.d.ts index c87a117..7b380ae 100644 --- a/generated/backend/CvssVector.d.ts +++ b/generated/backend/CvssVector.d.ts @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -20,7 +20,7 @@ export declare class CvssVector { 'availabilityImpact'?: string; 'exploitCodeMaturity'?: string; 'remediationLevel'?: string; - 'reportConficende'?: string; + 'reportConfidence'?: string; 'cvss'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ diff --git a/generated/backend/CvssVector.js b/generated/backend/CvssVector.js index 79bc2cc..3135b96 100644 --- a/generated/backend/CvssVector.js +++ b/generated/backend/CvssVector.js @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -20,7 +20,7 @@ export class CvssVector { 'availabilityImpact'; 'exploitCodeMaturity'; 'remediationLevel'; - 'reportConficende'; + 'reportConfidence'; 'cvss'; static discriminator = undefined; static attributeTypeMap = [ @@ -85,8 +85,8 @@ export class CvssVector { "format": "" }, { - "name": "reportConficende", - "baseName": "reportConficende", + "name": "reportConfidence", + "baseName": "reportConfidence", "type": "string", "format": "" }, diff --git a/generated/backend/CvssVector.ts b/generated/backend/CvssVector.ts index d8a9cca..99e6058 100644 --- a/generated/backend/CvssVector.ts +++ b/generated/backend/CvssVector.ts @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -22,7 +22,7 @@ export class CvssVector { 'availabilityImpact'?: string; 'exploitCodeMaturity'?: string; 'remediationLevel'?: string; - 'reportConficende'?: string; + 'reportConfidence'?: string; 'cvss'?: string; static readonly discriminator: string | undefined = undefined; @@ -89,8 +89,8 @@ export class CvssVector { "format": "" }, { - "name": "reportConficende", - "baseName": "reportConficende", + "name": "reportConfidence", + "baseName": "reportConfidence", "type": "string", "format": "" }, diff --git a/generated/backend/DependencyReport.d.ts b/generated/backend/DependencyReport.d.ts index 991eb0a..54661fa 100644 --- a/generated/backend/DependencyReport.d.ts +++ b/generated/backend/DependencyReport.d.ts @@ -1,32 +1,28 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { DependencyReportHighestVulnerability } from '../backend/DependencyReportHighestVulnerability'; -import { DependencyReportRecommendation } from '../backend/DependencyReportRecommendation'; import { Issue } from '../backend/Issue'; -import { PackageRef } from '../backend/PackageRef'; -import { Remediation } from '../backend/Remediation'; import { TransitiveDependencyReport } from '../backend/TransitiveDependencyReport'; export declare class DependencyReport { - 'ref'?: PackageRef; + /** + * PackageURL used to identify a dependency artifact + */ + 'ref'?: string; 'issues'?: Array; 'transitive'?: Array; - 'recommendation'?: DependencyReportRecommendation; /** - * Trusted Content remediation related to identified security vulnerabilities + * PackageURL used to identify a dependency artifact */ - 'remediations'?: { - [key: string]: Remediation; - }; - 'highestVulnerability'?: DependencyReportHighestVulnerability; + 'recommendation'?: string; + 'highestVulnerability'?: Issue; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; diff --git a/generated/backend/DependencyReport.js b/generated/backend/DependencyReport.js index 150f1f5..ca6ab5b 100644 --- a/generated/backend/DependencyReport.js +++ b/generated/backend/DependencyReport.js @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -10,21 +10,23 @@ * Do not edit the class manually. */ export class DependencyReport { + /** + * PackageURL used to identify a dependency artifact + */ 'ref'; 'issues'; 'transitive'; - 'recommendation'; /** - * Trusted Content remediation related to identified security vulnerabilities + * PackageURL used to identify a dependency artifact */ - 'remediations'; + 'recommendation'; 'highestVulnerability'; static discriminator = undefined; static attributeTypeMap = [ { "name": "ref", "baseName": "ref", - "type": "PackageRef", + "type": "string", "format": "" }, { @@ -42,19 +44,13 @@ export class DependencyReport { { "name": "recommendation", "baseName": "recommendation", - "type": "DependencyReportRecommendation", - "format": "" - }, - { - "name": "remediations", - "baseName": "remediations", - "type": "{ [key: string]: Remediation; }", + "type": "string", "format": "" }, { "name": "highestVulnerability", "baseName": "highestVulnerability", - "type": "DependencyReportHighestVulnerability", + "type": "Issue", "format": "" } ]; diff --git a/generated/backend/DependencyReport.ts b/generated/backend/DependencyReport.ts index 0ce7283..51f1e95 100644 --- a/generated/backend/DependencyReport.ts +++ b/generated/backend/DependencyReport.ts @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -10,23 +10,21 @@ * Do not edit the class manually. */ -import { DependencyReportHighestVulnerability } from '../backend/DependencyReportHighestVulnerability'; -import { DependencyReportRecommendation } from '../backend/DependencyReportRecommendation'; import { Issue } from '../backend/Issue'; -import { PackageRef } from '../backend/PackageRef'; -import { Remediation } from '../backend/Remediation'; import { TransitiveDependencyReport } from '../backend/TransitiveDependencyReport'; export class DependencyReport { - 'ref'?: PackageRef; + /** + * PackageURL used to identify a dependency artifact + */ + 'ref'?: string; 'issues'?: Array; 'transitive'?: Array; - 'recommendation'?: DependencyReportRecommendation; /** - * Trusted Content remediation related to identified security vulnerabilities + * PackageURL used to identify a dependency artifact */ - 'remediations'?: { [key: string]: Remediation; }; - 'highestVulnerability'?: DependencyReportHighestVulnerability; + 'recommendation'?: string; + 'highestVulnerability'?: Issue; static readonly discriminator: string | undefined = undefined; @@ -34,7 +32,7 @@ export class DependencyReport { { "name": "ref", "baseName": "ref", - "type": "PackageRef", + "type": "string", "format": "" }, { @@ -52,19 +50,13 @@ export class DependencyReport { { "name": "recommendation", "baseName": "recommendation", - "type": "DependencyReportRecommendation", - "format": "" - }, - { - "name": "remediations", - "baseName": "remediations", - "type": "{ [key: string]: Remediation; }", + "type": "string", "format": "" }, { "name": "highestVulnerability", "baseName": "highestVulnerability", - "type": "DependencyReportHighestVulnerability", + "type": "Issue", "format": "" } ]; diff --git a/generated/backend/DependencyReportHighestVulnerability.d.ts b/generated/backend/DependencyReportHighestVulnerability.d.ts deleted file mode 100644 index 86edffa..0000000 --- a/generated/backend/DependencyReportHighestVulnerability.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics - * - * OpenAPI spec version: 3.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { CvssVector } from '../backend/CvssVector'; -/** -* Highest vulnerability found for this dependency -*/ -export declare class DependencyReportHighestVulnerability { - 'id'?: string; - 'title'?: string; - 'source'?: string; - 'cvss'?: CvssVector; - 'score'?: number; - 'severity'?: DependencyReportHighestVulnerabilitySeverityEnum; - 'cves'?: Array; - 'unique'?: boolean; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} -export type DependencyReportHighestVulnerabilitySeverityEnum = "CRITICAL" | "HIGH" | "MEDIUM" | "LOW"; diff --git a/generated/backend/DependencyReportHighestVulnerability.js b/generated/backend/DependencyReportHighestVulnerability.js deleted file mode 100644 index 9207e47..0000000 --- a/generated/backend/DependencyReportHighestVulnerability.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics - * - * OpenAPI spec version: 3.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -/** -* Highest vulnerability found for this dependency -*/ -export class DependencyReportHighestVulnerability { - 'id'; - 'title'; - 'source'; - 'cvss'; - 'score'; - 'severity'; - 'cves'; - 'unique'; - static discriminator = undefined; - static attributeTypeMap = [ - { - "name": "id", - "baseName": "id", - "type": "string", - "format": "" - }, - { - "name": "title", - "baseName": "title", - "type": "string", - "format": "" - }, - { - "name": "source", - "baseName": "source", - "type": "string", - "format": "" - }, - { - "name": "cvss", - "baseName": "cvss", - "type": "CvssVector", - "format": "" - }, - { - "name": "score", - "baseName": "score", - "type": "number", - "format": "" - }, - { - "name": "severity", - "baseName": "severity", - "type": "DependencyReportHighestVulnerabilitySeverityEnum", - "format": "" - }, - { - "name": "cves", - "baseName": "cves", - "type": "Array", - "format": "" - }, - { - "name": "unique", - "baseName": "unique", - "type": "boolean", - "format": "" - } - ]; - static getAttributeTypeMap() { - return DependencyReportHighestVulnerability.attributeTypeMap; - } - constructor() { - } -} diff --git a/generated/backend/DependencyReportHighestVulnerability.ts b/generated/backend/DependencyReportHighestVulnerability.ts deleted file mode 100644 index 12f5f2d..0000000 --- a/generated/backend/DependencyReportHighestVulnerability.ts +++ /dev/null @@ -1,90 +0,0 @@ -/** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics - * - * OpenAPI spec version: 3.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { CvssVector } from '../backend/CvssVector'; - -/** -* Highest vulnerability found for this dependency -*/ -export class DependencyReportHighestVulnerability { - 'id'?: string; - 'title'?: string; - 'source'?: string; - 'cvss'?: CvssVector; - 'score'?: number; - 'severity'?: DependencyReportHighestVulnerabilitySeverityEnum; - 'cves'?: Array; - 'unique'?: boolean; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "id", - "baseName": "id", - "type": "string", - "format": "" - }, - { - "name": "title", - "baseName": "title", - "type": "string", - "format": "" - }, - { - "name": "source", - "baseName": "source", - "type": "string", - "format": "" - }, - { - "name": "cvss", - "baseName": "cvss", - "type": "CvssVector", - "format": "" - }, - { - "name": "score", - "baseName": "score", - "type": "number", - "format": "" - }, - { - "name": "severity", - "baseName": "severity", - "type": "DependencyReportHighestVulnerabilitySeverityEnum", - "format": "" - }, - { - "name": "cves", - "baseName": "cves", - "type": "Array", - "format": "" - }, - { - "name": "unique", - "baseName": "unique", - "type": "boolean", - "format": "" - } ]; - - static getAttributeTypeMap() { - return DependencyReportHighestVulnerability.attributeTypeMap; - } - - public constructor() { - } -} - - -export type DependencyReportHighestVulnerabilitySeverityEnum = "CRITICAL" | "HIGH" | "MEDIUM" | "LOW" ; - diff --git a/generated/backend/DependencyReportRecommendation.d.ts b/generated/backend/DependencyReportRecommendation.d.ts deleted file mode 100644 index 980120c..0000000 --- a/generated/backend/DependencyReportRecommendation.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics - * - * OpenAPI spec version: 3.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -/** -* Trusted Content recommendation that is not related to any security vulnerability -*/ -export declare class DependencyReportRecommendation { - /** - * PackageURL identifier - */ - 'purl'?: string; - /** - * : for Java packages - */ - 'name'?: string; - /** - * Package version - */ - 'version'?: string; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} diff --git a/generated/backend/DependencyReportRecommendation.js b/generated/backend/DependencyReportRecommendation.js deleted file mode 100644 index c1fb292..0000000 --- a/generated/backend/DependencyReportRecommendation.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics - * - * OpenAPI spec version: 3.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -/** -* Trusted Content recommendation that is not related to any security vulnerability -*/ -export class DependencyReportRecommendation { - /** - * PackageURL identifier - */ - 'purl'; - /** - * : for Java packages - */ - 'name'; - /** - * Package version - */ - 'version'; - static discriminator = undefined; - static attributeTypeMap = [ - { - "name": "purl", - "baseName": "purl", - "type": "string", - "format": "" - }, - { - "name": "name", - "baseName": "name", - "type": "string", - "format": "" - }, - { - "name": "version", - "baseName": "version", - "type": "string", - "format": "" - } - ]; - static getAttributeTypeMap() { - return DependencyReportRecommendation.attributeTypeMap; - } - constructor() { - } -} diff --git a/generated/backend/DependencyReportRecommendation.ts b/generated/backend/DependencyReportRecommendation.ts deleted file mode 100644 index 07e8f31..0000000 --- a/generated/backend/DependencyReportRecommendation.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics - * - * OpenAPI spec version: 3.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -/** -* Trusted Content recommendation that is not related to any security vulnerability -*/ -export class DependencyReportRecommendation { - /** - * PackageURL identifier - */ - 'purl'?: string; - /** - * : for Java packages - */ - 'name'?: string; - /** - * Package version - */ - 'version'?: string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "purl", - "baseName": "purl", - "type": "string", - "format": "" - }, - { - "name": "name", - "baseName": "name", - "type": "string", - "format": "" - }, - { - "name": "version", - "baseName": "version", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return DependencyReportRecommendation.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/generated/backend/Issue.d.ts b/generated/backend/Issue.d.ts index 83cde65..f1d899f 100644 --- a/generated/backend/Issue.d.ts +++ b/generated/backend/Issue.d.ts @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -10,15 +10,18 @@ * Do not edit the class manually. */ import { CvssVector } from '../backend/CvssVector'; +import { Remediation } from '../backend/Remediation'; +import { Severity } from '../backend/Severity'; export declare class Issue { 'id'?: string; 'title'?: string; 'source'?: string; 'cvss'?: CvssVector; - 'score'?: number; - 'severity'?: IssueSeverityEnum; + 'cvssScore'?: number; + 'severity'?: Severity; 'cves'?: Array; 'unique'?: boolean; + 'remediation'?: Remediation; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -34,4 +37,3 @@ export declare class Issue { }[]; constructor(); } -export type IssueSeverityEnum = "CRITICAL" | "HIGH" | "MEDIUM" | "LOW"; diff --git a/generated/backend/Issue.js b/generated/backend/Issue.js index a7a9cbc..bd56bcc 100644 --- a/generated/backend/Issue.js +++ b/generated/backend/Issue.js @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,11 @@ export class Issue { 'title'; 'source'; 'cvss'; - 'score'; + 'cvssScore'; 'severity'; 'cves'; 'unique'; + 'remediation'; static discriminator = undefined; static attributeTypeMap = [ { @@ -45,15 +46,15 @@ export class Issue { "format": "" }, { - "name": "score", - "baseName": "score", + "name": "cvssScore", + "baseName": "cvssScore", "type": "number", - "format": "" + "format": "float" }, { "name": "severity", "baseName": "severity", - "type": "IssueSeverityEnum", + "type": "Severity", "format": "" }, { @@ -67,6 +68,12 @@ export class Issue { "baseName": "unique", "type": "boolean", "format": "" + }, + { + "name": "remediation", + "baseName": "remediation", + "type": "Remediation", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/generated/backend/Issue.ts b/generated/backend/Issue.ts index 092f955..1a934ec 100644 --- a/generated/backend/Issue.ts +++ b/generated/backend/Issue.ts @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,16 +11,19 @@ */ import { CvssVector } from '../backend/CvssVector'; +import { Remediation } from '../backend/Remediation'; +import { Severity } from '../backend/Severity'; export class Issue { 'id'?: string; 'title'?: string; 'source'?: string; 'cvss'?: CvssVector; - 'score'?: number; - 'severity'?: IssueSeverityEnum; + 'cvssScore'?: number; + 'severity'?: Severity; 'cves'?: Array; 'unique'?: boolean; + 'remediation'?: Remediation; static readonly discriminator: string | undefined = undefined; @@ -50,15 +53,15 @@ export class Issue { "format": "" }, { - "name": "score", - "baseName": "score", + "name": "cvssScore", + "baseName": "cvssScore", "type": "number", - "format": "" + "format": "float" }, { "name": "severity", "baseName": "severity", - "type": "IssueSeverityEnum", + "type": "Severity", "format": "" }, { @@ -72,6 +75,12 @@ export class Issue { "baseName": "unique", "type": "boolean", "format": "" + }, + { + "name": "remediation", + "baseName": "remediation", + "type": "Remediation", + "format": "" } ]; static getAttributeTypeMap() { @@ -83,5 +92,4 @@ export class Issue { } -export type IssueSeverityEnum = "CRITICAL" | "HIGH" | "MEDIUM" | "LOW" ; diff --git a/generated/backend/PackageRef.js b/generated/backend/PackageRef.js deleted file mode 100644 index 93231ee..0000000 --- a/generated/backend/PackageRef.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics - * - * OpenAPI spec version: 3.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -export class PackageRef { - /** - * PackageURL identifier - */ - 'purl'; - /** - * : for Java packages - */ - 'name'; - /** - * Package version - */ - 'version'; - static discriminator = undefined; - static attributeTypeMap = [ - { - "name": "purl", - "baseName": "purl", - "type": "string", - "format": "" - }, - { - "name": "name", - "baseName": "name", - "type": "string", - "format": "" - }, - { - "name": "version", - "baseName": "version", - "type": "string", - "format": "" - } - ]; - static getAttributeTypeMap() { - return PackageRef.attributeTypeMap; - } - constructor() { - } -} diff --git a/generated/backend/PackageRef.ts b/generated/backend/PackageRef.ts deleted file mode 100644 index 6df342d..0000000 --- a/generated/backend/PackageRef.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics - * - * OpenAPI spec version: 3.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class PackageRef { - /** - * PackageURL identifier - */ - 'purl'?: string; - /** - * : for Java packages - */ - 'name'?: string; - /** - * Package version - */ - 'version'?: string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "purl", - "baseName": "purl", - "type": "string", - "format": "" - }, - { - "name": "name", - "baseName": "name", - "type": "string", - "format": "" - }, - { - "name": "version", - "baseName": "version", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return PackageRef.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/generated/backend/ProviderReport.d.ts b/generated/backend/ProviderReport.d.ts new file mode 100644 index 0000000..23ec87b --- /dev/null +++ b/generated/backend/ProviderReport.d.ts @@ -0,0 +1,33 @@ +/** + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer + * + * OpenAPI spec version: 4.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { ProviderStatus } from '../backend/ProviderStatus'; +import { Source } from '../backend/Source'; +export declare class ProviderReport { + 'status'?: ProviderStatus; + 'sources'?: { + [key: string]: Source; + }; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} diff --git a/generated/backend/ProviderReport.js b/generated/backend/ProviderReport.js new file mode 100644 index 0000000..c81c84b --- /dev/null +++ b/generated/backend/ProviderReport.js @@ -0,0 +1,35 @@ +/** + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer + * + * OpenAPI spec version: 4.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +export class ProviderReport { + 'status'; + 'sources'; + static discriminator = undefined; + static attributeTypeMap = [ + { + "name": "status", + "baseName": "status", + "type": "ProviderStatus", + "format": "" + }, + { + "name": "sources", + "baseName": "sources", + "type": "{ [key: string]: Source; }", + "format": "" + } + ]; + static getAttributeTypeMap() { + return ProviderReport.attributeTypeMap; + } + constructor() { + } +} diff --git a/generated/backend/ProviderReport.ts b/generated/backend/ProviderReport.ts new file mode 100644 index 0000000..3ee4a84 --- /dev/null +++ b/generated/backend/ProviderReport.ts @@ -0,0 +1,43 @@ +/** + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer + * + * OpenAPI spec version: 4.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ProviderStatus } from '../backend/ProviderStatus'; +import { Source } from '../backend/Source'; + +export class ProviderReport { + 'status'?: ProviderStatus; + 'sources'?: { [key: string]: Source; }; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "ProviderStatus", + "format": "" + }, + { + "name": "sources", + "baseName": "sources", + "type": "{ [key: string]: Source; }", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ProviderReport.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/generated/backend/ProviderStatus.d.ts b/generated/backend/ProviderStatus.d.ts index 6de54d7..886c6a0 100644 --- a/generated/backend/ProviderStatus.d.ts +++ b/generated/backend/ProviderStatus.d.ts @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,8 +11,8 @@ */ export declare class ProviderStatus { 'ok'?: boolean; - 'provider'?: string; - 'status'?: number; + 'name'?: string; + 'code'?: number; 'message'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ diff --git a/generated/backend/ProviderStatus.js b/generated/backend/ProviderStatus.js index ed739c7..2cdaa70 100644 --- a/generated/backend/ProviderStatus.js +++ b/generated/backend/ProviderStatus.js @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,8 +11,8 @@ */ export class ProviderStatus { 'ok'; - 'provider'; - 'status'; + 'name'; + 'code'; 'message'; static discriminator = undefined; static attributeTypeMap = [ @@ -23,14 +23,14 @@ export class ProviderStatus { "format": "" }, { - "name": "provider", - "baseName": "provider", + "name": "name", + "baseName": "name", "type": "string", "format": "" }, { - "name": "status", - "baseName": "status", + "name": "code", + "baseName": "code", "type": "number", "format": "" }, diff --git a/generated/backend/ProviderStatus.ts b/generated/backend/ProviderStatus.ts index b58b38e..28aac6e 100644 --- a/generated/backend/ProviderStatus.ts +++ b/generated/backend/ProviderStatus.ts @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,8 @@ export class ProviderStatus { 'ok'?: boolean; - 'provider'?: string; - 'status'?: number; + 'name'?: string; + 'code'?: number; 'message'?: string; static readonly discriminator: string | undefined = undefined; @@ -27,14 +27,14 @@ export class ProviderStatus { "format": "" }, { - "name": "provider", - "baseName": "provider", + "name": "name", + "baseName": "name", "type": "string", "format": "" }, { - "name": "status", - "baseName": "status", + "name": "code", + "baseName": "code", "type": "number", "format": "" }, diff --git a/generated/backend/Remediation.d.ts b/generated/backend/Remediation.d.ts index 13fdb59..ac4ba31 100644 --- a/generated/backend/Remediation.d.ts +++ b/generated/backend/Remediation.d.ts @@ -1,19 +1,18 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { PackageRef } from '../backend/PackageRef'; +import { RemediationTrustedContent } from '../backend/RemediationTrustedContent'; export declare class Remediation { - 'issueRef'?: string; - 'mavenPackage'?: PackageRef; - 'productStatus'?: string; + 'fixedIn'?: Array; + 'trustedContent'?: RemediationTrustedContent; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; diff --git a/generated/backend/Remediation.js b/generated/backend/Remediation.js index 8ec0389..26014c5 100644 --- a/generated/backend/Remediation.js +++ b/generated/backend/Remediation.js @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -10,27 +10,20 @@ * Do not edit the class manually. */ export class Remediation { - 'issueRef'; - 'mavenPackage'; - 'productStatus'; + 'fixedIn'; + 'trustedContent'; static discriminator = undefined; static attributeTypeMap = [ { - "name": "issueRef", - "baseName": "issueRef", - "type": "string", + "name": "fixedIn", + "baseName": "fixedIn", + "type": "Array", "format": "" }, { - "name": "mavenPackage", - "baseName": "mavenPackage", - "type": "PackageRef", - "format": "" - }, - { - "name": "productStatus", - "baseName": "productStatus", - "type": "string", + "name": "trustedContent", + "baseName": "trustedContent", + "type": "RemediationTrustedContent", "format": "" } ]; diff --git a/generated/backend/Remediation.ts b/generated/backend/Remediation.ts index a017967..c65295b 100644 --- a/generated/backend/Remediation.ts +++ b/generated/backend/Remediation.ts @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -10,32 +10,25 @@ * Do not edit the class manually. */ -import { PackageRef } from '../backend/PackageRef'; +import { RemediationTrustedContent } from '../backend/RemediationTrustedContent'; export class Remediation { - 'issueRef'?: string; - 'mavenPackage'?: PackageRef; - 'productStatus'?: string; + 'fixedIn'?: Array; + 'trustedContent'?: RemediationTrustedContent; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "issueRef", - "baseName": "issueRef", - "type": "string", + "name": "fixedIn", + "baseName": "fixedIn", + "type": "Array", "format": "" }, { - "name": "mavenPackage", - "baseName": "mavenPackage", - "type": "PackageRef", - "format": "" - }, - { - "name": "productStatus", - "baseName": "productStatus", - "type": "string", + "name": "trustedContent", + "baseName": "trustedContent", + "type": "RemediationTrustedContent", "format": "" } ]; diff --git a/generated/backend/PackageRef.d.ts b/generated/backend/RemediationTrustedContent.d.ts similarity index 60% rename from generated/backend/PackageRef.d.ts rename to generated/backend/RemediationTrustedContent.d.ts index a484924..260a2cb 100644 --- a/generated/backend/PackageRef.d.ts +++ b/generated/backend/RemediationTrustedContent.d.ts @@ -1,27 +1,20 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export declare class PackageRef { +export declare class RemediationTrustedContent { /** - * PackageURL identifier + * PackageURL used to identify a dependency artifact */ - 'purl'?: string; - /** - * : for Java packages - */ - 'name'?: string; - /** - * Package version - */ - 'version'?: string; + 'mavenPackage'?: string; + 'productStatus'?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; diff --git a/generated/backend/RemediationTrustedContent.js b/generated/backend/RemediationTrustedContent.js new file mode 100644 index 0000000..2e8c77e --- /dev/null +++ b/generated/backend/RemediationTrustedContent.js @@ -0,0 +1,38 @@ +/** + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer + * + * OpenAPI spec version: 4.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +export class RemediationTrustedContent { + /** + * PackageURL used to identify a dependency artifact + */ + 'mavenPackage'; + 'productStatus'; + static discriminator = undefined; + static attributeTypeMap = [ + { + "name": "mavenPackage", + "baseName": "mavenPackage", + "type": "string", + "format": "" + }, + { + "name": "productStatus", + "baseName": "productStatus", + "type": "string", + "format": "" + } + ]; + static getAttributeTypeMap() { + return RemediationTrustedContent.attributeTypeMap; + } + constructor() { + } +} diff --git a/generated/backend/RemediationTrustedContent.ts b/generated/backend/RemediationTrustedContent.ts new file mode 100644 index 0000000..7aa1918 --- /dev/null +++ b/generated/backend/RemediationTrustedContent.ts @@ -0,0 +1,44 @@ +/** + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer + * + * OpenAPI spec version: 4.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class RemediationTrustedContent { + /** + * PackageURL used to identify a dependency artifact + */ + 'mavenPackage'?: string; + 'productStatus'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "mavenPackage", + "baseName": "mavenPackage", + "type": "string", + "format": "" + }, + { + "name": "productStatus", + "baseName": "productStatus", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return RemediationTrustedContent.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/generated/backend/DependenciesSummary.d.ts b/generated/backend/Scanned.d.ts similarity index 71% rename from generated/backend/DependenciesSummary.d.ts rename to generated/backend/Scanned.d.ts index eec6655..8c5341f 100644 --- a/generated/backend/DependenciesSummary.d.ts +++ b/generated/backend/Scanned.d.ts @@ -1,16 +1,20 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export declare class DependenciesSummary { - 'scanned'?: number; +/** +* Number of dependencies scanned +*/ +export declare class Scanned { + 'total'?: number; + 'direct'?: number; 'transitive'?: number; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ diff --git a/generated/backend/DependenciesSummary.js b/generated/backend/Scanned.js similarity index 56% rename from generated/backend/DependenciesSummary.js rename to generated/backend/Scanned.js index 1533efb..26045b7 100644 --- a/generated/backend/DependenciesSummary.js +++ b/generated/backend/Scanned.js @@ -1,22 +1,32 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export class DependenciesSummary { - 'scanned'; +/** +* Number of dependencies scanned +*/ +export class Scanned { + 'total'; + 'direct'; 'transitive'; static discriminator = undefined; static attributeTypeMap = [ { - "name": "scanned", - "baseName": "scanned", + "name": "total", + "baseName": "total", + "type": "number", + "format": "" + }, + { + "name": "direct", + "baseName": "direct", "type": "number", "format": "" }, @@ -28,7 +38,7 @@ export class DependenciesSummary { } ]; static getAttributeTypeMap() { - return DependenciesSummary.attributeTypeMap; + return Scanned.attributeTypeMap; } constructor() { } diff --git a/generated/backend/DependenciesSummary.ts b/generated/backend/Scanned.ts similarity index 60% rename from generated/backend/DependenciesSummary.ts rename to generated/backend/Scanned.ts index 2e4bf54..12021ef 100644 --- a/generated/backend/DependenciesSummary.ts +++ b/generated/backend/Scanned.ts @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,16 +11,26 @@ */ -export class DependenciesSummary { - 'scanned'?: number; +/** +* Number of dependencies scanned +*/ +export class Scanned { + 'total'?: number; + 'direct'?: number; 'transitive'?: number; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "scanned", - "baseName": "scanned", + "name": "total", + "baseName": "total", + "type": "number", + "format": "" + }, + { + "name": "direct", + "baseName": "direct", "type": "number", "format": "" }, @@ -32,7 +42,7 @@ export class DependenciesSummary { } ]; static getAttributeTypeMap() { - return DependenciesSummary.attributeTypeMap; + return Scanned.attributeTypeMap; } public constructor() { diff --git a/generated/backend/Severity.d.ts b/generated/backend/Severity.d.ts new file mode 100644 index 0000000..757dbe0 --- /dev/null +++ b/generated/backend/Severity.d.ts @@ -0,0 +1,12 @@ +/** + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer + * + * OpenAPI spec version: 4.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +export type Severity = "CRITICAL" | "HIGH" | "MEDIUM" | "LOW"; diff --git a/generated/backend/Severity.js b/generated/backend/Severity.js new file mode 100644 index 0000000..3c35da6 --- /dev/null +++ b/generated/backend/Severity.js @@ -0,0 +1,12 @@ +/** + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer + * + * OpenAPI spec version: 4.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +export {}; diff --git a/generated/backend/Severity.ts b/generated/backend/Severity.ts new file mode 100644 index 0000000..15c8477 --- /dev/null +++ b/generated/backend/Severity.ts @@ -0,0 +1,14 @@ +/** + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer + * + * OpenAPI spec version: 4.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export type Severity = "CRITICAL" | "HIGH" | "MEDIUM" | "LOW" ; diff --git a/generated/backend/Source.d.ts b/generated/backend/Source.d.ts new file mode 100644 index 0000000..b2732ce --- /dev/null +++ b/generated/backend/Source.d.ts @@ -0,0 +1,31 @@ +/** + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer + * + * OpenAPI spec version: 4.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { DependencyReport } from '../backend/DependencyReport'; +import { SourceSummary } from '../backend/SourceSummary'; +export declare class Source { + 'summary'?: SourceSummary; + 'dependencies'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} diff --git a/generated/backend/Source.js b/generated/backend/Source.js new file mode 100644 index 0000000..207a0d1 --- /dev/null +++ b/generated/backend/Source.js @@ -0,0 +1,35 @@ +/** + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer + * + * OpenAPI spec version: 4.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +export class Source { + 'summary'; + 'dependencies'; + static discriminator = undefined; + static attributeTypeMap = [ + { + "name": "summary", + "baseName": "summary", + "type": "SourceSummary", + "format": "" + }, + { + "name": "dependencies", + "baseName": "dependencies", + "type": "Array", + "format": "" + } + ]; + static getAttributeTypeMap() { + return Source.attributeTypeMap; + } + constructor() { + } +} diff --git a/generated/backend/Source.ts b/generated/backend/Source.ts new file mode 100644 index 0000000..f78fbe6 --- /dev/null +++ b/generated/backend/Source.ts @@ -0,0 +1,43 @@ +/** + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer + * + * OpenAPI spec version: 4.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { DependencyReport } from '../backend/DependencyReport'; +import { SourceSummary } from '../backend/SourceSummary'; + +export class Source { + 'summary'?: SourceSummary; + 'dependencies'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "summary", + "baseName": "summary", + "type": "SourceSummary", + "format": "" + }, + { + "name": "dependencies", + "baseName": "dependencies", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Source.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/generated/backend/VulnerabilitiesSummary.d.ts b/generated/backend/SourceSummary.d.ts similarity index 71% rename from generated/backend/VulnerabilitiesSummary.d.ts rename to generated/backend/SourceSummary.d.ts index 1ee53f1..b1d5709 100644 --- a/generated/backend/VulnerabilitiesSummary.d.ts +++ b/generated/backend/SourceSummary.d.ts @@ -1,21 +1,25 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export declare class VulnerabilitiesSummary { +export declare class SourceSummary { 'direct'?: number; + 'transitive'?: number; 'total'?: number; + 'dependencies'?: number; 'critical'?: number; 'high'?: number; 'medium'?: number; 'low'?: number; + 'remediations'?: number; + 'recommendations'?: number; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; diff --git a/generated/backend/VulnerabilitiesSummary.js b/generated/backend/SourceSummary.js similarity index 58% rename from generated/backend/VulnerabilitiesSummary.js rename to generated/backend/SourceSummary.js index 3932765..e1a4249 100644 --- a/generated/backend/VulnerabilitiesSummary.js +++ b/generated/backend/SourceSummary.js @@ -1,21 +1,25 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export class VulnerabilitiesSummary { +export class SourceSummary { 'direct'; + 'transitive'; 'total'; + 'dependencies'; 'critical'; 'high'; 'medium'; 'low'; + 'remediations'; + 'recommendations'; static discriminator = undefined; static attributeTypeMap = [ { @@ -24,12 +28,24 @@ export class VulnerabilitiesSummary { "type": "number", "format": "" }, + { + "name": "transitive", + "baseName": "transitive", + "type": "number", + "format": "" + }, { "name": "total", "baseName": "total", "type": "number", "format": "" }, + { + "name": "dependencies", + "baseName": "dependencies", + "type": "number", + "format": "" + }, { "name": "critical", "baseName": "critical", @@ -53,10 +69,22 @@ export class VulnerabilitiesSummary { "baseName": "low", "type": "number", "format": "" + }, + { + "name": "remediations", + "baseName": "remediations", + "type": "number", + "format": "" + }, + { + "name": "recommendations", + "baseName": "recommendations", + "type": "number", + "format": "" } ]; static getAttributeTypeMap() { - return VulnerabilitiesSummary.attributeTypeMap; + return SourceSummary.attributeTypeMap; } constructor() { } diff --git a/generated/backend/VulnerabilitiesSummary.ts b/generated/backend/SourceSummary.ts similarity index 60% rename from generated/backend/VulnerabilitiesSummary.ts rename to generated/backend/SourceSummary.ts index d2d9573..ccf5a21 100644 --- a/generated/backend/VulnerabilitiesSummary.ts +++ b/generated/backend/SourceSummary.ts @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,13 +11,17 @@ */ -export class VulnerabilitiesSummary { +export class SourceSummary { 'direct'?: number; + 'transitive'?: number; 'total'?: number; + 'dependencies'?: number; 'critical'?: number; 'high'?: number; 'medium'?: number; 'low'?: number; + 'remediations'?: number; + 'recommendations'?: number; static readonly discriminator: string | undefined = undefined; @@ -28,12 +32,24 @@ export class VulnerabilitiesSummary { "type": "number", "format": "" }, + { + "name": "transitive", + "baseName": "transitive", + "type": "number", + "format": "" + }, { "name": "total", "baseName": "total", "type": "number", "format": "" }, + { + "name": "dependencies", + "baseName": "dependencies", + "type": "number", + "format": "" + }, { "name": "critical", "baseName": "critical", @@ -57,10 +73,22 @@ export class VulnerabilitiesSummary { "baseName": "low", "type": "number", "format": "" + }, + { + "name": "remediations", + "baseName": "remediations", + "type": "number", + "format": "" + }, + { + "name": "recommendations", + "baseName": "recommendations", + "type": "number", + "format": "" } ]; static getAttributeTypeMap() { - return VulnerabilitiesSummary.attributeTypeMap; + return SourceSummary.attributeTypeMap; } public constructor() { diff --git a/generated/backend/Summary.d.ts b/generated/backend/Summary.d.ts deleted file mode 100644 index 6305c4f..0000000 --- a/generated/backend/Summary.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics - * - * OpenAPI spec version: 3.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { DependenciesSummary } from '../backend/DependenciesSummary'; -import { ProviderStatus } from '../backend/ProviderStatus'; -import { VulnerabilitiesSummary } from '../backend/VulnerabilitiesSummary'; -export declare class Summary { - 'dependencies'?: DependenciesSummary; - 'vulnerabilities'?: VulnerabilitiesSummary; - 'providerStatuses'?: Array; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} diff --git a/generated/backend/Summary.js b/generated/backend/Summary.js deleted file mode 100644 index bf91b4d..0000000 --- a/generated/backend/Summary.js +++ /dev/null @@ -1,42 +0,0 @@ -/** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics - * - * OpenAPI spec version: 3.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -export class Summary { - 'dependencies'; - 'vulnerabilities'; - 'providerStatuses'; - static discriminator = undefined; - static attributeTypeMap = [ - { - "name": "dependencies", - "baseName": "dependencies", - "type": "DependenciesSummary", - "format": "" - }, - { - "name": "vulnerabilities", - "baseName": "vulnerabilities", - "type": "VulnerabilitiesSummary", - "format": "" - }, - { - "name": "providerStatuses", - "baseName": "providerStatuses", - "type": "Array", - "format": "" - } - ]; - static getAttributeTypeMap() { - return Summary.attributeTypeMap; - } - constructor() { - } -} diff --git a/generated/backend/Summary.ts b/generated/backend/Summary.ts deleted file mode 100644 index a72b8f1..0000000 --- a/generated/backend/Summary.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics - * - * OpenAPI spec version: 3.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { DependenciesSummary } from '../backend/DependenciesSummary'; -import { ProviderStatus } from '../backend/ProviderStatus'; -import { VulnerabilitiesSummary } from '../backend/VulnerabilitiesSummary'; - -export class Summary { - 'dependencies'?: DependenciesSummary; - 'vulnerabilities'?: VulnerabilitiesSummary; - 'providerStatuses'?: Array; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "dependencies", - "baseName": "dependencies", - "type": "DependenciesSummary", - "format": "" - }, - { - "name": "vulnerabilities", - "baseName": "vulnerabilities", - "type": "VulnerabilitiesSummary", - "format": "" - }, - { - "name": "providerStatuses", - "baseName": "providerStatuses", - "type": "Array", - "format": "" - } ]; - - static getAttributeTypeMap() { - return Summary.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/generated/backend/TransitiveDependencyReport.d.ts b/generated/backend/TransitiveDependencyReport.d.ts index 4f24c85..495f0ae 100644 --- a/generated/backend/TransitiveDependencyReport.d.ts +++ b/generated/backend/TransitiveDependencyReport.d.ts @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -10,14 +10,13 @@ * Do not edit the class manually. */ import { Issue } from '../backend/Issue'; -import { PackageRef } from '../backend/PackageRef'; -import { Remediation } from '../backend/Remediation'; export declare class TransitiveDependencyReport { - 'ref'?: PackageRef; + /** + * PackageURL used to identify a dependency artifact + */ + 'ref'?: string; 'issues'?: Array; - 'remediations'?: { - [key: string]: Remediation; - }; + 'highestVulnerability'?: Issue; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; diff --git a/generated/backend/TransitiveDependencyReport.js b/generated/backend/TransitiveDependencyReport.js index 5700b33..9746d30 100644 --- a/generated/backend/TransitiveDependencyReport.js +++ b/generated/backend/TransitiveDependencyReport.js @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -10,15 +10,18 @@ * Do not edit the class manually. */ export class TransitiveDependencyReport { + /** + * PackageURL used to identify a dependency artifact + */ 'ref'; 'issues'; - 'remediations'; + 'highestVulnerability'; static discriminator = undefined; static attributeTypeMap = [ { "name": "ref", "baseName": "ref", - "type": "PackageRef", + "type": "string", "format": "" }, { @@ -28,9 +31,9 @@ export class TransitiveDependencyReport { "format": "" }, { - "name": "remediations", - "baseName": "remediations", - "type": "{ [key: string]: Remediation; }", + "name": "highestVulnerability", + "baseName": "highestVulnerability", + "type": "Issue", "format": "" } ]; diff --git a/generated/backend/TransitiveDependencyReport.ts b/generated/backend/TransitiveDependencyReport.ts index 758afb9..ef35f27 100644 --- a/generated/backend/TransitiveDependencyReport.ts +++ b/generated/backend/TransitiveDependencyReport.ts @@ -1,8 +1,8 @@ /** - * CodeReady Dependency Analytics API - * Vulnerability analysis with Red Hat CodeReady Dependency Analytics + * Exhort API + * Vulnerability analysis with Red Hat Trusted Profile Analyzer * - * OpenAPI spec version: 3.0.0 + * OpenAPI spec version: 4.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,13 +11,14 @@ */ import { Issue } from '../backend/Issue'; -import { PackageRef } from '../backend/PackageRef'; -import { Remediation } from '../backend/Remediation'; export class TransitiveDependencyReport { - 'ref'?: PackageRef; + /** + * PackageURL used to identify a dependency artifact + */ + 'ref'?: string; 'issues'?: Array; - 'remediations'?: { [key: string]: Remediation; }; + 'highestVulnerability'?: Issue; static readonly discriminator: string | undefined = undefined; @@ -25,7 +26,7 @@ export class TransitiveDependencyReport { { "name": "ref", "baseName": "ref", - "type": "PackageRef", + "type": "string", "format": "" }, { @@ -35,9 +36,9 @@ export class TransitiveDependencyReport { "format": "" }, { - "name": "remediations", - "baseName": "remediations", - "type": "{ [key: string]: Remediation; }", + "name": "highestVulnerability", + "baseName": "highestVulnerability", + "type": "Issue", "format": "" } ]; diff --git a/package.json b/package.json index f41f6a6..b757b3b 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "precompile": "rm -rf dist", "compile": "tsc -p tsconfig.json", "pregen:backend": "rm -rf generated", - "gen:backend": "openapi-generator-cli generate -i https://raw.githubusercontent.com/RHEcosystemAppEng/exhort/0.1.x/src/main/resources/META-INF/openapi.yaml -g typescript --global-property models --model-package backend -o generated", + "gen:backend": "openapi-generator-cli generate -i https://raw.githubusercontent.com/RHEcosystemAppEng/exhort/main/api-spec/v4/openapi.yaml -g typescript --global-property models --model-package backend -o generated", "postgen:backend": "find generated/backend -type f -exec sed -i \"/^import { HttpFile } from '..\\/http\\/http'/d\" {} +" }, "dependencies": { diff --git a/src/analysis.js b/src/analysis.js index 576ee2a..e27f16c 100644 --- a/src/analysis.js +++ b/src/analysis.js @@ -24,7 +24,7 @@ async function requestStack(provider, manifest, url, html = false, opts = {}) { if (process.env["EXHORT_DEBUG"] === "true") { console.log("Starting time of sending stack analysis request to exhort server= " + startTime) } - let resp = await fetch(`${url}/api/v3/analysis`, { + let resp = await fetch(`${url}/api/v4/analysis`, { method: 'POST', headers: { 'Accept': html ? 'text/html' : 'application/json', @@ -56,7 +56,7 @@ async function requestComponent(provider, data, url, opts = {}) { if (process.env["EXHORT_DEBUG"] === "true") { console.log("Starting time of sending component analysis request to exhort server= " + new Date()) } - let resp = await fetch(`${url}/api/v3/analysis`, { + let resp = await fetch(`${url}/api/v4/analysis`, { method: 'POST', headers: { 'Accept': 'application/json', @@ -78,7 +78,7 @@ async function requestComponent(provider, data, url, opts = {}) { * @return {Promise} return the HTTP status Code of the response from the validate token request. */ async function validateToken(url, opts = {}) { - let resp = await fetch(`${url}/api/v3/token`, { + let resp = await fetch(`${url}/api/v4/token`, { method: 'GET', headers: { // 'Accept': 'text/plain', diff --git a/test/it/end-to-end.js b/test/it/end-to-end.js index fe0b118..3cda8e6 100644 --- a/test/it/end-to-end.js +++ b/test/it/end-to-end.js @@ -16,8 +16,10 @@ const packageManagersDict = "pip" : "requirements.txt" } -function getParsedSummaryFromHtml(html) { - return JSON.parse(html.substring(html.indexOf("\"summary\"") + 10,html.indexOf("\"}]}") + 4)); +function getParsedKeyFromHtml(html, key,keyLength) { + let beginSummary = html.substring(html.indexOf(key)) + let summary = beginSummary.substring(keyLength , beginSummary.indexOf("}") + 1); + return JSON.parse(summary); } suite('Integration Tests', () => { @@ -46,18 +48,20 @@ suite('Integration Tests', () => { { process.env["EXHORT_PYTHON_VIRTUAL_ENV"] = "" } + process.env["EXHORT_DEV_MODE"] = "true" let manifestName = getManifestNamePerPm(packageManager) let pomPath = `test/it/test_manifests/${packageManager}/${manifestName}` let providedDataForStack = await index.stackAnalysis(pomPath) - console.log(JSON.stringify(providedDataForStack.summary,null , 4)) - expect(providedDataForStack.summary.dependencies.scanned).greaterThan(0) + console.log(JSON.stringify(providedDataForStack,null , 4)) + let providers = ["snyk"] + //providedDataForStack.providers.snyk.sources.snyk + providers.forEach(provider => expect(providedDataForStack.providers[provider].sources[provider].summary.total).greaterThan(0)) // python transitive count for stack analysis is awaiting fix in exhort backend if(packageManager !== "pip") { - expect(providedDataForStack.summary.dependencies.transitive).greaterThan(0) + expect(providedDataForStack.scanned.transitive).greaterThan(0) } - expect(providedDataForStack.summary.vulnerabilities.total).greaterThanOrEqual(0) - providedDataForStack.summary.providerStatuses.forEach(provider => expect(provider.status).equals(200)) + providers.forEach(provider => expect(providedDataForStack.providers[provider].status.code).equals(200)) }).timeout(15000); test(`Stack Analysis html for ${packageManager}`, async () => { @@ -72,17 +76,20 @@ suite('Integration Tests', () => { { process.env["EXHORT_PYTHON_VIRTUAL_ENV"] = "" } - let parsedSummaryFromHtml = getParsedSummaryFromHtml(html); + let parsedSummaryFromHtml = getParsedKeyFromHtml(html,"\"summary\"",10) + let parsedScannedFromHtml = getParsedKeyFromHtml(html, "\"scanned\"",10) + let parsedStatusFromHtml = getParsedKeyFromHtml(html, "\"status\"",9) expect( typeof html).equals("string") expect(html).include("html").include("svg") - expect(parsedSummaryFromHtml.dependencies.scanned).greaterThan(0) + expect(parsedScannedFromHtml.total).greaterThan(0) // python transitive count for stack analysis is awaiting fix in exhort backend if(packageManager !== "pip") { - expect(parsedSummaryFromHtml.dependencies.transitive).greaterThan(0) + expect(parsedScannedFromHtml.transitive).greaterThan(0) } - expect(parsedSummaryFromHtml.vulnerabilities.total).greaterThanOrEqual(0) - parsedSummaryFromHtml.providerStatuses.forEach(provider => expect(provider.status).equals(200)) + expect(parsedSummaryFromHtml.total).greaterThanOrEqual(0) + expect(parsedStatusFromHtml.code).equals(200) + // parsedSummaryFromHtml.providerStatuses.forEach(provider => expect(provider.status).equals(200)) }).timeout(15000); test(`Component Analysis for ${packageManager}`, async () => { @@ -90,15 +97,16 @@ suite('Integration Tests', () => { let pomPath = `test/it/test_manifests/${packageManager}/${manifestName}` let analysisReport = await index.componentAnalysis(manifestName,fs.readFileSync(pomPath).toString()) - expect(analysisReport.summary.dependencies.scanned).greaterThan(0) - expect(analysisReport.summary.dependencies.transitive).equal(0) - expect(analysisReport.summary.vulnerabilities.total).greaterThanOrEqual(0) - analysisReport.summary.providerStatuses.forEach(provider => expect(provider.status).equals(200)) + expect(analysisReport.scanned.total).greaterThan(0) + expect(analysisReport.scanned.transitive).equal(0) + let providers = ["snyk"] + providers.forEach(provider => expect(analysisReport.providers[provider].sources[provider].summary.total).greaterThan(0)) + providers.forEach(provider => expect(analysisReport.providers[provider].status.code).equals(200)) }).timeout(10000); }); -}); +}).beforeAll(() => process.env["EXHORT_DEV_MODE"] = "true"); // suite('Developer Test End to End', () => { // // let opts = { @@ -118,8 +126,11 @@ suite('Integration Tests', () => { // MATCH_MANIFEST_VERSIONS: 'false' // } // -// let pomPath = `/tmp/231023/requirements.txt` -// let providedDataForStack = await index.stackAnalysis(pomPath,opts) +// process.env["EXHORT_PYTHON_VIRTUAL_ENV"] = "true" +// process.env["EXHORT_PYTHON_INSTALL_BEST_EFFORTS"] = "true" +// process.env["MATCH_MANIFEST_VERSIONS"] = "false" +// let pomPath = `/tmp/251023/requirements.txt` +// let providedDataForStack = await index.stackAnalysis(pomPath) // console.log(JSON.stringify(providedDataForStack.summary,null , 4)) // expect(providedDataForStack.summary.dependencies.scanned).greaterThan(0) // }).timeout(15000);