Project

General

Profile

Actions

Feature #69

closed
RA

Feature #28: Intégrer la gestion des SOUPs dans Pipeliner via Trivy, Dependency-Track et Aggregator

Aggregator — SOUPs report download proxy (report_url) via Dependency-Track export API

Feature #69: Aggregator — SOUPs report download proxy (report_url) via Dependency-Track export API

Added by Redmine Admin about 2 months ago. Updated about 2 months ago.

Status:
Shipped
Priority:
Normal
Assignee:
-
Start date:
06/11/2026
Due date:
% Done:

0%

Estimated time:
spec_ref:

conversation:21#28

build_status:
build_number:
ci_run_url:
scan_status:
scan_report_url:
deploy_status:
preprod_url:
deployed_at:
branch:
feat/69-soups-report
pr_url:
https://github.com/omdev-tech/aggregator/pull/5
security_key:
severity:
paused:

Description

**Parent :** #28 · **Surface :** `../aggregator` · **Dépend de :** #42 (endpoint /soups)

## Objectif
Exposer le **rapport SOUPs téléchargeable** via l'aggregator (DTracker étant localhost-only, son URL n'est pas linkable). Permet un lien exposable + une colonne Grafana + un bouton "Télécharger le rapport" côté dashboard (#43/#44).

- Nouvel endpoint `GET /api/projects/{key}/soups/report` : proxifie l'API d'export de Dependency-Track (`GET /api/v1/bom/cyclonedx/project/{uuid}` pour le SBOM CycloneDX, ou `/api/v1/finding/project/{uuid}/export` pour le rapport de findings) et le **renvoie en flux avec `Content-Disposition: attachment`** (filename = `<project_key>-sbom.json`). Le lien est celui de l'aggregator, jamais l'URL loopback de DTracker.
- Ajouter un champ **`report_url`** à la réponse `/api/projects/{key}/soups` ET au slice projet de `/api/overview` (chemin vers l'endpoint ci-dessus), pour que le dashboard et Grafana puissent rendre un lien.
- Dégradé : DTracker indisponible/non configuré ou clé inconnue → 404/204 propre (pas de 500) ; `report_url` = `null` dans l'enveloppe vide.

## Critères d'acceptation
- `GET /api/projects/{key}/soups/report` renvoie le SBOM CycloneDX (ou findings) en téléchargement (`Content-Disposition`), via l'API DTracker.
- `report_url` présent dans `/soups` et dans le slice `/api/overview` du projet.
- Dégradé → pas de 500 ; `report_url` null quand pas de données.
- Réutilise le client DTracker (`app/adapters/dtrack.py`) + le pattern aggregator. Gate vert : `python -m pytest -q` + `ruff check .`. Doc mise à jour dans `docs/SBOM.md`.

RA Updated by Redmine Admin about 2 months ago Actions #1

  • Status changed from Submitted to Spec
  • spec_ref updated (diff)

RA Updated by Redmine Admin about 2 months ago Actions #2

  • Status changed from Spec to In development

RA Updated by Redmine Admin about 2 months ago Actions #3

  • Status changed from In development to QA
  • branch set to feat/69-soups-report
  • pr_url set to https://github.com/omdev-tech/aggregator/pull/5

PR ouverte vers `dev` : https://github.com/omdev-tech/aggregator/pull/5

Implémentation (aggregator, branche `feat/69-soups-report` depuis `origin/dev`) :
- `app/adapters/dtrack.py` — `report_bytes(key)` : résout l'uuid du projet (match par `name`), `GET /api/v1/bom/cyclonedx/project/{uuid}` (export SBOM CycloneDX, `X-API-Key`), renvoie (octets bruts, content-type). Dormant / clé inconnue / export en échec → `None` (ne lève jamais).
- `app/main.py` — `GET /api/projects/{key}/soups/report` : renvoie l'export en téléchargement (`Content-Type: application/json`, `Content-Disposition: attachment; filename="<key>-sbom.json"`). Dégradé/non configuré/clé inconnue → **404** propre (pas de body), jamais 500.
- Champ **`report_url`** ajouté à la réponse `/api/projects/{key}/soups` ET au slice projet de `/api/overview` (chemin de téléchargement quand données SOUPs présentes, `null` sinon).
- `docs/SBOM.md` mise à jour (endpoint rapport + `report_url`).

Gate vert : `python -m pytest -q` → 89 passés (9 nouveaux : report_bytes happy/inconnu/dégradé/dormant, endpoint stream + 404, report_url null/présent + overview), `ruff check .` propre. Suite jouée deux fois (idempotent). → QA.

RA Updated by Redmine Admin about 2 months ago Actions #4

  • Status changed from QA to Shipped

Shipped — `/api/projects/{key}/soups/report` + `report_url` déployés en prod (aggregator master #38). Proxy d'export CycloneDX depuis DTracker.

Actions

Also available in: PDF Atom