Add support for additional CLI parameters

This commit is contained in:
Justin Hutchings
2023-01-22 19:46:41 +00:00
parent f78092ab95
commit 2429993ba1
6 changed files with 39 additions and 4 deletions
+1
View File
@@ -5,6 +5,7 @@ export default class ComponentDetection {
static scanAndGetManifests(path: string): Promise<Manifest[] | undefined>;
private static downloadLatestRelease;
private static runComponentDetection;
private static getComponentDetectionParameters;
private static getManifestsFromResults;
private static getDependencyScope;
private static makePackageUrl;
Generated Vendored
+10 -1
View File
@@ -23772,13 +23772,22 @@ class ComponentDetection {
return __awaiter(this, void 0, void 0, function* () {
core.info("Running component-detection");
try {
yield exec.exec(`${this.componentDetectionPath} scan --SourceDirectory ${path} --ManifestFile ${this.outputPath}`);
yield exec.exec(`${this.componentDetectionPath} scan --SourceDirectory ${path} --ManifestFile ${this.outputPath} ${this.getComponentDetectionParameters()}`);
}
catch (error) {
core.error(error);
}
});
}
static getComponentDetectionParameters() {
var parameters = "";
parameters += (core.getInput('directoryExclusionList')) ? ` --DirectoryExclusionList ${core.getInput('directoryExclusionList')}` : "";
parameters += (core.getInput('ignoreDirectories')) ? ` --IgnoreDirectories ${core.getInput('ignoreDirectories')}` : "";
parameters += (core.getInput('detectorArgs')) ? ` --DetectorArgs ${core.getInput('detectorArgs')}` : "";
parameters += (core.getInput('detectorsFilter')) ? ` --DetectorsFilter ${core.getInput('detectorsFilter')}` : "";
parameters += (core.getInput('dockerImagesToScan')) ? ` --DockerImagesToScan ${core.getInput('dockerImagesToScan')}` : "";
return parameters;
}
static getManifestsFromResults() {
return __awaiter(this, void 0, void 0, function* () {
core.info("Getting manifests from results");
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long