124906d084
- Introduced multiple guides for workflows including Evidence Pack Validation, Incident Response, Model Validation, Performance & HIL, Release Signing, SBOM Validation, Secret Scanning, and Supply Chain Attestation. - Created dynamic badges for each workflow to reflect their status and compliance. - Implemented a checklist for validating CI/CD workflows and evidence packs. - Developed scripts for building firmware, testing, collecting evidence, and generating audit reports. - Added tools for generating community, documentation, quality, and security badges based on various reports. - Established endpoints for dynamic badges to be integrated into documentation and README files. - Enhanced the overall structure and traceability of CI/CD processes with evidence packs and automated checks.
29 lines
772 B
Python
29 lines
772 B
Python
#!/usr/bin/env python3
|
||
# Génère un badge endpoint pour l’audit CI/CD
|
||
|
||
import json
|
||
from datetime import datetime
|
||
|
||
INPUT = 'docs/ci-audit-summary.json'
|
||
OUTPUT = 'docs/ci-audit-badge.json'
|
||
|
||
with open(INPUT, 'r') as f:
|
||
report = json.load(f)
|
||
|
||
score = sum(1 for v in report['summary'].values() if v > 0)
|
||
max_score = len(report['summary'])
|
||
|
||
badge = {
|
||
"schemaVersion": 1,
|
||
"label": "CI Audit",
|
||
"message": f"{score}/{max_score} domaines",
|
||
"color": "green" if score == max_score else "yellow" if score >= max_score - 1 else "red",
|
||
"timestamp": datetime.utcnow().isoformat() + 'Z',
|
||
"details": report['summary']
|
||
}
|
||
|
||
with open(OUTPUT, 'w') as f:
|
||
json.dump(badge, f, indent=2)
|
||
|
||
print(f"Badge CI Audit généré : {OUTPUT} (score: {badge['message']})")
|