project
The project
command enables the ability to manage projects in Checkmarx One.
Usage
./cx project [command] [flags]
Available Commands
project create
The project create
command enables the ability to create a new project in Checkmarx One.
Usage
./cx project create [flags]
Flags
Name | Default | Description |
---|---|---|
--branch <string> | main | The name of the branch |
--format <string> | table | The output format for the response. Possible values are |
--tags <string> | List of tags For example: tagA,tagB:value | |
--groups | List of groups | |
--help | help for the create command | |
--project-name <string> | Name of the project | |
--repo-url <string> | Project Repository URL | |
--ssh-key <string> | Path to ssh private key |
Examples
Creating a New Project
./cx project create --project-name <Project Name>
[email protected]:~/ast-cli$ ./cx project create --project-name "Test1" Project ID Name Created at Tags Groups ---------- ---- ---------- ---- ------ ce46df28-7f33-49fe-88cb-337fe8eb2c39 Test1 09-29-21 [] []
Verifying that the Project Exists in the Projects List
./cx project list
[email protected]:~/ast-cli$ ./cx project list Project ID Name Created at Tags Groups ---------- ---- ---------- ---- ------ ce46df28-7f33-49fe-88cb-337fe8eb2c39 Test1 09-29-21 [] [] d7b56888-8407-4e9b-ae5b-7fc43233a497 Test111 08-25-21 [] [] d6fe8ab4-becd-49ff-987f-ec5ee02cc614 EffProj 09-22-21 [] [] 9ddad1d7-4332-4673-b741-3235be8cd194 CxYuris 09-22-21 [] [] 2924669e-f021-4fca-8d18-6b9d00881c1a CxYair/WebGoat 09-19-21 [] [] c91820cf-947b-4007-8e41-3d3ff341d4d5 AsafOrgTesting/CxIntegrationsDemo 09-12-21 [] [] 9ae9cf0d-d732-48d1-b3e0-41b3042d272c ruip_asa_premium 09-07-21 [] [] d1d5caea-5fed-4ec3-8017-5c2c4bcd8c2f AsafOrgTesting/tamarTest 09-12-21 [] [] 427136ec-b58a-4700-be8e-75dca0ffc4bb AsafOrgTesting/Spoon-Knife 09-12-21 [] [] c1e5ae18-98b7-402a-932c-ed981a21ad2b AsafOrgTesting/FlowListenerPublicRepo 09-12-21 [] [] 39c66421-8e7f-43ed-bff8-a3a568437909 AsafOrgTesting/test-16 09-12-21 [] [] d162d22d-051a-4dc6-91c6-a40ce7c8ab03 AsafOrgTesting/orly-kics 09-12-21 [] [] ef855ae3-caeb-45db-914c-3f03a0a6320f AsafOrgTesting/CxIntAST-DEV-328879 09-12-21 [wrwr:] [0f830346-5ada-47f5-b1af-b8da9fa52ea3] d9a4abfa-bdd6-4acc-a2ed-79edce6b3bd5 AsafOrgTesting/FlowListenerPrivateRepo 09-12-21 [] [] f190096d-5207-43a6-96cc-049ec1593185 AsafOrgTesting/test-32 09-12-21 [] [] 9260abe9-6b46-45c7-9009-a45c015c4d84 AsafOrgTesting/PrivateTestRepo 09-12-21 [] [] 9b74270d-b200-44cc-af2d-aaa5cf6ddcec AsafOrgTesting/BookStore_Public 09-12-21 [rwwr:] [7ab7035a-4d90-4956-ad47-1c8f2762c4df] 683c51da-8644-4e27-990f-1128ab911a1b scott-cx/JVLDemoD 09-09-21 [] [] ea97e0e1-e8e6-4dfa-b928-db7240ec3304 ast-webapp 09-09-21 [] [] 27364fe1-9294-4b45-b0b5-f5d86baaf223 CheckmarxSESample/JVLDemo1 09-07-21 [] []
project delete
The project delete
command enables the ability to delete a project in Checkmarx One.
Usage
./cx project delete --project-id <project-id> [flags]
Flags
Name | Default | Description |
---|---|---|
--help, -h | help for the delete command | |
--project-id | Project ID to delete |
Examples
Retrieving the Checkmarx One Projects List
[email protected]:/AST$ ./cx.exe project list Project ID Name Created at Tags Groups ---------- ---- ---------- ---- ------ fa5eeaac-2ec7-4fa7-946e-ed2f2e5ff8cd test-proj-del 08-24-21 [] []
Deleting a Project
[email protected]:/AST$ ./cx.exe project delete --project-id fa5eeaac-2ec7-4fa7-946e-ed2f2e5ff8cd
Verifying that the Project Doesn’t Exist in the Projects List
[email protected]:/AST$ ./cx.exe project list Project ID Name Created at Tags Groups ---------- ---- ---------- ---- ------
project list
The project list
command provides a list of all the projects in Checkmarx One.
Usage
./cx project list [flags]
Flags
Name | Default | Description |
---|---|---|
--filter <string> | Default behavior is to return the first 20 records. TipYou can set the | Filter the projects list.
|
--format <string> | table | The output format for the response. Possible values are |
--help, -h | help for the list command |
Pagination
This command uses pagination. By default it returns the first 20 results (i.e., limit=20,offset=0
). Use limit
to adjust the maximum number of results to return and offset
to specify the number of results to skip before starting to return results. You can use offset=0
and limit=0
to get all results.
Example: The following command returns records 21-30
./cx project list --filter "limit=10,offset=20"
Applying Filters
You can limit results by using pagination and/or by filtering by various project attributes such as project IDs and project tags.
Filters are applied using the following syntax:
./cx project list --filter "attributeA=value1,attributeB=value1;value2;value3,..."
Example: The following command returns records for specific projects, based on project IDs.
./cx project list --filter "ids=7b70e4b6-4288-467b-8fa2-9c6c0ad0bd08;e231cf6d-f031-4290-b014-7c6ec343f793"
When multiple filter attributes are used, an AND operator is applied between attributes. When multiple values are given for an attribute, an OR operator is used between values.
Example: The following command returns records for all projects that have the tag key "product" and a tag value of either "AppA", "AppB" or "AppC".
./cx project list --filter "tags-keys=product,tags-values=AppA;AppB;AppC,limit=0"
Results
For each project, the following items are returned: Project ID, Project Name, Date that the project was created, and Tags and Groups associated with the project.
When results are returned in json format, an additional item updatedAt
is returned, giving the date of the most recent edit of the project settings.
Notice
The date given for updatedAt
relates only to editing the project settings and not to running scans, generating reports or other activities on the project.
Examples
Using the project list Command with --format Flags
[email protected]:~/ast-cli$ ./cx project list --format table Project ID Name Created at Tags Groups ---------- ---- ---------- ---- ------ ce46df28-7f33-49fe-88cb-337fe8eb2c39 Test1 09-29-21 [] [] d7b56888-8407-4e9b-ae5b-7fc43233a497 Test111 08-25-21 [] [] d6fe8ab4-becd-49ff-987f-ec5ee02cc614 EffProj 09-22-21 [] [] 9ddad1d7-4332-4673-b741-3235be8cd194 CxYuris 09-22-21 [] [] 2924669e-f021-4fca-8d18-6b9d00881c1a CxYair/WebGoat 09-19-21 [] [] c91820cf-947b-4007-8e41-3d3ff341d4d5 AsafOrgTesting/CxIntegrationsDemo 09-12-21 [] [] 9ae9cf0d-d732-48d1-b3e0-41b3042d272c ruip_asa_premium 09-07-21 [] [] d1d5caea-5fed-4ec3-8017-5c2c4bcd8c2f AsafOrgTesting/tamarTest 09-12-21 [] [] 427136ec-b58a-4700-be8e-75dca0ffc4bb AsafOrgTesting/Spoon-Knife 09-12-21 [] [] c1e5ae18-98b7-402a-932c-ed981a21ad2b AsafOrgTesting/FlowListenerPublicRepo 09-12-21 [] [] 39c66421-8e7f-43ed-bff8-a3a568437909 AsafOrgTesting/test-16 09-12-21 [] [] d162d22d-051a-4dc6-91c6-a40ce7c8ab03 AsafOrgTesting/orly-kics 09-12-21 [] [] ef855ae3-caeb-45db-914c-3f03a0a6320f AsafOrgTesting/CxIntAST-DEV-328879 09-12-21 [wrwr:] [0f830346-5ada-47f5-b1af-b8da9fa52ea3] d9a4abfa-bdd6-4acc-a2ed-79edce6b3bd5 AsafOrgTesting/FlowListenerPrivateRepo 09-12-21 [] [] f190096d-5207-43a6-96cc-049ec1593185 AsafOrgTesting/test-32 09-12-21 [] [] 9260abe9-6b46-45c7-9009-a45c015c4d84 AsafOrgTesting/PrivateTestRepo 09-12-21 [] [] 9b74270d-b200-44cc-af2d-aaa5cf6ddcec AsafOrgTesting/BookStore_Public 09-12-21 [rwwr:] [7ab7035a-4d90-4956-ad47-1c8f2762c4df] 683c51da-8644-4e27-990f-1128ab911a1b scott-cx/JVLDemoD 09-09-21 [] [] ea97e0e1-e8e6-4dfa-b928-db7240ec3304 ast-webapp 09-09-21 [] [] 27364fe1-9294-4b45-b0b5-f5d86baaf223 CheckmarxSESample/JVLDemo1 09-07-21 [] []
[email protected]:~/ast-cli$ ./cx project list --format list Project ID : ce46df28-7f33-49fe-88cb-337fe8eb2c39 Name : Test1 Created at : 09-29-21 Tags : [] Groups : [] Project ID : d7b56888-8407-4e9b-ae5b-7fc43233a497 Name : Test111 Created at : 08-25-21 Tags : [] Groups : [] Project ID : d6fe8ab4-becd-49ff-987f-ec5ee02cc614 Name : EffProj Created at : 09-22-21 Tags : [] Groups : [] Project ID : 9ddad1d7-4332-4673-b741-3235be8cd194 Name : CxYuris Created at : 09-22-21 Tags : [] Groups : [] Project ID : 2924669e-f021-4fca-8d18-6b9d00881c1a Name : CxYair/WebGoat Created at : 09-19-21 Tags : [] Groups : [] Project ID : c91820cf-947b-4007-8e41-3d3ff341d4d5 Name : AsafOrgTesting/CxIntegrationsDemo Created at : 09-12-21 Tags : [] Groups : [] Project ID : 9ae9cf0d-d732-48d1-b3e0-41b3042d272c Name : ruip_asa_premium Created at : 09-07-21 Tags : [] Groups : [] Project ID : d1d5caea-5fed-4ec3-8017-5c2c4bcd8c2f Name : AsafOrgTesting/tamarTest Created at : 09-12-21 Tags : [] Groups : [] Project ID : 427136ec-b58a-4700-be8e-75dca0ffc4bb Name : AsafOrgTesting/Spoon-Knife Created at : 09-12-21 Tags : [] Groups : [] Project ID : c1e5ae18-98b7-402a-932c-ed981a21ad2b Name : AsafOrgTesting/FlowListenerPublicRepo Created at : 09-12-21 Tags : [] Groups : [] Project ID : 39c66421-8e7f-43ed-bff8-a3a568437909 Name : AsafOrgTesting/test-16 Created at : 09-12-21 Tags : [] Groups : [] Project ID : d162d22d-051a-4dc6-91c6-a40ce7c8ab03 Name : AsafOrgTesting/orly-kics Created at : 09-12-21 Tags : [] Groups : [] Project ID : ef855ae3-caeb-45db-914c-3f03a0a6320f Name : AsafOrgTesting/CxIntAST-DEV-328879 Created at : 09-12-21 Tags : [wrwr:] Groups : [0f830346-5ada-47f5-b1af-b8da9fa52ea3] Project ID : d9a4abfa-bdd6-4acc-a2ed-79edce6b3bd5 Name : AsafOrgTesting/FlowListenerPrivateRepo Created at : 09-12-21 Tags : [] Groups : [] Project ID : f190096d-5207-43a6-96cc-049ec1593185 Name : AsafOrgTesting/test-32 Created at : 09-12-21 Tags : [] Groups : [] Project ID : 9260abe9-6b46-45c7-9009-a45c015c4d84 Name : AsafOrgTesting/PrivateTestRepo Created at : 09-12-21 Tags : [] Groups : [] Project ID : 9b74270d-b200-44cc-af2d-aaa5cf6ddcec Name : AsafOrgTesting/BookStore_Public Created at : 09-12-21 Tags : [rwwr:] Groups : [7ab7035a-4d90-4956-ad47-1c8f2762c4df] Project ID : 683c51da-8644-4e27-990f-1128ab911a1b Name : scott-cx/JVLDemoD Created at : 09-09-21 Tags : [] Groups : [] Project ID : ea97e0e1-e8e6-4dfa-b928-db7240ec3304 Name : ast-webapp Created at : 09-09-21 Tags : [] Groups : [] Project ID : 27364fe1-9294-4b45-b0b5-f5d86baaf223 Name : CheckmarxSESample/JVLDemo1 Created at : 09-07-21 Tags : [] Groups : []
project show
The project show
command provides information about a project in Checkmarx One.
Usage
./cx project show --project-id <project-id> [flags]
Flags
Name | Required | Default | Description |
---|---|---|---|
--project-id <string> | yes | Project ID to show | |
--format <string> | no | table | The output format for the response. Possible values are |
---help, -h | no | help for the show command |
Results
For each project, the following items are returned: Project ID, Project Name, Date that the project was created, and Tags and Groups associated with the project.
If the project configuration has been edited after the initial creation, then an additional item updatedAt
is returned, giving the date of the most recent edit.
Notice
The date given for updatedAt
relates only to project configuration and not to running of scans, generating reports or other activities.
Examples
Retrieving the Project IDs
[email protected]:~/ast-cli$ ./cx project show --project-id ce46df28-7f33-49fe-88cb-337fe8eb2c39 Project ID Name Created at Tags Groups ---------- ---- ---------- ---- ------ ce46df28-7f33-49fe-88cb-337fe8eb2c39 Test1 09-29-21 [] []
Using the project show Command with --format Flags
[email protected]:~/ast-cli$ ./cx project show --project-id ce46df28-7f33-49fe-88cb-337fe8eb2c39 --format table Project ID Name Created at Tags Groups ---------- ---- ---------- ---- ------ ce46df28-7f33-49fe-88cb-337fe8eb2c39 Test1 09-29-21 [] []
[email protected]:~/ast-cli$ ./cx project show --project-id ce46df28-7f33-49fe-88cb-337fe8eb2c39 --format list Project ID : ce46df28-7f33-49fe-88cb-337fe8eb2c39 Name : Test1 Created at : 09-29-21 Tags : [] Groups : []
[email protected]:~/ast-cli$ ./cx project show --project-id ce46df28-7f33-49fe-88cb-337fe8eb2c39 --format json {"ID":"ce46df28-7f33-49fe-88cb-337fe8eb2c39","Name":"Test1","CreatedAt":"2021-09-29T11:52:15.924297Z","UpdatedAt":"2021-09-29T11:52:15.924297Z","Tags":{},"Groups":[]}
project tags
The tags
command provides a list of all the available tags in Checkmarx One.
Tags are also used for overriding Jira feedback apps fields values. For additional information see:
Usage
./cx project tags [flags]
Flags
Name | Default | Description |
---|---|---|
---help, -h | help for the tags command |
Examples
Using the tags Command
[email protected]:~/ast-cli$ ./cx project tags {"insecure-bank":[""],"insecure-bank-app":[""],"rwwr":[""],"wrwr":[""]}
project branches
The branches
command provides a list of all the available branches in CxAST.
Usage
./cx project branches [flags]
In this Article:
Flags
Name | Default | Description |
---|---|---|
---help, -h | help for the branches command | |
--project-id <string> | Project ID to show | |
--filter <string> | filtered by full or partial name |