Skip to content

test: cover AI model deserialization patterns#60

Open
ynachiket wants to merge 1 commit into
ParzivalHack:mainfrom
ynachiket:ynachiket/test-ai-rule-coverage-20260604
Open

test: cover AI model deserialization patterns#60
ynachiket wants to merge 1 commit into
ParzivalHack:mainfrom
ynachiket:ynachiket/test-ai-rule-coverage-20260604

Conversation

@ynachiket
Copy link
Copy Markdown
Contributor

Summary

  • add metadata coverage for the existing AI203 and AI204 model deserialization rules
  • add focused detection tests for keras.models.load_model(...) and joblib.load(...)
  • add comment-line exclusion checks so the regex rules do not flag commented examples

Closes #16

Validation

  • /tmp/pyspector-pdlc047-venv/bin/python -m pytest tests/unit/test_ai_rules.py -q -> 4 passed, 6 skipped (scanner-path tests skipped because the local runner lacks the PySpector Rust core)
  • /tmp/pyspector-pdlc047-venv/bin/python -m py_compile tests/unit/test_ai_rules.py
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Good First Issue: Add tests for existing security rules

1 participant