CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-flask-wtf

tessl install tessl/pypi-flask-wtf@1.2.0

Form rendering, validation, and CSRF protection for Flask with WTForms.

Agent Success

Agent success rate when using this tile

72%

Improvement

Agent success rate improvement when using this tile compared to baseline

0.91x

Baseline

Agent success rate without this tile

79%

rubric.jsonevals/scenario-7/

{
  "context": "This criteria evaluates how well the engineer uses Flask-WTF to implement CSRF protection at both the application and form levels, focusing on the short-circuit validation capability between CSRFProtect extension and FlaskForm.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "CSRFProtect initialization",
      "description": "Uses CSRFProtect class from flask_wtf.csrf to initialize global CSRF protection for the application (e.g., csrf = CSRFProtect(app) or csrf.init_app(app))",
      "max_score": 20
    },
    {
      "name": "FlaskForm usage",
      "description": "Creates a form class that inherits from FlaskForm (from flask_wtf import FlaskForm) to enable form-level CSRF protection with automatic short-circuit validation",
      "max_score": 25
    },
    {
      "name": "Form field definitions",
      "description": "Properly defines form fields using WTForms field classes (StringField, PasswordField, etc.) and validators (DataRequired, Email, EqualTo, etc.) within the FlaskForm subclass",
      "max_score": 15
    },
    {
      "name": "Form validation",
      "description": "Uses form.validate_on_submit() or combination of form.is_submitted() and form.validate() to check form submission and perform validation including CSRF token validation",
      "max_score": 15
    },
    {
      "name": "CSRF exemption",
      "description": "Uses @csrf.exempt decorator (or csrf.exempt() method) from the CSRFProtect instance to exempt the health check endpoint from CSRF validation",
      "max_score": 15
    },
    {
      "name": "CSRF token rendering",
      "description": "Includes CSRF token in the form using form.hidden_tag() or form.csrf_token in the template/response for GET requests to /register",
      "max_score": 10
    }
  ]
}

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/flask-wtf@1.2.x
tile.json