From e7fafc8af1161db737de1cde41a03a2cc9f339e0 Mon Sep 17 00:00:00 2001 From: MarkAckert Date: Fri, 2 Feb 2024 13:01:39 -0500 Subject: [PATCH] fix some scans which weren't working Signed-off-by: MarkAckert --- licenses/dependency-scan/resources/repoRules.json | 15 +++++++++++++++ .../src/actions/ort/OrtScanAction.ts | 8 +++++++- .../dependency-scan/src/constants/Constants.ts | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/licenses/dependency-scan/resources/repoRules.json b/licenses/dependency-scan/resources/repoRules.json index 75242c7..39e8544 100644 --- a/licenses/dependency-scan/resources/repoRules.json +++ b/licenses/dependency-scan/resources/repoRules.json @@ -33,6 +33,21 @@ ] } }, + "sample-angular-app": { + "analyzer": { + "allow_dynamic_versions": true + } + }, + "sample-iframe-app": { + "analyzer": { + "allow_dynamic_versions": true + } + }, + "sample-react-app": { + "analyzer": { + "allow_dynamic_versions": true + } + }, "vscode-extension-for-zowe": { "excludes": { "paths": [ diff --git a/licenses/dependency-scan/src/actions/ort/OrtScanAction.ts b/licenses/dependency-scan/src/actions/ort/OrtScanAction.ts index a89ffec..a3b244e 100644 --- a/licenses/dependency-scan/src/actions/ort/OrtScanAction.ts +++ b/licenses/dependency-scan/src/actions/ort/OrtScanAction.ts @@ -59,7 +59,13 @@ export class OrtScanAction implements IAction { console.log("Scanning individual project " + projectDir); const analyzerFlags = this.repoRules.getOrtAnalyzerFlags(projectDir); - + + if (projectDir.includes("orion-editor-component")) { + console.log("Fixing orion-editor-components old references to gizaartifactory..."); + const fixedPkgLock = fs.readFileSync(projectDir + path.sep + "package-lock.json").toString() + .replaceAll('gizaartifactory', 'zowe'); + fs.writeFileSync(projectDir + path.sep + "package-lock.json", fixedPkgLock); + } const licenseProcess = spawn("ort", [Constants.ORT_LOG_LEVEL, analyzerFlags, "analyze", "-i", projectDir, diff --git a/licenses/dependency-scan/src/constants/Constants.ts b/licenses/dependency-scan/src/constants/Constants.ts index de9db03..b8836ec 100644 --- a/licenses/dependency-scan/src/constants/Constants.ts +++ b/licenses/dependency-scan/src/constants/Constants.ts @@ -71,7 +71,7 @@ export class Constants { // only change if re-running builds / modifying manifest or other metadata locally public static readonly DOWNLOAD_MANIFEST: boolean = Utilities.getEnv("ZOWE_DL_MANIFEST", true); - public static readonly ZOWE_MANIFEST_BRANCH: string = Utilities.getEnvStr("ZOWE_MANIFEST_BRANCH", "v1.7.0"); + public static readonly ZOWE_MANIFEST_BRANCH: string = Utilities.getEnvStr("ZOWE_MANIFEST_BRANCH", "v2.x/rc"); public static readonly EXEC_CLONE: boolean = Utilities.getEnv("ZOWE_STEP_CLONE", true);