diff --git a/cmd/whitesourceExecuteScan_generated.go b/cmd/whitesourceExecuteScan_generated.go index 3b11952d6..9de8ebc25 100644 --- a/cmd/whitesourceExecuteScan_generated.go +++ b/cmd/whitesourceExecuteScan_generated.go @@ -623,6 +623,7 @@ func whitesourceExecuteScanMetadata() config.StepData { {Image: "maven:3.5-jdk-8", WorkingDir: "/tmp", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "maven"}}}}}, {Image: "node:lts-stretch", WorkingDir: "/home/node", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "npm"}}}}}, {Image: "python:3.6-stretch", WorkingDir: "/tmp", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "pip"}}}}}, + {Image: "node:lts-stretch", WorkingDir: "/home/node", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "yarn"}}}}}, }, Outputs: config.StepOutputs{ Resources: []config.StepResources{ diff --git a/pkg/whitesource/configHelper.go b/pkg/whitesource/configHelper.go index 0ef1746f9..0d365deda 100644 --- a/pkg/whitesource/configHelper.go +++ b/pkg/whitesource/configHelper.go @@ -206,6 +206,11 @@ func (c *ConfigOptions) addBuildToolDefaults(config *ScanOptions, utils Utils) e {Name: "includes", Value: "**/*.jar"}, {Name: "excludes", Value: "**/*sources.jar **/*javadoc.jar"}, }, + "yarn": { + {Name: "npm.resolveDependencies", Value: true, Force: true}, + {Name: "npm.ignoreSourceFiles", Value: true, Force: true}, + {Name: "npm.yarnProject", Value: true, Force: true}, + }, } if config.BuildTool == "maven" { diff --git a/resources/metadata/whitesource.yaml b/resources/metadata/whitesource.yaml index 18820b691..e1d0b882b 100644 --- a/resources/metadata/whitesource.yaml +++ b/resources/metadata/whitesource.yaml @@ -523,3 +523,11 @@ spec: params: - name: buildTool value: pip + - image: node:lts-stretch + workingDir: /home/node + env: [] + conditions: + - conditionRef: strings-equal + params: + - name: buildTool + value: yarn