serializer_exposure
Detect DRF serializers exposing unintended fields, such as fields = "__all__" that silently include new model columns. Audit API exposure to prevent sensitive data leaks.
Instructions
What each DRF ModelSerializer exposes, and what looks unintended.
`fields = "__all__"` is a decision made once and then re-made silently by
every migration after it. Add a token column to the model and the API starts
returning it, with no diff on the serializer for anyone to review.
Args:
include_safe: also list serializers with an explicit, clean field list.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| include_safe | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||