Skip to content

Commit

Permalink
feat: allow diffscans to be sent to bearer cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
gotbadger committed Oct 4, 2023
1 parent d4bfbfe commit 9bedf73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion internal/commands/artifact/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
"github.com/bearer/bearer/internal/types"
)

var ErrFileListEmpty = errors.New("couldn't find any files to scan in the specified directory")
var ErrFileListEmpty = errors.New("couldn't find any files to scan in the specified directory, for diff scans this can mean the compared branches were identical")

// TargetKind represents what kind of artifact bearer scans
type TargetKind string
Expand Down
6 changes: 1 addition & 5 deletions internal/commands/process/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,9 @@ func FromOptions(opts flag.Options, versionMeta *version_check.VersionMeta) (Con
}

if config.Scan.DiffBaseBranch != "" {
if config.Report.Report != flag.ReportSecurity {
if config.Report.Report != flag.ReportSecurity && config.Report.Report != flag.ReportSaaS {
return Config{}, errors.New("diff base branch is only supported for the security report")
}

if config.Client != nil {
return Config{}, errors.New("diff base branch is not supported when using an api key")
}
}

return config, nil
Expand Down

0 comments on commit 9bedf73

Please sign in to comment.