Aalexbit-codemod

python-s8389-fastapi-file-upload-form-mining

Mine python:S8389: FastAPI file upload endpoints should use Form() with Pydantic validators instead of Body() or Depends(); read-only metrics with blocking severity

miningmetricspythonsecuritypython:S8389
Public
0 executions

Run locally

npx codemod python-s8389-fastapi-file-upload-form-mining

python-s8389-fastapi-file-upload-form-mining

Read-only mining codemod for python:S8389: FastAPI file upload endpoints should use Form() with Pydantic validators instead of Body() or Depends().

Emits python_security_finding metric rows with blocking severity. Source files are never modified.

Rule

  • ID: python:S8389
  • Severity: blocking
  • Remediation: Use Form() with Pydantic validators for file upload endpoints

Usage

bash

Development

bash

Ready to contribute?

Build your own codemod and share it with the community.