EU AI Act enforcement begins August 2, 2026 — Are you ready?
← All Frameworks

Django Governance Score

The most deployed Python web framework has 1,995 test files but zero enforcement hooks.

80,000+ GitHub starsAssessed: 2026-03-11View Repository

Overall Score: 29/100 (Grade: D)

35/100
Enforcement Maturity
Grade: D
10/100
Context Hygiene
Grade: F
42/100
Automation Readiness
Grade: C
Portfolio average29/100
Django29/100

Key Findings

No Hook Enforcement [CRITICAL]

Zero pre-commit or Claude Code hooks. Security-critical patterns like CSRF protection, authentication middleware, and SQL injection prevention are enforced only by human code review.

25 Potential Hardcoded Secrets [CRITICAL]

No automated secret scanning. Test fixtures are indistinguishable from real secrets. Django's SECRET_KEY pattern may normalize credential embedding in projects built on it.

No CLAUDE.md or Agent Instructions [HIGH]

No project-specific context for AI agents. 20+ years of accumulated conventions -- MVT architecture, ORM patterns, middleware ordering, security best practices -- exist only as tribal knowledge.

Why Django's Governance Score Matters

Django powers some of the most critical web applications in the world, from Instagram to Mozilla to the Washington Post. With 80,000+ GitHub stars and a 20-year track record, it is the most battle-tested Python web framework. Its governance posture affects every application built on it.

Django's L4 (test) coverage is the strongest in our audit portfolio: 1,995 test files with a 205% test-to-source ratio. This is excellent software engineering. But tests alone do not constitute governance. Without L5 hooks, nothing prevents a commit from bypassing Django's security patterns -- CSRF protection, authentication middleware, SQL injection prevention -- before reaching CI.

Enforcement Ladder Analysis

Django's enforcement distribution tells an interesting story. At L4 (tests), it is the strongest project we have audited, with nearly two test files for every source file. At L3 (templates), 17 GitHub Actions workflows provide solid CI/CD automation. But at L5 (hooks) and L2 (prose), there is nothing.

The result is a governance model that catches problems after they are committed, never before. For security-critical patterns -- CSRF tokens, authentication backends, middleware ordering -- this means a window exists between commit and CI where vulnerable code can enter the codebase.

What This Means for Teams Using Django

Django's extensive documentation and well-established patterns make it one of the safest frameworks to build on. The governance risk is in modification, not usage. If your team extends Django or builds applications on it:

  1. Add pre-commit hooks that validate security-critical patterns (CSRF, authentication, middleware ordering)
  2. Create CLAUDE.md documenting Django's MVT architecture, ORM conventions, and security requirements for AI contributors
  3. Implement secret scanning in CI to distinguish test fixtures from real credentials
  4. Use Django's built-in security checklist (manage.py check --deploy) as a pre-deployment hook

EU AI Act Compliance Impact

Django itself is web infrastructure, not an AI system. But Django applications increasingly serve as the deployment layer for AI models -- serving predictions, managing training data, and providing user interfaces for AI systems. Organizations using Django in AI-adjacent contexts should ensure their governance layer addresses the 20% EU AI Act readiness gap, particularly in Article 15 (Cybersecurity) where Django's security middleware is a key defense.

Recommendations

Immediate (Week 1): Create CLAUDE.md covering MVT architecture, security patterns, and middleware conventions (1 hour). Add 3 pre-commit hooks for security-critical paths (2 hours). Audit and remediate 25 potential secrets (2 hours).

Short-term (Month 1): Deploy L5 enforcement hooks for security-critical paths (authentication, CSRF, SQL). Set up violation tracking for security pattern bypasses. Add automated secret scanning to CI pipeline.

Strategic (Quarter): Build enforcement ladder documentation mapping Django security patterns to compliance requirements. Establish automated regression testing for security middleware behavior. Implement autoresearch optimization to continuously improve enforcement coverage.

Raw Scan Data

1,995
Test Files
971
Source Files
17
GitHub Actions
25
Potential Secrets
99
TODO/FIXME
135
Dead Code Markers
0
CLAUDE.md Files
0
L5 Hooks

EU AI Act Readiness

20%

Estimated compliance readiness based on enforcement posture, documentation, and automated quality controls. EU AI Act enforcement begins August 2, 2026.

See how your project compares

Run our free governance scanner on your own repository and get an instant enforcement posture score.

Scan Your Repository
This governance assessment was generated by walseth.ai using automated enforcement posture scanning on 2026-03-11. Findings are based on static analysis of the repository structure, configuration files, and code patterns. Scores reflect a point-in-time assessment and may change as the project evolves.

Get Your Free AI Governance Audit

Submit your repository and receive a structural governance assessment -- risk classification, violation scan, and enforcement recommendations. No cost, no commitment.

Request Free Audit