Add support for additional CLI parameters
This commit is contained in:
+1
@@ -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;
|
||||
|
||||
+10
-1
@@ -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");
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user