Skip to content
Maua.Culturewire

SonarQube Cloud

Code quality and security: issues, hotspots and quality gates

Developer toolsCatalog3 tools · 0 triggers

Managed auth

Authentication

Methods your end users can connect with. Credentials are stored encrypted, and secret values are never shown again or returned by the API.

  • API key

    Your users enter

    • User tokenSecretRequired
    • SonarQube URLOptionalHTTPS URL

    Where to find them

    1. In sonarcloud.io (or sonarqube.us): your avatar → “My Account” → “Security”.
    2. In “Generate Tokens” give it a name and click “Generate”.
    3. Copy the token: it is shown only once. It acts with your permissions in all your organizations. With SonarQube Server it is created the same way (“My Account” → “Security”) and must be a “User token”; project analysis tokens do not work for queries.

    Get credentials (opens in a new tab)

Tools (3)

  • SonarQube Cloud API requestSONARQUBE_SEND_REQUEST

    Authenticated call to the SonarQube Cloud API ({url}/api). Any endpoint of the API is allowed. Paths are relative to /api; in SonarQube Cloud almost all require organization=… or the project key. Examples: GET /organizations/search?member=true (your organizations), GET /projects/search?organization=…&ps=100, GET /issues/search?componentKeys={project}&resolved=false&impactSeverities=BLOCKER,HIGH&ps=100, GET /hotspots/search?projectKey={project}&status=TO_REVIEW, GET /measures/component?component={project}&metricKeys=alert_status,coverage,software_quality_security_issues, GET /project_branches/list?project={project}, GET /project_pull_requests/list?project={project}, GET /ce/activity?component={project}&ps=10 (latest analyses), GET /rules/show?key={rule}&organization=…, GET /sources/raw?key={project}:{file path}, POST /issues/do_transition as a form (issue=…&transition=accept, falsepositive or reopen), POST /issues/add_comment as a form (issue=…&text=…).

    Required scopes

    No scopes required

    Input

    SonarQube Cloud API request input
    NameTypeDescription
    methodstringHTTP methodOne of: GET, POST, PUT, PATCH, DELETEDefault: "GET"
    pathrequiredstringPath relative to the API base URL, or a full URL on the same API (e.g. a next-page link)
    queryobjectQuery string parameters
    bodyunknownJSON body
    formobjectBody as application/x-www-form-urlencoded instead of JSON
    body_base64stringBinary body, base64 (at most 960000 characters)
    content_typestringContent-Type of body_base64
    headersobjectExtra headers such as Accept. Authentication is added automatically.
  • IssuesSONARQUBE_LIST_ISSUES

    Open issues of a project (or of a whole organization), from most to least severe, with rule, message, file and line, impact (security, reliability or maintainability and its severity), status, author and date.

    Required scopes

    No scopes required

    Input

    Issues input
    NameTypeDescription
    projectstringProject key (GET /projects/search?organization=… lists them)
    organizationstringOrganization key; required if you do not specify the project
    qualitiesstring[]Only those affecting these qualities
    severitiesstring[]
    branchstringBranch (empty: the main one)
    pull_requeststringID of an analyzed pull request
    maxintegerDefault: 50
    pageintegerDefault: 1
  • Quality status of a projectSONARQUBE_GET_QUALITY_STATUS

    Quality gate of a project (OK or ERROR and the failing conditions) and its key metrics: security, reliability and maintainability issues, new issues, security hotspots and percentage reviewed, ratings (A-E), coverage, duplication and lines of code.

    Required scopes

    No scopes required

    Input

    Quality status of a project input
    NameTypeDescription
    projectrequiredstringProject key
    branchstringBranch (empty: the main one)
    pull_requeststringID of an analyzed pull request