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.0rc9

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.0rc9
File Size Uploaded
forge_mvc_audit-1.0.0rc9.tar.gz 28.6 kB Details

Built distribution (wheel)

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

Total release size: 48.5 kB

Release files / forge_mvc_audit-1.0.0rc9.tar.gz

Download URL forge_mvc_audit-1.0.0rc9.tar.gz
Size 28.6 kB
Tags Source
SHA-256 checksum
How to use checksums
51fd0413dd5ce429e81e9c3865de93c72d1ac41a0a6dafed58168c0e80b9f5f9
BLAKE2b-256 checksum
How to use checksums
533b4e49f7cfcc806ffcc93b909820b4aa2a562dff17cb8b7e23fbadfee473db
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.0rc9-py3-none-any.whl

Download URL forge_mvc_audit-1.0.0rc9-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e4a8d8b0cf6d79a7233bf70a65e08f98b2ce40b3691aa03e6e39959beea7f17
BLAKE2b-256 checksum
How to use checksums
63087acc0ccffe69b8ac98387d2733e565aab52d8326210b41c756721cfad643
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