-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Description
The PaddlePaddle scanner (`paddle_scanner.py`) handles `.pdmodel` and `.pdiparams` files but has limited test coverage. Add comprehensive tests including both benign and malicious model samples.
Background
PaddlePaddle (PaddlePaddle.org) is a popular ML framework, especially in China. Model files can contain serialized Python objects similar to pickle, making them a potential attack vector.
Suggested approach
- Create minimal test fixtures (benign and malicious `.pdmodel` files)
- Test detection of suspicious operations in PaddlePaddle models
- Test graceful handling of corrupted/invalid files
- Test scanner registration and priority in the registry
References
- `modelaudit/scanners/paddle_scanner.py` — scanner implementation
- `tests/scanners/` — existing scanner test patterns
- `docs/agents/new-scanner-quickstart.md` — scanner development guide
Getting started
```bash
uv sync --extra all-ci
uv run pytest tests/scanners/ -v -k "paddle"
```
Acceptance criteria
- At least 5 test cases covering benign, malicious, and edge cases
- Tests create minimal fixtures (no large binary files committed)
- All tests pass: `uv run pytest -n auto -m "not slow"`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed