Skip to content

Commit 67152c5

Browse files
Merge branch 'main' into feature/update-secrets-licensing-pre-commit-and-pre-receive
2 parents 6f9340e + f3a5174 commit 67152c5

25 files changed

Lines changed: 210 additions & 46 deletions

.github/workflows/ai-code-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Code Review with OpenAI
1+
name: AI Code Review
22

33
on:
44
pull_request:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ jobs:
2222
cx_tenant: ${{ secrets.AST_RND_SCANS_TENANT }}
2323
cx_client_id: ${{ secrets.AST_RND_SCANS_CLIENT_ID }}
2424
cx_client_secret: ${{ secrets.AST_RND_SCANS_CLIENT_SECRET }}
25-
additional_params: --tags phoenix --threshold "sca-critical=1;sca-high=1;sca-medium=1;sca-low=1;sast-critical=1;sast-high=1;sast-medium=1;sast-low=1;iac-security-critical=1;iac-security-high=1;iac-security-medium=1;iac-security-low=1"
25+
additional_params: --tags sypher --threshold "sca-critical=1;sca-high=1;sca-medium=1;sca-low=1;sast-critical=1;sast-high=1;sast-medium=1;sast-low=1;iac-security-critical=1;iac-security-high=1;iac-security-medium=1;iac-security-low=1"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Checkmarx One CLI
1+
name: Continuous Integration Tests
22

33
on:
44
pull_request:
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: PR Automation
1+
name: PR add reviewers
22
on:
33
pull_request_target:
44
types: [ready_for_review, opened, reopened]
@@ -19,4 +19,4 @@ jobs:
1919
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2020
PRNUM: ${{ github.event.pull_request.number }}
2121
PRAUTHOR: ${{ github.event.pull_request.user.login }}
22-
run: gh pr edit $PRNUM --add-reviewer cx-anurag-dalke
22+
run: gh pr edit $PRNUM --add-reviewer cx-plugins-releases

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ jobs:
146146
product_name: CLI
147147
release_version: ${{ inputs.tag }}
148148
cli_release_version: ""
149-
release_author: "Phoenix Team"
149+
release_author: "Sypher Team"
150150
release_url: https://github.com/Checkmarx/ast-cli/releases/tag/${{ inputs.tag }}
151151
jira_product_name: ASTCLI
152152
secrets: inherit

go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ require (
3535
)
3636

3737
require (
38-
github.com/ncruces/go-strftime v0.1.9 // indirect
39-
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
40-
modernc.org/libc v1.66.3 // indirect
41-
modernc.org/mathutil v1.7.1 // indirect
42-
modernc.org/memory v1.11.0 // indirect
43-
modernc.org/sqlite v1.38.2 // indirect
4438
dario.cat/mergo v1.0.1 // indirect
4539
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 // indirect
4640
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20240914100643-eb91380d8434 // indirect
@@ -209,6 +203,7 @@ require (
209203
github.com/muesli/termenv v0.16.0 // indirect
210204
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
211205
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
206+
github.com/ncruces/go-strftime v0.1.9 // indirect
212207
github.com/nwaples/rardecode v1.1.3 // indirect
213208
github.com/olekukonko/tablewriter v0.0.5 // indirect
214209
github.com/opencontainers/go-digest v1.0.0 // indirect
@@ -223,6 +218,7 @@ require (
223218
github.com/pjbgf/sha1cd v0.3.2 // indirect
224219
github.com/pkg/profile v1.7.0 // indirect
225220
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
221+
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
226222
github.com/rivo/uniseg v0.4.7 // indirect
227223
github.com/rs/zerolog v1.34.0 // indirect
228224
github.com/rubenv/sql-migrate v1.8.0 // indirect
@@ -251,7 +247,7 @@ require (
251247
github.com/sylabs/sif/v2 v2.21.1 // indirect
252248
github.com/sylabs/squashfs v1.0.6 // indirect
253249
github.com/therootcompany/xz v1.0.1 // indirect
254-
github.com/ulikunitz/xz v0.5.12 // indirect
250+
github.com/ulikunitz/xz v0.5.15 // indirect
255251
github.com/vbatts/go-mtree v0.5.4 // indirect
256252
github.com/vbatts/tar-split v0.12.1 // indirect
257253
github.com/vifraa/gopom v1.0.0 // indirect
@@ -304,6 +300,10 @@ require (
304300
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
305301
k8s.io/kubectl v0.33.3 // indirect
306302
k8s.io/utils v0.0.0-20250321185631-1f6e0b77f77e // indirect
303+
modernc.org/libc v1.66.3 // indirect
304+
modernc.org/mathutil v1.7.1 // indirect
305+
modernc.org/memory v1.11.0 // indirect
306+
modernc.org/sqlite v1.38.2 // indirect
307307
oras.land/oras-go/v2 v2.6.0 // indirect
308308
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
309309
sigs.k8s.io/kustomize/api v0.19.0 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -960,8 +960,8 @@ github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80 h1:nrZ3ySNYwJ
960960
github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80/go.mod h1:iFyPdL66DjUD96XmzVL3ZntbzcflLnznH0fr99w5VqE=
961961
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
962962
github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
963-
github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc=
964-
github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
963+
github.com/ulikunitz/xz v0.5.15 h1:9DNdB5s+SgV3bQ2ApL10xRc35ck0DuIX/isZvIk+ubY=
964+
github.com/ulikunitz/xz v0.5.15/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
965965
github.com/vbatts/go-mtree v0.5.4 h1:OMAb8jaCyiFA7zXj0Zc/oARcxBDBoeu2LizjB8BVJl0=
966966
github.com/vbatts/go-mtree v0.5.4/go.mod h1:5GqJbVhm9BBiCc4K5uc/c42FPgXulHaQs4sFUEfIWMo=
967967
github.com/vbatts/tar-split v0.12.1 h1:CqKoORW7BUWBe7UL/iqTVvkTBOF8UvOMKOIZykxnnbo=

internal/commands/result.go

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ func filterResultsByType(results *wrappers.ScanResultsCollection, excludedTypes
11581158
func filterScsResultsByAgent(results *wrappers.ScanResultsCollection, agent string) *wrappers.ScanResultsCollection {
11591159
unsupportedTypesByAgent := map[string][]string{
11601160
commonParams.VSCodeAgent: {commonParams.SCSScorecardType},
1161-
commonParams.JetbrainsAgent: {commonParams.SCSScorecardType, commonParams.SCSSecretDetectionType},
1161+
commonParams.JetbrainsAgent: {commonParams.SCSScorecardType},
11621162
commonParams.EclipseAgent: {commonParams.SCSScorecardType, commonParams.SCSSecretDetectionType},
11631163
commonParams.VisualStudioAgent: {commonParams.SCSScorecardType, commonParams.SCSSecretDetectionType},
11641164
}
@@ -1211,7 +1211,7 @@ func CreateScanReport(
12111211
return nil, err
12121212
}
12131213
if !scanPending {
1214-
results, err = ReadResults(resultsWrapper, exportWrapper, scan, resultsParams, agent)
1214+
results, err = ReadResults(resultsWrapper, exportWrapper, scan, resultsParams, agent, featureFlagsWrapper)
12151215
if err != nil {
12161216
return nil, err
12171217
}
@@ -1498,8 +1498,7 @@ func ReadResults(
14981498
exportWrapper wrappers.ExportWrapper,
14991499
scan *wrappers.ScanResponseModel,
15001500
resultsParams map[string]string,
1501-
agent string,
1502-
) (results *wrappers.ScanResultsCollection, err error) {
1501+
agent string, featureflagsWrappers wrappers.FeatureFlagsWrapper) (results *wrappers.ScanResultsCollection, err error) {
15031502
var resultsModel *wrappers.ScanResultsCollection
15041503
var errorModel *wrappers.WebError
15051504

@@ -1522,7 +1521,7 @@ func ReadResults(
15221521
// Compute SAST results redundancy
15231522
resultsModel = ComputeRedundantSastResults(resultsModel)
15241523
}
1525-
resultsModel, err = enrichScaResults(exportWrapper, scan, resultsModel, scaHideDevAndTestDep)
1524+
resultsModel, err = enrichScaResults(exportWrapper, scan, resultsModel, scaHideDevAndTestDep, featureflagsWrappers)
15261525
if err != nil {
15271526
return nil, err
15281527
}
@@ -1545,10 +1544,9 @@ func enrichScaResults(
15451544
exportWrapper wrappers.ExportWrapper,
15461545
scan *wrappers.ScanResponseModel,
15471546
resultsModel *wrappers.ScanResultsCollection,
1548-
scaHideDevAndTestDep bool,
1549-
) (*wrappers.ScanResultsCollection, error) {
1547+
scaHideDevAndTestDep bool, featureflagWrapper wrappers.FeatureFlagsWrapper) (*wrappers.ScanResultsCollection, error) {
15501548
if slices.Contains(scan.Engines, commonParams.ScaType) {
1551-
scaExportDetails, err := services.GetExportPackage(exportWrapper, scan.ID, scaHideDevAndTestDep)
1549+
scaExportDetails, err := services.GetExportPackage(exportWrapper, scan.ID, scaHideDevAndTestDep, featureflagWrapper)
15521550
if err != nil {
15531551
return nil, errors.Wrapf(err, "%s", failedListingResults)
15541552
}

internal/commands/result_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ func TestRunScsResultsShow_VSCode_AgentShouldNotShowScorecardResults(t *testing.
197197
mock.SetScsMockVarsToDefault()
198198
}
199199

200-
func TestRunScsResultsShow_Other_AgentsShouldNotShowScsResults(t *testing.T) {
200+
func TestRunScsResultsShow_Jetbrains_AgentShouldShowScsResults(t *testing.T) {
201201
clearFlags()
202202
mock.HasScs = true
203203
mock.ScsScanPartial = false
@@ -206,8 +206,8 @@ func TestRunScsResultsShow_Other_AgentsShouldNotShowScsResults(t *testing.T) {
206206

207207
execCmdNilAssertion(t, "results", "show", "--scan-id", "SCS_ONLY", "--report-format", "json", "--agent", params.JetbrainsAgent)
208208
assertTypePresentJSON(t, params.SCSScorecardType, 0)
209-
assertTypePresentJSON(t, params.SCSSecretDetectionType, 0)
210-
assertTotalCountJSON(t, 0)
209+
assertTypePresentJSON(t, params.SCSSecretDetectionType, 2)
210+
assertTotalCountJSON(t, 2)
211211

212212
removeFileBySuffix(t, printer.FormatJSON)
213213
mock.SetScsMockVarsToDefault()

internal/commands/scan.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,7 @@ func getResubmitConfiguration(scansWrapper wrappers.ScansWrapper, projectID, use
10301030

10311031
if len(allScansModel.Scans) > 0 {
10321032
scanModelResponse := allScansModel.Scans[0]
1033+
scanModelResponse.ReplaceMicroEnginesWithSCS()
10331034
config = scanModelResponse.Metadata.Configs
10341035
engines := scanModelResponse.Engines
10351036
// Check if there are no scan types sent using the flags, and use the latest scan engine types

0 commit comments

Comments
 (0)