Skip to content

Commit

Permalink
Adjustments due to changes in path exclusions logic (#650)
Browse files Browse the repository at this point in the history
  • Loading branch information
eranturgeman authored Feb 28, 2024
1 parent 0d54969 commit 438e442
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions utils/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"github.com/jfrog/jfrog-cli-security/commands/audit/jas"
"net/http"
"net/url"
"os"
Expand All @@ -12,7 +13,6 @@ import (
"strings"

"github.com/jfrog/frogbot/v2/utils/outputwriter"
"github.com/jfrog/jfrog-cli-security/commands/audit"
xrutils "github.com/jfrog/jfrog-cli-security/utils"

"github.com/jfrog/build-info-go/utils"
Expand Down Expand Up @@ -102,7 +102,7 @@ func (p *Project) setDefaultsIfNeeded() error {
}
if len(p.PathExclusions) == 0 {
if p.PathExclusions, _ = readArrayParamFromEnv(PathExclusionsEnv, ";"); len(p.PathExclusions) == 0 {
p.PathExclusions = audit.DefaultExcludePatterns
p.PathExclusions = jas.DefaultExcludePatterns
}
}
if p.UseWrapper == nil {
Expand Down
6 changes: 3 additions & 3 deletions utils/scandetails.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ func (sc *ScanDetails) RunInstallAndAudit(workDirs ...string) (auditResults *xra
auditParams := audit.NewAuditParams().
SetXrayGraphScanParams(sc.XrayGraphScanParams).
SetWorkingDirs(workDirs).
SetExclusions(sc.PathExclusions).
SetMinSeverityFilter(sc.MinSeverityFilter()).
SetFixableOnly(sc.FixableOnly()).
SetGraphBasicParams(auditBasicParams).
SetIsRecursiveScan(sc.IsRecursiveScan)
SetGraphBasicParams(auditBasicParams)

auditParams.SetExclusions(sc.PathExclusions).SetIsRecursiveScan(sc.IsRecursiveScan)

auditResults, err = audit.RunAudit(auditParams)
if auditResults != nil {
Expand Down

0 comments on commit 438e442

Please sign in to comment.