Skip to content

[Audit] S6 CI/CD: Pipeline lacks Python linting and security scanning #30

@mvillmow

Description

@mvillmow

Audit Finding

Severity: MAJOR
Section: 6. CI/CD & Build Pipeline
Grade Impact: This finding contributes to the D- grade for this section.

Summary

The CI pipeline (.github/workflows/ci.yml) validates YAML syntax and Grafana dashboard JSON structure but completely ignores the Python source code in exporter/exporter.py. There is no Python linting (ruff, flake8, mypy), no security scanning (bandit, safety), and no SAST tooling of any kind.

Evidence

  • File: .github/workflows/ci.yml lines 1-51
  • Observed: CI steps: yamllint, JSON validation, docker compose config. No Python-related checks.
  • Expected: At minimum: ruff check exporter/, mypy exporter/, bandit -r exporter/

Principle Violation

KISS: The exporter is the only custom code in the repository and the most likely source of bugs and security issues. Skipping it in CI while linting static config files inverts the priority of what should be checked.

Recommendation

Add CI steps for:

  1. Python linting: pip install ruff && ruff check exporter/
  2. Type checking: pip install mypy && mypy exporter/
  3. Security scanning: pip install bandit && bandit -r exporter/
  4. Consider using pixi run or just lint to keep CI aligned with local dev workflow

Impact

Python bugs (like the existing mutable default argument in gauge() and duplicate TYPE line emission) go undetected by CI. Security vulnerabilities in the exporter code are not caught before merge.

See also #6 (add tests for exporter), #9 (duplicate TYPE lines), #12 (mutable default argument).


Filed by HomericIntelligence ecosystem audit (repo-analyze-strict methodology)
Audit date: 2026-03-22

Metadata

Metadata

Assignees

No one assigned

    Labels

    auditEcosystem audit findingmajorMajor severity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions