-
Notifications
You must be signed in to change notification settings - Fork 8
fix(pickle-scanner): three targeted false-positive reductions #591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
b594816
fix(pickle-scanner): three targeted false-positive reductions
yash2998chhabria 28bd9db
fix(pickle-scanner): fix MANY_DANGEROUS_OPCODES false positives on sk…
yash2998chhabria 9575bf2
style: apply ruff format to pickle_scanner.py
yash2998chhabria e19c6bd
fix: reduce false positives in pickle/openvino/keras scanners
yash2998chhabria 8b0c4e9
fix: eliminate remaining pickle/joblib false positives (round 2)
yash2998chhabria e041076
fix: add scipy.sparse allowlist and lower ML confidence threshold
yash2998chhabria c131fd5
fix: add sklearn._loss and old module path entries to allowlist
yash2998chhabria aa3edaa
Fix false positives in pickle/joblib scanning (round 4+5 fixes)
yash2998chhabria fcddf2c
Fix false positives from binary model data matching secret/auth patterns
yash2998chhabria 3a7df6b
Fix test_detect_secrets_in_file Windows CI failure
yash2998chhabria e41c324
fix: address CodeRabbit review comments on PR #591
yash2998chhabria 1ee2a8d
fix: relax compressed joblib test assertion for cross-platform compat…
yash2998chhabria 9d82a35
fix(pickle-scanner): address critical CodeRabbit security findings on…
yash2998chhabria 526425b
fix(pickle-scanner): add numpy._core.numeric._frombuffer and truncate…
yash2998chhabria 70dc71b
fix(pickle-scanner): suppress MANY_DANGEROUS_OPCODES on low-confidenc…
yash2998chhabria 1f703b4
Merge branch 'main' into fix/pickle-remaining
yash2998chhabria 7a5e25d
fix(test): broaden keyword filter for Windows joblib test compatibility
yash2998chhabria 254ff0b
fix(pickle-scanner): allow safe builtins globals through ALWAYS_DANGE…
yash2998chhabria ad46175
Merge remote-tracking branch 'origin/main' into fix/pickle-remaining
yash2998chhabria 91d29bf
Merge remote-tracking branch 'origin/main' into fix/pickle-remaining
yash2998chhabria 6693314
fix: remove duplicate scipy sparse dict keys in ML_SAFE_GLOBALS
yash2998chhabria 8bc2a7b
Merge remote-tracking branch 'origin/main' into fix/pickle-remaining
yash2998chhabria 4078e1c
Merge remote-tracking branch 'origin/main' into fix/pickle-remaining
yash2998chhabria File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: promptfoo/modelaudit
Length of output: 1761
🏁 Script executed:
Repository: promptfoo/modelaudit
Length of output: 46
🏁 Script executed:
Repository: promptfoo/modelaudit
Length of output: 46
🏁 Script executed:
Repository: promptfoo/modelaudit
Length of output: 291
🏁 Script executed:
Repository: promptfoo/modelaudit
Length of output: 659
🏁 Script executed:
Repository: promptfoo/modelaudit
Length of output: 2508
Remove duplicate
ML_SAFE_GLOBALSkeys that override earlier entries.The dictionary contains duplicate keys at multiple locations:
"numpy.random._pcg64"(lines 644 and 676),"numpy.random._philox"(lines 648 and 675), and"numpy.random._sfc64"(lines 651 and 677). In Python dictionaries, the last occurrence silently overwrites earlier ones. At line 676,"numpy.random._pcg64": ["PCG64"]overwrites the earlier entry at line 644 with["PCG64", "PCG64DXSM"], making the effective allowlist more restrictive. While the net security effect is more conservative, the duplication creates unclear intent and introduces a subtle code defect that could lead to unintended behavior changes during future maintenance. Consolidate to a single entry per key with explicit values.🤖 Prompt for AI Agents