Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
sonarcloud-scan — A Bitbucket Pipe to trigger SonarCloud analysis | Kitploit
Tools/BitbucketBitbucket/sonarsource/sonarcloud-scan
Static AnalysisVulnerability ScannersStatic Code Analysis (SAST)Code AnalysisDevSecOps
Bitbucketsonarsource/sonarcloud-scan

sonarcloud-scan

A Bitbucket Pipe to trigger SonarCloud analysis

View Repository
2 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Bitbucket Pipelines Pipe: SonarQube Cloud scan

Scan your code with SonarQube Cloud to detects bugs, vulnerabilities and code smells in more than 25 programming languages.

Your SonarCloud account must first be associated to your Bitbucket team or user account. SonarQube Cloud is totally free for open-source projects. If your code is closed source, SonarQube Cloud also offers a paid plan to run private analyses.

NOTE: For projects using Maven or Gradle please execute a respective scanner directly instead of using this pipe (see examples).

YAML Definition

Add the following snippet to the script section of your bitbucket-pipelines.yml file:

root@kitploit:~
- pipe: sonarsource/sonarcloud-scan:4.1.0
  # variables:
  #   SONAR_TOKEN: '<string>'  # Optional
  #   EXTRA_ARGS: '<array of strings>'  # Optional
  #   SONAR_SCANNER_JAVA_OPTS: '<string>'  # Optional
  #   DEBUG: '<boolean>'  # Optional

Variables

VariableUsage
SONAR_TOKEN (*)SonarQube Cloud token. It is recommended to use a secure repository or account variable. And in this case there is no need to specify this variable in the bitbucket-pipelines.yml file.
EXTRA_ARGSExtra analysis parameters (check docs)
SONAR_SCANNER_JAVA_OPTSScanner JVM options (e.g. "-Xmx256m")
DEBUGTurn on extra debug information. Default: false.

(*) = required variable.

Details

This pipe encapsulates the execution of SonarQube Cloud code analyzer in order to detect bugs, vulnerabilities and code smells. SonarQube Cloud can then decorate your Pull Requests and report back with code quality information. Getting started guide available here: Get started with Bitbucket Cloud.

Prerequisites

To use this pipe you have to set up a project on SonarQube Cloud, then use the generated token in a secure variable named SONAR_TOKEN on your repository or team/personal Bitbucket Account.

Examples

Basic example:

root@kitploit:~
- pipe: sonarsource/sonarcloud-scan:4.1.0

A bit more advanced example:

root@kitploit:~
- pipe: sonarsource/sonarcloud-scan:4.1.0
  variables:
    EXTRA_ARGS: ['-Dsonar.projectDescription="Project with sonarcloud-scan pipe"', '-Dsonar.eslint.reportPaths=report.json']
    SONAR_SCANNER_JAVA_OPTS: "-Xmx512m"
    DEBUG: "true"

This example uses a custom description of the project on SonarQube Cloud, reads the report produced by eslint, sets maximum memory to 512MB, and enables verbose output.

Support

If you would like help with this pipe, or you have an issue or feature request, let us know on our community forum.

If you are reporting an issue, please include:

  • the version of the pipe
  • relevant logs and error messages
  • steps to reproduce
Download Tool