diff --git a/src/componentAnalysis.ts b/src/componentAnalysis.ts index 95920aa7..39f4b976 100644 --- a/src/componentAnalysis.ts +++ b/src/componentAnalysis.ts @@ -176,10 +176,6 @@ async function executeComponentAnalysis (diagnosticFilePath: string, contents: s if (globalConfig.exhortSnykToken !== '') { options['EXHORT_SNYK_TOKEN'] = globalConfig.exhortSnykToken; } - if (globalConfig.exhortOSSIndexUser !== '' && globalConfig.exhortOSSIndexToken !== '') { - options['EXHORT_OSS_INDEX_USER'] = globalConfig.exhortOSSIndexUser; - options['EXHORT_OSS_INDEX_TOKEN'] = globalConfig.exhortOSSIndexToken; - } const componentAnalysisJson = await exhort.componentAnalysis(path.basename(diagnosticFilePath), contents, options); // Execute component analysis diff --git a/src/config.ts b/src/config.ts index be72f282..c313579e 100644 --- a/src/config.ts +++ b/src/config.ts @@ -15,8 +15,6 @@ class Config telemetryId: string; utmSource: string; exhortSnykToken: string; - exhortOSSIndexUser: string; - exhortOSSIndexToken: string; matchManifestVersions: string; exhortMvnPath: string; exhortNpmPath: string; @@ -35,8 +33,6 @@ class Config this.telemetryId = process.env.VSCEXT_TELEMETRY_ID || ''; this.utmSource = process.env.VSCEXT_UTM_SOURCE || ''; this.exhortSnykToken = process.env.VSCEXT_EXHORT_SNYK_TOKEN || ''; - this.exhortOSSIndexUser = process.env.VSCEXT_EXHORT_OSS_INDEX_USER || ''; - this.exhortOSSIndexToken = process.env.VSCEXT_EXHORT_OSS_INDEX_TOKEN || ''; this.matchManifestVersions = process.env.VSCEXT_MATCH_MANIFEST_VERSIONS || 'true'; this.exhortMvnPath = process.env.VSCEXT_EXHORT_MVN_PATH || 'mvn'; this.exhortNpmPath = process.env.VSCEXT_EXHORT_NPM_PATH || 'npm'; @@ -53,8 +49,6 @@ class Config */ updateConfig( data: any ) { this.exhortSnykToken = data.redHatDependencyAnalytics.exhortSnykToken; - this.exhortOSSIndexUser = data.redHatDependencyAnalytics.exhortOSSIndexUser; - this.exhortOSSIndexToken = data.redHatDependencyAnalytics.exhortOSSIndexToken; this.matchManifestVersions = data.redHatDependencyAnalytics.matchManifestVersions ? 'true' : 'false'; this.exhortMvnPath = data.mvn.executable.path || 'mvn'; this.exhortNpmPath = data.npm.executable.path || 'npm'; diff --git a/test/config.test.ts b/test/config.test.ts index 5f252936..bb95cd9c 100644 --- a/test/config.test.ts +++ b/test/config.test.ts @@ -11,8 +11,6 @@ describe('Config tests', () => { const data = { redHatDependencyAnalytics: { exhortSnykToken: 'mockToken', - exhortOSSIndexUser: 'mockUser', - exhortOSSIndexToken: 'mockToken', matchManifestVersions: false }, mvn: { @@ -41,8 +39,6 @@ describe('Config tests', () => { const partialData = { redHatDependencyAnalytics: { exhortSnykToken: 'mockToken', - exhortOSSIndexUser: 'mockUser', - exhortOSSIndexToken: 'mockToken', matchManifestVersions: true }, mvn: { @@ -74,8 +70,6 @@ describe('Config tests', () => { expect(mockConfig.telemetryId).to.eq(''); expect(mockConfig.utmSource).to.eq(''); expect(mockConfig.exhortSnykToken).to.eq(''); - expect(mockConfig.exhortOSSIndexUser).to.eq(''); - expect(mockConfig.exhortOSSIndexToken).to.eq(''); expect(mockConfig.matchManifestVersions).to.eq('true'); expect(mockConfig.exhortMvnPath).to.eq('mvn'); expect(mockConfig.exhortNpmPath).to.eq('npm'); @@ -91,8 +85,6 @@ describe('Config tests', () => { mockConfig.updateConfig(data); expect(mockConfig.exhortSnykToken).to.eq('mockToken'); - expect(mockConfig.exhortOSSIndexUser).to.eq('mockUser'); - expect(mockConfig.exhortOSSIndexToken).to.eq('mockToken'); expect(mockConfig.matchManifestVersions).to.eq('false'); expect(mockConfig.exhortMvnPath).to.eq('mockPath'); expect(mockConfig.exhortNpmPath).to.eq('mockPath'); @@ -108,8 +100,6 @@ describe('Config tests', () => { mockConfig.updateConfig(partialData); expect(mockConfig.exhortSnykToken).to.eq('mockToken'); - expect(mockConfig.exhortOSSIndexUser).to.eq('mockUser'); - expect(mockConfig.exhortOSSIndexToken).to.eq('mockToken'); expect(mockConfig.matchManifestVersions).to.eq('true'); expect(mockConfig.exhortMvnPath).to.eq('mvn'); expect(mockConfig.exhortNpmPath).to.eq('npm');