` +
- police.Name +
+ policy.Name +
`
|
` +
`
- ` + strings.Join(police.RulesViolated, ",") +
+ ` + strings.Join(policy.RulesViolated, ",") +
`
|
` + `` +
- strconv.FormatBool(police.BreakBuild) +
+ strconv.FormatBool(policy.BreakBuild) +
`
|
@@ -144,8 +215,8 @@ func (r *ResultSummary) GeneratePolicyMarkdown() string {
markdown += "### Policy Management Violation\n"
}
markdown += "| Policy | Rule | Break Build |\n|:----------:|:------------:|:---------:|\n"
- for _, police := range r.Policies.Polices {
- markdown += "|" + police.Name + "|" + strings.Join(police.RulesViolated, ",") + "|" + strconv.FormatBool(police.BreakBuild) + "|\n"
+ for _, policy := range r.Policies.Policies {
+ markdown += "|" + policy.Name + "|" + strings.Join(policy.RulesViolated, ",") + "|" + strconv.FormatBool(policy.BreakBuild) + "|\n"
}
return markdown
}
diff --git a/internal/wrappers/risks-overview-http.go b/internal/wrappers/risks-overview-http.go
index f2e2dfb19..f9cded7b8 100644
--- a/internal/wrappers/risks-overview-http.go
+++ b/internal/wrappers/risks-overview-http.go
@@ -32,7 +32,11 @@ func (r *RisksOverviewHTTPWrapper) GetAllAPISecRisksByScanID(scanID string) (
return nil, nil, err
}
- defer resp.Body.Close()
+ defer func() {
+ if err == nil {
+ _ = resp.Body.Close()
+ }
+ }()
decoder := json.NewDecoder(resp.Body)
switch resp.StatusCode {
diff --git a/internal/wrappers/sast-metadata-http.go b/internal/wrappers/sast-metadata-http.go
index f36d8861a..0d437f690 100644
--- a/internal/wrappers/sast-metadata-http.go
+++ b/internal/wrappers/sast-metadata-http.go
@@ -30,7 +30,11 @@ func (s *SastIncrementalHTTPWrapper) GetSastMetadataByIDs(params map[string]stri
}
decoder := json.NewDecoder(resp.Body)
- defer resp.Body.Close()
+ defer func() {
+ if err == nil {
+ _ = resp.Body.Close()
+ }
+ }()
switch resp.StatusCode {
case http.StatusBadRequest, http.StatusInternalServerError:
diff --git a/internal/wrappers/scans-http.go b/internal/wrappers/scans-http.go
index 5fe00946a..fc65bedb1 100644
--- a/internal/wrappers/scans-http.go
+++ b/internal/wrappers/scans-http.go
@@ -39,7 +39,11 @@ func (s *ScansHTTPWrapper) Create(model *Scan) (*ScanResponseModel, *ErrorModel,
if err != nil {
return nil, nil, err
}
- defer resp.Body.Close()
+ defer func() {
+ if err == nil {
+ _ = resp.Body.Close()
+ }
+ }()
return handleScanResponseWithBody(resp, err, http.StatusCreated)
}
@@ -51,7 +55,11 @@ func (s *ScansHTTPWrapper) Get(params map[string]string) (*ScansCollectionRespon
}
decoder := json.NewDecoder(resp.Body)
- defer resp.Body.Close()
+ defer func() {
+ if err == nil {
+ _ = resp.Body.Close()
+ }
+ }()
switch resp.StatusCode {
case http.StatusBadRequest, http.StatusInternalServerError:
@@ -81,7 +89,11 @@ func (s *ScansHTTPWrapper) GetByID(scanID string) (*ScanResponseModel, *ErrorMod
if err != nil {
return nil, nil, err
}
- defer resp.Body.Close()
+ defer func() {
+ if err == nil {
+ _ = resp.Body.Close()
+ }
+ }()
return handleScanResponseWithBody(resp, err, http.StatusOK)
}
@@ -92,7 +104,11 @@ func (s *ScansHTTPWrapper) GetWorkflowByID(scanID string) ([]*ScanTaskResponseMo
if err != nil {
return nil, nil, err
}
- defer resp.Body.Close()
+ defer func() {
+ if err == nil {
+ _ = resp.Body.Close()
+ }
+ }()
return handleWorkflowResponseWithBody(resp, err)
}
@@ -129,7 +145,11 @@ func (s *ScansHTTPWrapper) Delete(scanID string) (*ErrorModel, error) {
if err != nil {
return nil, err
}
- defer resp.Body.Close()
+ defer func() {
+ if err == nil {
+ _ = resp.Body.Close()
+ }
+ }()
return handleScanResponseWithNoBody(resp, err, http.StatusNoContent)
}
@@ -146,7 +166,11 @@ func (s *ScansHTTPWrapper) Cancel(scanID string) (*ErrorModel, error) {
if err != nil {
return nil, err
}
- defer resp.Body.Close()
+ defer func() {
+ if err == nil {
+ _ = resp.Body.Close()
+ }
+ }()
return handleScanResponseWithNoBody(resp, err, http.StatusNoContent)
}
@@ -156,7 +180,11 @@ func (s *ScansHTTPWrapper) Tags() (map[string][]string, *ErrorModel, error) {
if err != nil {
return nil, nil, err
}
- defer resp.Body.Close()
+ defer func() {
+ if err == nil {
+ _ = resp.Body.Close()
+ }
+ }()
decoder := json.NewDecoder(resp.Body)
switch resp.StatusCode {
diff --git a/internal/wrappers/uploads-http.go b/internal/wrappers/uploads-http.go
index 3191ead03..10b959bbb 100644
--- a/internal/wrappers/uploads-http.go
+++ b/internal/wrappers/uploads-http.go
@@ -51,7 +51,8 @@ func (u *UploadsHTTPWrapper) UploadFile(sourcesFile string) (*string, error) {
if err != nil {
return nil, errors.Errorf("Failed to stat file %s: %s", sourcesFile, err.Error())
}
- resp, err := SendHTTPRequestByFullURLContentLength(http.MethodPut, *preSignedURL, file, stat.Size(), true, NoTimeout, accessToken, true)
+ useAccessToken := FeatureFlags[MinioEnabled]
+ resp, err := SendHTTPRequestByFullURLContentLength(http.MethodPut, *preSignedURL, file, stat.Size(), useAccessToken, NoTimeout, accessToken, true)
if err != nil {
return nil, errors.Errorf("Invoking HTTP request to upload file failed - %s", err.Error())
}
diff --git a/internal/wrappers/wrapper-constants.go b/internal/wrappers/wrapper-constants.go
new file mode 100644
index 000000000..242bebd6c
--- /dev/null
+++ b/internal/wrappers/wrapper-constants.go
@@ -0,0 +1,5 @@
+package wrappers
+
+const (
+ limitValue = "10000"
+)
diff --git a/test/integration/data/positive1.tf b/test/integration/data/positive1.tf
index 532c41524..1a0fcc2a6 100644
--- a/test/integration/data/positive1.tf
+++ b/test/integration/data/positive1.tf
@@ -17,4 +17,5 @@ resource "aws_lb" "test3" {
load_balancer_type = "application"
subnets = [aws_subnet.subnet1.id, aws_subnet.subnet2.id]
internal = true
+ drop_invalid_header_fields = true
}
diff --git a/test/integration/data/sources.zip b/test/integration/data/sources.zip
index 9327d23e4..b8335f64e 100644
Binary files a/test/integration/data/sources.zip and b/test/integration/data/sources.zip differ
diff --git a/test/integration/pr_test.go b/test/integration/pr_test.go
index c742d4a84..155b797ef 100644
--- a/test/integration/pr_test.go
+++ b/test/integration/pr_test.go
@@ -23,8 +23,7 @@ const (
)
func TestPRGithubDecorationSuccessCase(t *testing.T) {
- scanID, _ := getRootScan(t)
-
+ scanID, _ := getRootScan(t, params.SastType)
args := []string{
"utils",
"pr",
@@ -65,7 +64,7 @@ func TestPRGithubDecorationFailure(t *testing.T) {
}
func TestPRGitlabDecorationSuccessCase(t *testing.T) {
- scanID, _ := getRootScan(t)
+ scanID, _ := getRootScan(t, params.SastType)
args := []string{
"utils",
diff --git a/test/integration/predicate_test.go b/test/integration/predicate_test.go
index bd2b72709..1038b3303 100644
--- a/test/integration/predicate_test.go
+++ b/test/integration/predicate_test.go
@@ -98,8 +98,6 @@ func TestSastUpdateAndGetPredicatesForSimilarityId(t *testing.T) {
assert.Assert(t, (len(predicateResult)) >= 1, "Should have at least 1 predicate as the result.")
- deleteScanAndProject()
-
}
func TestGetAndUpdatePredicateWithInvalidScannerType(t *testing.T) {
diff --git a/test/integration/project_test.go b/test/integration/project_test.go
index bae5c8a65..c78c75995 100644
--- a/test/integration/project_test.go
+++ b/test/integration/project_test.go
@@ -14,6 +14,7 @@ import (
"github.com/google/uuid"
"github.com/checkmarx/ast-cli/internal/commands/util/printer"
+ applicationErrors "github.com/checkmarx/ast-cli/internal/errors"
"github.com/checkmarx/ast-cli/internal/params"
"github.com/checkmarx/ast-cli/internal/wrappers"
"github.com/spf13/viper"
@@ -33,7 +34,7 @@ const SSHKeyFilePath = "ssh-key-file.txt"
// - Delete the created project
// - Get and assert the project was deleted
func TestProjectsE2E(t *testing.T) {
- projectID, _ := createProject(t, Tags)
+ projectID, _ := createProject(t, Tags, Groups)
response := listProjectByID(t, projectID)
@@ -43,7 +44,7 @@ func TestProjectsE2E(t *testing.T) {
project := showProject(t, projectID)
assert.Equal(t, project.ID, projectID, "Project ID should match the created project")
- assertTags(t, project)
+ assertTagsAndGroups(t, project, Groups)
deleteProject(t, projectID)
@@ -53,7 +54,7 @@ func TestProjectsE2E(t *testing.T) {
}
// Assert project contains created tags and groups
-func assertTags(t *testing.T, project wrappers.ProjectResponseModel) {
+func assertTagsAndGroups(t *testing.T, project wrappers.ProjectResponseModel, groups []string) {
allTags := getAllTags(t, "project")
@@ -65,6 +66,8 @@ func assertTags(t *testing.T, project wrappers.ProjectResponseModel) {
assert.Assert(t, ok, "Project should contain all created tags. Missing %s", key)
assert.Equal(t, val, Tags[key], "Tag value should be equal")
}
+
+ assert.Assert(t, len(project.Groups) >= len(groups), "The project must contain at least %d groups", len(groups))
}
// Create a project with empty project name should fail
@@ -90,6 +93,32 @@ func TestCreateAlreadyExistingProject(t *testing.T) {
assertError(t, err, "Failed creating a project: CODE: 208, Failed to create a project, project name")
}
+func TestProjectCreate_ApplicationDoesntExist_FailAndReturnErrorMessage(t *testing.T) {
+
+ err, _ := executeCommand(
+ t, "project", "create", flag(params.FormatFlag),
+ printer.FormatJSON, flag(params.ProjectName), projectNameRandom,
+ flag(params.ApplicationName), "application-that-doesnt-exist",
+ )
+
+ assertError(t, err, applicationErrors.ApplicationDoesntExistOrNoPermission)
+}
+
+func TestProjectCreate_ApplicationExists_CreateProjectSuccessfully(t *testing.T) {
+
+ err, outBuffer := executeCommand(
+ t, "project", "create", flag(params.FormatFlag),
+ printer.FormatJSON, flag(params.ProjectName), projectNameRandom,
+ flag(params.ApplicationName), "my-application",
+ )
+ createdProject := wrappers.ProjectResponseModel{}
+ unmarshall(t, outBuffer, &createdProject, "Reading project create response JSON should pass")
+ defer deleteProject(t, createdProject.ID)
+ assert.NilError(t, err)
+ assert.Assert(t, createdProject.ID != "", "Project ID should not be empty")
+ assert.Assert(t, len(createdProject.ApplicationIds) == 1, "The project must be connected to the application")
+}
+
func TestCreateWithInvalidGroup(t *testing.T) {
err, _ := executeCommand(
t, "project", "create", flag(params.FormatFlag),
@@ -117,9 +146,10 @@ func TestProjectBranches(t *testing.T) {
assert.Assert(t, strings.Contains(string(result), "[]"))
}
-func createProject(t *testing.T, tags map[string]string) (string, string) {
+func createProject(t *testing.T, tags map[string]string, groups []string) (string, string) {
projectName := getProjectNameForTest() + "_for_project"
tagsStr := formatTags(tags)
+ groupsStr := formatGroups(groups)
fmt.Printf("Creating project : %s \n", projectName)
outBuffer := executeCmdNilAssertion(
@@ -129,6 +159,7 @@ func createProject(t *testing.T, tags map[string]string) (string, string) {
flag(params.ProjectName), projectName,
flag(params.BranchFlag), "master",
flag(params.TagList), tagsStr,
+ flag(params.GroupList), groupsStr,
)
createdProject := wrappers.ProjectResponseModel{}
diff --git a/test/integration/result_test.go b/test/integration/result_test.go
index b9fbbbd03..b3711da84 100644
--- a/test/integration/result_test.go
+++ b/test/integration/result_test.go
@@ -48,6 +48,7 @@ func TestResultListJson(t *testing.T) {
flag(params.TargetFlag), fileName,
flag(params.ScanIDFlag), scanID,
flag(params.TargetPathFlag), resultsDirectory,
+ flag(params.SastRedundancyFlag),
)
result := wrappers.ScanResultsCollection{}
diff --git a/test/integration/root_test.go b/test/integration/root_test.go
index 29c1a08f6..feeec9567 100644
--- a/test/integration/root_test.go
+++ b/test/integration/root_test.go
@@ -6,6 +6,7 @@ import (
"fmt"
"log"
"os"
+ "strings"
"testing"
"github.com/spf13/viper"
@@ -28,9 +29,16 @@ var Tags = map[string]string{
"Integration": "Tests",
}
+var Groups = []string{
+ "it_test_group_1",
+ "it_test_group_2",
+}
+
var testInstance *testing.T
var rootScanId string
+var rootEnginesScanId string
var rootScanProjectId string
+var rootEnginesScanProjectId string
var rootProjectId string
var rootProjectName string
@@ -44,7 +52,7 @@ func TestMain(m *testing.M) {
}
// Create or return a scan to be shared between tests
-func getRootScan(t *testing.T) (string, string) {
+func getRootScan(t *testing.T, scanTypes ...string) (string, string) {
testInstance = t
if len(rootScanId) > 0 {
@@ -52,10 +60,13 @@ func getRootScan(t *testing.T) (string, string) {
log.Println("Using the projectID: ", rootScanProjectId)
return rootScanId, rootScanProjectId
}
-
- rootScanId, rootScanProjectId = createScan(testInstance, Zip, Tags)
-
- return rootScanId, rootScanProjectId
+ if len(scanTypes) == 0 {
+ rootScanId, rootScanProjectId = createScan(testInstance, Zip, Tags)
+ return rootScanId, rootScanProjectId
+ } else {
+ rootEnginesScanId, rootEnginesScanProjectId = createScanWithEngines(testInstance, Zip, Tags, strings.Join(scanTypes, ","))
+ return rootEnginesScanId, rootEnginesScanProjectId
+ }
}
// Delete scan and projects
@@ -85,7 +96,7 @@ func getRootProject(t *testing.T) (string, string) {
return rootProjectId, rootProjectName
}
- rootProjectId, rootProjectName = createProject(t, Tags)
+ rootProjectId, rootProjectName = createProject(t, Tags, Groups)
return rootProjectId, rootProjectName
}
diff --git a/test/integration/scan_test.go b/test/integration/scan_test.go
index baa5b91c1..c8b6055de 100644
--- a/test/integration/scan_test.go
+++ b/test/integration/scan_test.go
@@ -22,6 +22,7 @@ import (
realtime "github.com/checkmarx/ast-cli/internal/commands/scarealtime"
"github.com/checkmarx/ast-cli/internal/commands/util"
"github.com/checkmarx/ast-cli/internal/commands/util/printer"
+ applicationErrors "github.com/checkmarx/ast-cli/internal/errors"
"github.com/checkmarx/ast-cli/internal/params"
"github.com/checkmarx/ast-cli/internal/wrappers"
"github.com/spf13/viper"
@@ -67,9 +68,68 @@ func TestScanCreateEmptyProjectName(t *testing.T) {
assertError(t, err, "Project name is required") // Creating a scan with empty project name should fail
}
+func TestScanCreate_ExistingApplicationAndExistingProject_CreateScanSuccessfully(t *testing.T) {
+ args := []string{
+ "scan", "create",
+ flag(params.ApplicationName), "my-application",
+ flag(params.ProjectName), "my-project",
+ flag(params.SourcesFlag), ".",
+ flag(params.ScanTypes), "sast",
+ flag(params.BranchFlag), "dummy_branch",
+ }
+
+ err, _ := executeCommand(t, args...)
+ assert.NilError(t, err)
+}
+
+func TestScanCreate_ExistingApplicationAndNotExistingProject_CreatingNewProjectAndCreateScanSuccessfully(t *testing.T) {
+ args := []string{
+ "scan", "create",
+ flag(params.ApplicationName), "my-application",
+ flag(params.ProjectName), projectNameRandom,
+ flag(params.SourcesFlag), ".",
+ flag(params.ScanTypes), "sast",
+ flag(params.BranchFlag), "dummy_branch",
+ flag(params.ScanInfoFormatFlag), printer.FormatJSON,
+ }
+ scanID, projectID := executeCreateScan(t, args)
+ defer deleteProject(t, projectID)
+ assert.Assert(t, scanID != "", "Scan ID should not be empty")
+ assert.Assert(t, projectID != "", "Project ID should not be empty")
+}
+
+func TestScanCreate_ApplicationDoesntExist_FailScanWithError(t *testing.T) {
+ args := []string{
+ "scan", "create",
+ flag(params.ApplicationName), "application-that-doesnt-exist",
+ flag(params.ProjectName), "my-project",
+ flag(params.SourcesFlag), ".",
+ flag(params.ScanTypes), "sast",
+ flag(params.BranchFlag), "dummy_branch",
+ }
+
+ err, _ := executeCommand(t, args...)
+ assertError(t, err, applicationErrors.ApplicationDoesntExistOrNoPermission)
+}
+
// Create scans from current dir, zip and url and perform assertions in executeScanAssertions
func TestScansE2E(t *testing.T) {
- scanID, projectID := executeCreateScan(t, getCreateArgs(Zip, Tags, "sast,iac-security,sca"))
+ scanID, projectID := executeCreateScan(t, getCreateArgsWithGroups(Zip, Tags, Groups, "sast,iac-security,sca"))
+ defer deleteProject(t, projectID)
+
+ executeScanAssertions(t, projectID, scanID, Tags)
+ glob, err := filepath.Glob(filepath.Join(os.TempDir(), "cx*.zip"))
+ if err != nil {
+
+ return
+ }
+ assert.Equal(t, len(glob), 0, "Zip file not removed")
+}
+
+func TestScansUpdateProjectGroups(t *testing.T) {
+ scanID, projectID := executeCreateScan(t, getCreateArgs(Zip, Tags, "sast"))
+ response := listScanByID(t, scanID)
+ scanID, projectID = executeCreateScan(t, getCreateArgsWithNameAndGroups(Zip, Tags, Groups, response[0].ProjectName, "sast"))
defer deleteProject(t, projectID)
executeScanAssertions(t, projectID, scanID, Tags)
@@ -395,7 +455,6 @@ func executeScanAssertions(t *testing.T, projectID, scanID string, tags map[stri
assert.Assert(t, ok, "Scan should contain all created tags. Missing %s", key)
assert.Equal(t, val, Tags[key], "Tag value should be equal")
}
-
deleteScan(t, scanID)
response = listScanByID(t, scanID)
@@ -414,6 +473,9 @@ func createScanNoWait(t *testing.T, source string, tags map[string]string) (stri
func createScanSastNoWait(t *testing.T, source string, tags map[string]string) (string, string) {
return executeCreateScan(t, append(getCreateArgs(source, tags, "sast,sca"), flag(params.AsyncFlag)))
}
+func createScanWithEngines(t *testing.T, source string, tags map[string]string, scanTypes string) (string, string) {
+ return executeCreateScan(t, append(getCreateArgs(source, tags, scanTypes), flag(params.AsyncFlag)))
+}
// Create sca scan with resolver
func createScanScaWithResolver(
@@ -445,11 +507,17 @@ func getProjectNameForScanTests() string {
}
func getCreateArgs(source string, tags map[string]string, scanTypes string) []string {
+ return getCreateArgsWithGroups(source, tags, nil, scanTypes)
+}
+func getCreateArgsWithGroups(source string, tags map[string]string, groups []string, scanTypes string) []string {
projectName := getProjectNameForScanTests()
- return getCreateArgsWithName(source, tags, projectName, scanTypes)
+ return getCreateArgsWithNameAndGroups(source, tags, groups, projectName, scanTypes)
}
func getCreateArgsWithName(source string, tags map[string]string, projectName, scanTypes string) []string {
+ return getCreateArgsWithNameAndGroups(source, tags, nil, projectName, scanTypes)
+}
+func getCreateArgsWithNameAndGroups(source string, tags map[string]string, groups []string, projectName, scanTypes string) []string {
args := []string{
"scan", "create",
flag(params.ProjectName), projectName,
@@ -458,6 +526,7 @@ func getCreateArgsWithName(source string, tags map[string]string, projectName, s
flag(params.ScanInfoFormatFlag), printer.FormatJSON,
flag(params.TagList), formatTags(tags),
flag(params.BranchFlag), SlowRepoBranch,
+ flag(params.ProjectGroupList), formatGroups(groups),
}
return args
}
@@ -1174,3 +1243,13 @@ func TestScanWithPolicyTimeout(t *testing.T) {
err, _ := executeCommand(t, args...)
assert.Error(t, err, "--policy-timeout should be equal or higher than 0")
}
+
+func TestScanListWithFilters(t *testing.T) {
+ args := []string{
+ "scan", "list",
+ flag(params.FilterFlag), "limit=100",
+ }
+
+ err, _ := executeCommand(t, args...)
+ assert.NilError(t, err, "")
+}
diff --git a/test/integration/util.go b/test/integration/util.go
index 8f0c0efca..2f9ceae08 100644
--- a/test/integration/util.go
+++ b/test/integration/util.go
@@ -26,6 +26,15 @@ func formatTags(tags map[string]string) string {
tagsStr = strings.TrimRight(tagsStr, ",")
return tagsStr
}
+func formatGroups(groups []string) string {
+ var groupsStr string
+ for _, group := range groups {
+ groupsStr += group
+ groupsStr += ","
+ }
+ groupsStr = strings.TrimRight(groupsStr, ",")
+ return groupsStr
+}
func getAllTags(t *testing.T, baseCmd string) map[string][]string {
tagsCommand, buffer := createRedirectedTestCommand(t)
diff --git a/test/integration/util_command.go b/test/integration/util_command.go
index 233b32bf6..0ecec9c58 100644
--- a/test/integration/util_command.go
+++ b/test/integration/util_command.go
@@ -60,6 +60,7 @@ func createASTIntegrationTestCommand(t *testing.T) *cobra.Command {
viper.AutomaticEnv()
viper.Set("CX_TOKEN_EXPIRY_SECONDS", 2)
scans := viper.GetString(params.ScansPathKey)
+ applications := viper.GetString(params.ApplicationsPathKey)
groups := viper.GetString(params.GroupsPathKey)
projects := viper.GetString(params.ProjectsPathKey)
results := viper.GetString(params.ResultsPathKey)
@@ -80,8 +81,10 @@ func createASTIntegrationTestCommand(t *testing.T) *cobra.Command {
featureFlagsPath := viper.GetString(params.FeatureFlagsKey)
policyEvaluationPath := viper.GetString(params.PolicyEvaluationPathKey)
sastIncrementalPath := viper.GetString(params.SastMetadataPathKey)
+ accessManagementPath := viper.GetString(params.AccessManagementPathKey)
scansWrapper := wrappers.NewHTTPScansWrapper(scans)
+ applicationsWrapper := wrappers.NewApplicationsHTTPWrapper(applications)
resultsPdfReportsWrapper := wrappers.NewResultsPdfReportsHTTPWrapper(resultsPdfPath)
resultsSbomReportsWrapper := wrappers.NewResultsSbomReportsHTTPWrapper(resultsSbomPath, resultsSbomProxyPath)
@@ -108,8 +111,10 @@ func createASTIntegrationTestCommand(t *testing.T) *cobra.Command {
featureFlagsWrapper := wrappers.NewFeatureFlagsHTTPWrapper(featureFlagsPath)
policyWrapper := wrappers.NewHTTPPolicyWrapper(policyEvaluationPath)
sastMetadataWrapper := wrappers.NewSastIncrementalHTTPWrapper(sastIncrementalPath)
+ accessManagementWrapper := wrappers.NewAccessManagementHTTPWrapper(accessManagementPath)
astCli := commands.NewAstCLI(
+ applicationsWrapper,
scansWrapper,
resultsSbomReportsWrapper,
resultsPdfReportsWrapper,
@@ -137,6 +142,7 @@ func createASTIntegrationTestCommand(t *testing.T) *cobra.Command {
featureFlagsWrapper,
policyWrapper,
sastMetadataWrapper,
+ accessManagementWrapper,
)
return astCli
}