Skip to main content
Skip table of contents

View the results of your Mend Developer Platform SAST scan in Bitbucket Cloud

Overview

Once your Mend Developer Platform SAST engine scans are completed, there are multiple resources provided to help you review, analyze, and triage your results.

Viewing Details of the Scan

Results can be viewed in the following places:

  • The Issue Tracker section in your Bitbucket Cloud repository.

  • The Commits tab shows build statuses for each commit to the specified base branch.

  • The commits comments inside each specific commit.

  • Code Insight report in the Pull Requests.

  • The Mend Platform UI

  • Via email notifications

Viewing the Issues section

If you do not see the Issues section in the left panel of Bitbucket, please go to Repository settings Issue tracker and enable issue tracker for this repo. Admin rights for this repository are required.

If you are performing Pull Requests or push commands via the Web browser, refresh your Web browser in order to view the issues that were generated by Mend.

Note: It may take a number of minutes for the issues to be scanned and displayed after a valid push command is initiated.

The Issues section displays all the issues that the Mend Integration detected.
As part of your workflow, you have the option to close issues that were resolved. Issues manually closed will not be re-opened during future Mend scans unless their tag and/or name are changed.

image-20240323-210003.png

Viewing Mend Code Security Check

Once Code Security Check is running, Status Check messages are displayed for each commit. Clicking a specific security check message opens a related head commit with detailed information about detected findings:

image-20240307-203702.png

Code Security Check

The Code Security Check report displays each CWE to see the code snippet in your project and the details of each vulnerability. The following information is displayed for each vulnerability:

  • Severity: Level of severity (High, Medium, Low) of the introduced vulnerability.

  • Vulnerability Type: The type of vulnerability that was introduced.

  • CWE: CWE ID that was introduced. This links to the CWE’s page on the official MITRE site.

  • File: File and code line(s) that are impacted by the vulnerability

  • Data Flows: Number of data flows detected that lead to the finding.

  • Date: Date and time the vulnerability was originally introduced (YYYY-MM-DD 00:00).

image-20240307-213111.png

Commit Comments

For each detected finding, the Code Security Check adds a comment to the source file, including specific information about the vulnerable code, the data flow, and security training materials provided by Secure Code Warrior:

image-20240323-211400.png

In the Issues section or Mend Code Security Check, click View under the Data Flows column to view the Commit Comments:

image-20240323-212728.png
image-20240319-153139.png

For more information about Secure Code Warrior training materials, please refer to our Get Training on Typical Vulnerabilities documentation.

image-20240323-212705.png

Types of Indicators

The following status indicators are available as feedback on a head commit:

  • Queued: Scan has not begun and is scheduled to begin.

  • In progress: Scan is in progress.

  • Completed: Scan completed with one of the following conclusions:

    • Success: When the parameter 'vulnerable.check.run.conclusion.level' is set to 'success', the status of the head commit is always success  A 'Success' status is displayed for the commit even when it fails.

    • Failure: Default for all completed scans. When the parameter 'vulnerable.check.run.conclusion.level' is set to 'failure' (default), the status of a 'failed' head commit is 'failure', and a policy for approving merging pull requests that include failed head commits with another branch in the repository is enforced. Note that a 'failed' status can be caused due to security vulnerabilities or due to an error that occurred during the scan.

    • Neutral: Conclusion occurs when the push command was not valid.

Samples of Check Status Indicators 

In Progress

The following is a sample of a 'Running' status, which indicates that the security check is currently scanning the head commit.

image-20240319-151210.png
Completed with Success Conclusion

When no vulnerabilities are found and no errors occurred during the scan, Mend will display the following commit status, and a security report indicating that no vulnerabilities were detected.

image-20240319-151253.png
Completed with Failure Conclusion

All head commits that fail the scan due to the security check detecting vulnerabilities or due to an error that occurred during the scan, will display a failed commit status.
The following screenshot displays a failure indicator for a head commit

image-20240319-151343.png

Viewing Details in the Mend Application

In the Mend Application, Mend Projects will have the same name as the corresponding Bitbucket Cloud repository, with a "BB_" prefix. The name of the Mend Application will be your Bitbucket Cloud Project name preceded by "BB_".
When a scan is completed, a Mend project is created for that branch with a “BB_" prefix. Let’s look at an example:

Bitbucket hierarchy:

  • vulnerable-node repository

    • master branch [default branch]

We run a scan on the master branch. The Mend hierarchy appears as follows:

Mend Platform hierarchy:

  • Application: BB_vulnerable-node

    • Project: BB_vulnerable-node_master

image-20240307-202852.png

Within the Mend Application, You can filter the results by engine type:
(1) Dependencies -> Open-Source Security
(2) Code -> Code Security

image-20240307-203019.png
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.