Sonar CLI

Use the SonarQube CLI to access and understand SonarQube analysis results. Use when the user asks about SonarQube issues.

bkircher Updated

File contents

Authentication

Knauf-Group accounts are hosted in the SonarQube Cloud EU region.

# Log in (opens browser for interactive auth)
sonar auth login -o knauf-group -s https://sonarcloud.io

# Check authentication status
sonar auth status

Find projects and issues

# List all projects
sonar list projects | jq

# List issues for a project
sonar list issues -p Knauf-Group_pas-frontend --severities HIGH,BLOCKER --statuses OPEN

Secret scanning

Run secret scanning only on individual files, not directories or full repositories.

# Scan a file for hard-coded secrets
sonar analyze secrets ./Dockerfile

bkircher/skills/tree/main/sonar-cli commit 799fa7b5c5

Frequently asked questions

npx skillmds@latest add bkircher/sonar-cli