Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

forge-mvc-audit

Journal d'audit applicatif opt-in pour Forge : tracer les actions importantes de l'application (élève créé, note modifiée, QCM corrigé, connexion, rôle changé, fichier supprimé) dans une table audit_log, avec une API explicite.

Périmètre volontairement borné : c'est un audit applicatif, pas un SIEM de cybersécurité. Cohérent avec ADR-008 : Forge fournit la table et le helper, la décision de tracer reste applicative.

Installation

pip install --pre forge-mvc-audit

En développement : pip install -e ./packages/forge-mvc-audit.

Mise en place de la table

forge audit:init        # copie la migration dans mvc/migrations/
forge migration:apply   # crée la table audit_log

Utilisation

from forge_mvc_audit import record_audit, get_audit_log

record_audit("eleve.cree", actor="prof.dupont", target_type="eleve", target_id=42)
record_audit("note.modifiee", actor="prof.dupont", target_type="note", target_id=7, details="12 -> 15")

for entree in get_audit_log(limit=20, actor="prof.dupont"):
    print(entree.created_at, entree.action, entree.target_type, entree.target_id)

L'API expose record_audit, get_audit_log, AuditEntry, plus AuditError, TABLE_NAME et MAX_LIMIT.

Périmètre

  • record_audit(action, *, actor, target_type, target_id, details, db) écrit une trace et renvoie son identifiant.
  • get_audit_log(*, limit, actor, action, target_type, target_id, db) relit les entrées récentes, filtrables (colonnes en liste blanche).
  • Hors périmètre : corrélation d'événements, alerting, rétention automatique, détection d'intrusion (ce n'est pas un SIEM).

Documentation complète : https://forgemvc.com/docs/forge/.

Release files for forge-mvc-audit 1.0.0rc7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for forge-mvc-audit 1.0.0rc7
File Size Uploaded
forge_mvc_audit-1.0.0rc7.tar.gz 16.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for forge-mvc-audit 1.0.0rc7
File Interpreter ABI Platform
forge_mvc_audit-1.0.0rc7-py3-none-any.whl Python 3 none any Details

Total release size: 29.3 kB

Release files / forge_mvc_audit-1.0.0rc7.tar.gz

Download URL forge_mvc_audit-1.0.0rc7.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3987dcb92820a51fa99df1bd11b7fdc49e2d660a01ebd517f062e7e77dd27580
BLAKE2b-256 checksum
How to use checksums
ad678dfebcf075e7b3ec551b68063ca4c722aed5a03121f1515833d5c7ad1786
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / forge_mvc_audit-1.0.0rc7-py3-none-any.whl

Download URL forge_mvc_audit-1.0.0rc7-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
774becce7f7c972d714e936598fd8d3194908bc4cd00422aec9bde6b597fd6c9
BLAKE2b-256 checksum
How to use checksums
1c50829900b68b82ccc3ecb3fd7c9eaae3b8e30101fa78d88153c726bc8a6fd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page