Skip to content

Commit

Permalink
[JIRA CXFLW-100] Update CodeBashing API and documentation in Wiki (#927)
Browse files Browse the repository at this point in the history
* [JIRA CXFLW-100] Update CodeBashing API and documentation in Wiki

[JIRA CXFLW-100] Update CodeBashing API and documentation in Wiki

* Update CodeBashing.md
  • Loading branch information
DhavalPatelPersistent authored Feb 14, 2022
1 parent 43b8b43 commit e465477
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions docs/CodeBashing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,22 @@ The link to CodeBashing is added under '**Training**' in the ticket recommendati
By default CxFlow puts codebashing-url value in the link url
```
cx-flow:
codebash-url: https:...
codebash-url: https://api.codebashing.com/lessons
```

Now each customer (CodeBashing tenant), can use CxFlow to add training link to his tickets - with direct link to relevant course per language and CWE!
The link will direct to the specific lesson under the customer CodeBashing account.
for example: (https://cxflow-account.codebashing.com/courses/backend_java/lessons/sql_injection)
for example: (https://{tenant}.codebashing.com/courses/backend_java/lessons/sql_injection)


To get direct CodeBashing integration and connect it to your own tenant, add the following section to CxFlow configuration:
To get direct CodeBashing integration you need your own tenant specific url for organization and secret.
Here, secret is the x-api-key of the codebashing application, provided on tenant creation.

```
codebashing:
codebashingApiUrl: https://api.codebashing.com/lessons
tenantBaseUrl: https://xxxxx.codebashing.com
apiSecret: SECRET
codebashing-api-url: https://api.codebashing.com/lessons
tenant-base-url: https://{tenant}.codebashing.com
api-secret: {SECRET}
```


Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/checkmarx/flow/service/JiraService.java
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ private void mapCustomFields(ScanRequest request, ScanResults.XIssue issue, Issu
recommendation.append("Mitre Details: ").append(String.format(flowProperties.getMitreUrl(), issue.getCwe())).append(HTMLHelper.CRLF);
}
if (!ScanUtils.empty(flowProperties.getCodebashUrl())) {
recommendation.append("Training: ").append(flowProperties.getCodebashUrl()).append(HTMLHelper.CRLF);
recommendation.append("Training: ").append(issue.getAdditionalDetails().get(FlowConstants.CODE_BASHING_LESSON)).append(HTMLHelper.CRLF);
}
if (!ScanUtils.empty(flowProperties.getWikiUrl())) {
recommendation.append("Guidance: ").append(flowProperties.getWikiUrl()).append(HTMLHelper.CRLF);
Expand Down

0 comments on commit e465477

Please sign in to comment.