Skip to content

Commit 93b7ef2

Browse files
authored
Move buildinfo SCA logic to a separate package (jfrog#460)
1 parent 98f7e7b commit 93b7ef2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1023
-943
lines changed

buildscripts/download-jars.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ GRADLE_DEP_TREE_VERSION="3.0.2"
1111
# Changing this version also requires a change in mavenDepTreeVersion within utils/java/mvn.go.
1212
MAVEN_DEP_TREE_VERSION="1.1.1"
1313

14-
curl -fL https://releases.jfrog.io/artifactory/oss-release-local/com/jfrog/gradle-dep-tree/${GRADLE_DEP_TREE_VERSION}/gradle-dep-tree-${GRADLE_DEP_TREE_VERSION}.jar -o commands/audit/sca/java/resources/gradle-dep-tree.jar
15-
curl -fL https://releases.jfrog.io/artifactory/oss-release-local/com/jfrog/maven-dep-tree/${MAVEN_DEP_TREE_VERSION}/maven-dep-tree-${MAVEN_DEP_TREE_VERSION}.jar -o commands/audit/sca/java/resources/maven-dep-tree.jar
14+
curl -fL https://releases.jfrog.io/artifactory/oss-release-local/com/jfrog/gradle-dep-tree/${GRADLE_DEP_TREE_VERSION}/gradle-dep-tree-${GRADLE_DEP_TREE_VERSION}.jar -o sca/bom/buildinfo/technologies/java/resources/gradle-dep-tree.jar
15+
curl -fL https://releases.jfrog.io/artifactory/oss-release-local/com/jfrog/maven-dep-tree/${MAVEN_DEP_TREE_VERSION}/maven-dep-tree-${MAVEN_DEP_TREE_VERSION}.jar -o sca/bom/buildinfo/technologies/java/resources/maven-dep-tree.jar

commands/audit/audit.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import (
1010
"github.com/jfrog/jfrog-cli-core/v2/common/format"
1111
"github.com/jfrog/jfrog-cli-core/v2/utils/config"
1212
"github.com/jfrog/jfrog-cli-core/v2/utils/coreutils"
13-
"github.com/jfrog/jfrog-cli-security/commands/audit/sca"
1413
"github.com/jfrog/jfrog-cli-security/jas"
1514
"github.com/jfrog/jfrog-cli-security/jas/applicability"
1615
"github.com/jfrog/jfrog-cli-security/jas/runner"
1716
"github.com/jfrog/jfrog-cli-security/jas/secrets"
17+
"github.com/jfrog/jfrog-cli-security/sca/bom/buildinfo/technologies"
1818
"github.com/jfrog/jfrog-cli-security/utils"
1919
"github.com/jfrog/jfrog-cli-security/utils/results"
2020
"github.com/jfrog/jfrog-cli-security/utils/results/output"
@@ -428,7 +428,7 @@ func detectScanTargets(cmdResults *results.SecurityCommandResults, params *Audit
428428
continue
429429
}
430430
// Detect descriptors and technologies in the requested directory.
431-
techToWorkingDirs, err := techutils.DetectTechnologiesDescriptors(requestedDirectory, params.IsRecursiveScan(), params.Technologies(), getRequestedDescriptors(params), sca.GetExcludePattern(params.AuditBasicParams))
431+
techToWorkingDirs, err := techutils.DetectTechnologiesDescriptors(requestedDirectory, params.IsRecursiveScan(), params.Technologies(), getRequestedDescriptors(params), technologies.GetExcludePattern(params.GetConfigProfile(), params.IsRecursiveScan(), params.Exclusions()...))
432432
if err != nil {
433433
log.Warn("Couldn't detect technologies in", requestedDirectory, "directory.", err.Error())
434434
continue

commands/audit/sca/common.go

Lines changed: 0 additions & 196 deletions
This file was deleted.

0 commit comments

Comments
 (0)