git-branchgitlab-ci-runnercheckmarxsast

Handle Different Git branches during code scan in Checkmarx?


I have different code branches in GIT?

enter image description here

When i am running checkmarx on these branches, I don't get to know from which branch scan is done. IS there any way checkmarx also tell from which branch scan was triggered?

enter image description here


Solution

  • You generally do not want to scan different branches in the same project. You'll notice that the "Monitoring" tab on the project view will change to indicate the latest state of the project. When a branch is scanned, the latest state is for that branch and may not correctly indicate the state of the project's main branch.

    Most people create projects with a naming convention to indicate the branch (e.g. "Project_Branch"). You can create a "branch" project from the main project via the "Branch Project" button and it only counts the main project against your licensed project count.

    enter image description here