Skip to content

Commit a10364b

Browse files
committed
fix spell
1 parent c2a2622 commit a10364b

File tree

8 files changed

+26
-26
lines changed

8 files changed

+26
-26
lines changed

commands/audit/audit.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ func (auditCmd *AuditCommand) Run() (err error) {
152152
SetOutputFormat(auditCmd.OutputFormat()).
153153
SetPrintExtendedTable(auditCmd.PrintExtendedTable).
154154
SetExtraMessages(messages).
155-
SetSubScansPreformed(auditCmd.ScansToPerform()).
155+
SetSubScansPerformed(auditCmd.ScansToPerform()).
156156
PrintScanResults(); err != nil {
157157
return errors.Join(err, auditResults.GetErrors())
158158
}
@@ -296,7 +296,7 @@ func createJasScansTasks(auditParallelRunner *utils.SecurityParallelRunner, scan
296296
Scanner: scanner,
297297
Module: *module,
298298
ConfigProfile: auditParams.configProfile,
299-
ScansToPreform: auditParams.ScansToPerform(),
299+
ScansToPerform: auditParams.ScansToPerform(),
300300
SecretsScanType: secrets.SecretsScannerType,
301301
DirectDependencies: auditParams.DirectDependencies(),
302302
ThirdPartyApplicabilityScan: auditParams.thirdPartyApplicabilityScan,
@@ -354,7 +354,7 @@ func initAuditCmdResults(params *AuditParams) (cmdResults *results.SecurityComma
354354
if err != nil {
355355
return
356356
}
357-
log.Info(fmt.Sprintf("Preforming scans on %d targets:\n%s", len(cmdResults.Targets), scanInfo))
357+
log.Info(fmt.Sprintf("Performing scans on %d targets:\n%s", len(cmdResults.Targets), scanInfo))
358358
return
359359
}
360360

@@ -370,14 +370,14 @@ func detectScanTargets(cmdResults *results.SecurityCommandResults, params *Audit
370370
log.Warn("Couldn't detect technologies in", requestedDirectory, "directory.", err.Error())
371371
continue
372372
}
373-
// Create scans to preform
373+
// Create scans to perform
374374
for tech, workingDirs := range techToWorkingDirs {
375375
if tech == techutils.Dotnet {
376376
// We detect Dotnet and Nuget the same way, if one detected so does the other.
377377
// We don't need to scan for both and get duplicate results.
378378
continue
379379
}
380-
// No technology was detected, add scan without descriptors. (so no sca scan will be preformed and set at target level)
380+
// No technology was detected, add scan without descriptors. (so no sca scan will be performed and set at target level)
381381
if len(workingDirs) == 0 {
382382
// Requested technology (from params) descriptors/indicators were not found or recursive scan with NoTech value, add scan without descriptors.
383383
cmdResults.NewScanResults(results.ScanTarget{Target: requestedDirectory, Technology: tech})

commands/audit/audit_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333
"github.com/jfrog/jfrog-client-go/xsc/services"
3434
)
3535

36-
func TestDetectScansToPreform(t *testing.T) {
36+
func TestDetectScansToPerform(t *testing.T) {
3737

3838
dir, cleanUp := createTestDir(t)
3939

commands/audit/scarunner.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import (
4040
xrayCmdUtils "github.com/jfrog/jfrog-client-go/xray/services/utils"
4141
)
4242

43-
// We can only preform SCA scan if we identified at least one technology for a target.
43+
// We can only perform SCA scan if we identified at least one technology for a target.
4444
func hasAtLeastOneTech(cmdResults *results.SecurityCommandResults) bool {
4545
if len(cmdResults.Targets) == 0 {
4646
return false
@@ -85,7 +85,7 @@ func buildDepTreeAndRunScaScan(auditParallelRunner *utils.SecurityParallelRunner
8585
// Make sure to return to the original working directory, buildDependencyTree may change it
8686
generalError = errors.Join(generalError, errorutils.CheckError(os.Chdir(currentWorkingDir)))
8787
}()
88-
// Preform SCA scans
88+
// Perform SCA scans
8989
for _, targetResult := range cmdResults.Targets {
9090
if targetResult.Technology == "" {
9191
log.Warn(fmt.Sprintf("Couldn't determine a package manager or build tool used by this project. Skipping the SCA scan in '%s'...", targetResult.Target))
@@ -99,7 +99,7 @@ func buildDepTreeAndRunScaScan(auditParallelRunner *utils.SecurityParallelRunner
9999
log.Warn(bdtErr.Error())
100100
continue
101101
}
102-
_ = targetResult.AddTargetError(fmt.Errorf("Failed to build dependency tree: %s", bdtErr.Error()), auditParams.AllowPartialResults())
102+
_ = targetResult.AddTargetError(fmt.Errorf("failed to build dependency tree: %s", bdtErr.Error()), auditParams.AllowPartialResults())
103103
continue
104104
}
105105
// Create sca scan task
@@ -124,7 +124,7 @@ func getRequestedDescriptors(params *AuditParams) map[techutils.Technology][]str
124124
return requestedDescriptors
125125
}
126126

127-
// Preform the SCA scan for the given scan information.
127+
// Perform the SCA scan for the given scan information.
128128
func executeScaScanTask(auditParallelRunner *utils.SecurityParallelRunner, serverDetails *config.ServerDetails, auditParams *AuditParams,
129129
scan *results.TargetResults, treeResult *DependencyTreeResult) parallel.TaskFunc {
130130
return func(threadId int) (err error) {

commands/scan/scan.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ func (scanCmd *ScanCommand) createIndexerHandlerFunc(file *spec.File, cmdResults
493493
ServerDetails: scanCmd.serverDetails,
494494
Scanner: scanner,
495495
Module: module,
496-
ScansToPreform: utils.GetAllSupportedScans(),
496+
ScansToPerform: utils.GetAllSupportedScans(),
497497
SecretsScanType: secrets.SecretsScannerDockerScanType,
498498
DirectDependencies: directDepsListFromVulnerabilities(*graphScanResults),
499499
ApplicableScanType: applicability.ApplicabilityDockerScanScanType,

jas/runner/jasrunner.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type JasRunnerParams struct {
3131
ConfigProfile *services.ConfigProfile
3232
AllowPartialResults bool
3333

34-
ScansToPreform []utils.SubScanType
34+
ScansToPerform []utils.SubScanType
3535

3636
// Secret scan flags
3737
SecretsScanType secrets.SecretsScanType
@@ -81,7 +81,7 @@ func addJasScanTaskForModuleIfNeeded(params JasRunnerParams, subScan utils.SubSc
8181
if jasType == "" {
8282
return fmt.Errorf("failed to determine Jas scan type for %s", subScan)
8383
}
84-
if len(params.ScansToPreform) > 0 && !slices.Contains(params.ScansToPreform, subScan) {
84+
if len(params.ScansToPerform) > 0 && !slices.Contains(params.ScansToPerform, subScan) {
8585
log.Debug(fmt.Sprintf("Skipping %s scan as requested by input...", subScan))
8686
return
8787
}

jas/runner/jasrunner_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func TestJasRunner(t *testing.T) {
5050
Runner: securityParallelRunnerForTest,
5151
Scanner: jasScanner,
5252
ScanResults: targetResults,
53-
ScansToPreform: utils.GetAllSupportedScans(),
53+
ScansToPerform: utils.GetAllSupportedScans(),
5454
ApplicableScanType: applicability.ApplicabilityScannerType,
5555
SecretsScanType: secrets.SecretsScannerType,
5656
DirectDependencies: &[]string{"issueId_1_direct_dependency", "issueId_2_direct_dependency"},

utils/auditbasicparams.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ type AuditBasicParams struct {
5959
depsRepo string
6060
installCommandName string
6161
technologies []string
62-
scansToPreform []SubScanType
62+
scansToPerform []SubScanType
6363
args []string
6464
installCommandArgs []string
6565
dependenciesForApplicabilityScan []string
@@ -164,12 +164,12 @@ func (abp *AuditBasicParams) SetTechnologies(technologies []string) *AuditBasicP
164164
}
165165

166166
func (abp *AuditBasicParams) SetScansToPerform(scansToPerform []SubScanType) *AuditBasicParams {
167-
abp.scansToPreform = scansToPerform
167+
abp.scansToPerform = scansToPerform
168168
return abp
169169
}
170170

171171
func (abp *AuditBasicParams) ScansToPerform() []SubScanType {
172-
return abp.scansToPreform
172+
return abp.scansToPerform
173173
}
174174

175175
func (abp *AuditBasicParams) Progress() ioUtils.ProgressMgr {

utils/results/output/resultwriter.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ type ResultsWriter struct {
3232
isMultipleRoots *bool
3333
// PrintExtended, If true, show extended results.
3434
printExtended bool
35-
// For table format - show table only for the given subScansPreformed
36-
subScansPreformed []utils.SubScanType
35+
// For table format - show table only for the given subScansPerformed
36+
subScansPerformed []utils.SubScanType
3737
// Messages - Option array of messages, to be displayed if the format is Table
3838
messages []string
3939
}
@@ -52,8 +52,8 @@ func (rw *ResultsWriter) SetIsMultipleRootProject(isMultipleRootProject bool) *R
5252
return rw
5353
}
5454

55-
func (rw *ResultsWriter) SetSubScansPreformed(subScansPreformed []utils.SubScanType) *ResultsWriter {
56-
rw.subScansPreformed = subScansPreformed
55+
func (rw *ResultsWriter) SetSubScansPerformed(subScansPerformed []utils.SubScanType) *ResultsWriter {
56+
rw.subScansPerformed = subScansPerformed
5757
return rw
5858
}
5959

@@ -137,7 +137,7 @@ func (rw *ResultsWriter) createResultsConvertor(pretty bool) *conversion.Command
137137
IncludeLicenses: rw.includeLicenses,
138138
IncludeVulnerabilities: rw.includeVulnerabilities,
139139
HasViolationContext: rw.hasViolationContext,
140-
RequestedScans: rw.subScansPreformed,
140+
RequestedScans: rw.subScansPerformed,
141141
Pretty: pretty,
142142
})
143143
}
@@ -201,7 +201,7 @@ func (rw *ResultsWriter) printTables() (err error) {
201201
if err = rw.printOrSaveRawResults(true); err != nil {
202202
return
203203
}
204-
if utils.IsScanRequested(rw.commandResults.CmdType, utils.ScaScan, rw.subScansPreformed...) {
204+
if utils.IsScanRequested(rw.commandResults.CmdType, utils.ScaScan, rw.subScansPerformed...) {
205205
if rw.hasViolationContext {
206206
if err = PrintViolationsTable(tableContent, rw.commandResults.CmdType, rw.printExtended); err != nil {
207207
return
@@ -218,17 +218,17 @@ func (rw *ResultsWriter) printTables() (err error) {
218218
}
219219
}
220220
}
221-
if utils.IsScanRequested(rw.commandResults.CmdType, utils.SecretsScan, rw.subScansPreformed...) {
221+
if utils.IsScanRequested(rw.commandResults.CmdType, utils.SecretsScan, rw.subScansPerformed...) {
222222
if err = PrintSecretsTable(tableContent, rw.commandResults.EntitledForJas, rw.commandResults.SecretValidation); err != nil {
223223
return
224224
}
225225
}
226-
if utils.IsScanRequested(rw.commandResults.CmdType, utils.IacScan, rw.subScansPreformed...) {
226+
if utils.IsScanRequested(rw.commandResults.CmdType, utils.IacScan, rw.subScansPerformed...) {
227227
if err = PrintJasTable(tableContent, rw.commandResults.EntitledForJas, jasutils.IaC); err != nil {
228228
return
229229
}
230230
}
231-
if !utils.IsScanRequested(rw.commandResults.CmdType, utils.SastScan, rw.subScansPreformed...) {
231+
if !utils.IsScanRequested(rw.commandResults.CmdType, utils.SastScan, rw.subScansPerformed...) {
232232
return nil
233233
}
234234
return PrintJasTable(tableContent, rw.commandResults.EntitledForJas, jasutils.Sast)

0 commit comments

Comments
 (0)