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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "serializer_exposure"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| include_safe | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||