Skip to content

feat: integra health check, Snyk y SonarCloud - #7

Merged
Sebithaz-dev merged 4 commits into
mainfrom
feature/security-quality
Oct 27, 2026
Merged

Sebithaz-dev merged 4 commits into
mainfrom
feature/security-quality

Conversation

@Sebithaz-dev

@Sebithaz-dev Sebithaz-dev commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Resumen

  • Agrega ml/health.py, un CLI de health check que valida configuracion, artefactos locales y acceso a S3.
  • Integra en CI el health check de configuracion y en el entrenamiento el health check de artefactos + S3.
  • Agrega workflow security.yml con Snyk Open Source, Snyk Code y SonarCloud.
  • Agrega sonar-project.properties y cobertura con pytest-cov.
  • Verifica la propiedad del bucket S3 con ExpectedBucketOwner (hallazgo corregido de Sonar).
  • Documenta health check, Snyk, SonarCloud y secretos en el README.

Verificacion local

  • ruff check ml tests -> OK
  • pytest tests/ -v --cov=ml --cov-report=term-missing -> 31 passed, ml/health.py 95% cobertura
  • python -m ml.health --json --skip-s3 --skip-artifacts -> status: ok
  • python -m ml.health --json --skip-s3 -> status: degraded por artefactos locales ausentes (esperado en checkout limpio)

Checks de CI

  • Lint y tests: pass
  • Snyk (SCA + Code): pass
  • SonarCloud + Quality Gate: pass

Secrets y variables

  • Secrets ya configurados: SNYK_TOKEN, SONAR_TOKEN
  • Variables: SONAR_ORGANIZATION=sebithaz-dev, SONAR_PROJECT_KEY=Sebithaz-dev_Model-Training-S3

Notas

  • Snyk queda como informativo al inicio (continue-on-error); los hallazgos se suben como SARIF a GitHub Security.
  • SonarCloud Automatic Analysis quedo desactivado para evitar conflicto con el analisis de CI.
  • No se mergea automaticamente: queda a revision.

Valida configuracion, artefactos locales y acceso a S3. Se integra en CI (solo config) y en el entrenamiento (artefactos + S3) con cobertura pytest.
Agrega workflow con Snyk Open Source, Snyk Code y SonarCloud, incluyendo cobertura y subida de SARIF a GitHub Security.
Documenta el CLI de health, Snyk, SonarCloud, secretos, cobertura y corrige enlaces y descripcion desactualizada de CI.
Agrega ExpectedBucketOwner en las llamadas a S3 para verificar la propiedad del bucket y suma tests para S3, salida de texto y modo estricto.
@sonarqubecloud

Copy link
Copy Markdown

@Sebithaz-dev
Sebithaz-dev merged commit ffeec3d into main Oct 27, 2026
5 checks passed
@Sebithaz-dev
Sebithaz-dev deleted the feature/security-quality branch October 27, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant