Quality Tools

Code Quality & Security

Automated code quality analysis and container security scanning. Catch bugs, vulnerabilities, and code smells before they reach production.

Analysis Tools

Two complementary tools for comprehensive code and infrastructure quality.

SonarQube
Static Code Analysis

Continuous inspection of code quality. Detects bugs, vulnerabilities, code smells, and technical debt across multiple programming languages.

  • Multi-language support (Python, JS, Go, Java, etc.)
  • Quality gate enforcement
  • Technical debt tracking
  • CI/CD integration (Forgejo Actions)
  • Duplicated code detection
  • Code coverage reporting
Trivy
Container Security Scanner

Comprehensive vulnerability scanner for containers, filesystems, and infrastructure as code. Finds CVEs in OS packages and application dependencies.

  • Docker image vulnerability scanning
  • OS package CVE detection
  • Application dependency scanning
  • Infrastructure as Code misconfiguration
  • SBOM (Software Bill of Materials) generation
  • Kubernetes manifest scanning

Capabilities

What the quality tools can detect and report on.

🐞

Bug Detection

Static analysis finds null pointer dereferences, resource leaks, infinite loops, and other reliability issues before runtime.

🔒

Security Vulnerabilities

Identifies SQL injection, XSS, hardcoded credentials, insecure crypto, and OWASP Top 10 issues in application code.

📊

Code Metrics

Cyclomatic complexity, cognitive complexity, duplicated blocks, and maintainability ratings for every file and function.

📦

Container CVEs

Scans Docker images layer by layer for known CVEs in OS packages (apt, apk, yum) and language-specific packages (pip, npm, go).

📝

IaC Scanning

Checks Dockerfiles, Kubernetes manifests, Terraform, and CloudFormation templates for security misconfigurations.

Quality Gates

Configurable pass/fail criteria for code coverage, duplication, and vulnerability thresholds. Blocks merges that fail quality standards.

Usage Examples

Common commands for running quality scans.

SonarQube Scanner

# Scan a project
docker run --rm \
  -e SONAR_HOST_URL="https://sonarqube.home" \
  -e SONAR_TOKEN="your-token" \
  -v "$(pwd):/usr/src" \
  sonarsource/sonar-scanner-cli

Trivy Scanner

# Scan a Docker image
trivy image nginx:latest

# Scan with severity filter
trivy image --severity HIGH,CRITICAL \
  myapp:latest

# Scan filesystem
trivy fs ./my-project/

Severity Levels

Findings are classified by severity for prioritization.

CRITICAL HIGH MEDIUM LOW

Critical and high severity findings should be addressed immediately. Medium issues are tracked for upcoming sprints. Low severity items are logged for awareness and future cleanup.

Related Services