Security audit: refresh scan baselines for current dependency set#7362
Merged
Conversation
The pip scan-packages extras shard has been red on main because openai
2.47.0 changed the code inside five previously baselined findings, so
their evidence hashes no longer matched the allowlist. The hf-stack
shard was about to go red the same way: unsloth-zoo 2026.7.5 changed
two baselined test files.
All seven reopened findings were re-verified against the exact resolved
archives before re-baselining:
- openai/_base_client.py: while True in SyncPage.iter_pages, the
pagination iterator.
- openai/auth/_workload.py: Azure IMDS and GCP metadata token
providers for the documented workload identity federation feature.
- openai/resources/{beta/responses,realtime,responses}: while True in
websocket __aiter__ event loops; the loop bodies gained reconnect
handling in 2.47.0, which is what shifted the hashes.
- unsloth-zoo tests/test_vision_collator_audio.py: asserts that an
inline /tmp/a.wav path is passed through by the audio collator.
- unsloth-zoo tests/test_gemma4_forced_float32_ple_dtype.py:
compile()/exec() of the project's own generated Gemma4 PLE cast
helper source in tests.
No existing entries were removed. All three shards now exit 0 locally
against the same requirement sets CI uses.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
The Security audit workflow is red on main and on every PR: the
pip scan-packages :: extrasshard exits 1 with 5 non-baselined CRITICAL findings (last completed run on main: 29982017685, only that shard failed). Root cause is baseline drift, not a real detection:evidence_hashkeys no longer match the committed allowlist and the findings reopened by design.What
Adds 7 provenance-verified entries to
scripts/scan_packages_baseline.json(195 -> 202). No existing entry is removed or modified, so the currently green shards cannot regress. No blind--write-baselineregeneration: each entry was generated by scanning the exact resolved archive (openai 2.47.0 wheel, unsloth_zoo 2026.7.5 sdist) and the flagged file was opened and read at the flagged lines first.Verification of reopened findings
openai/_base_client.pywhile TrueisSyncPage.iter_pages, the pagination iteratoropenai/auth/_workload.pyopenai/resources/beta/responses/responses.py__aiter__yield/recv loop; hash drifted because 2.47.0 added_reconnecthandlingopenai/resources/realtime/realtime.py__aiter__patternopenai/resources/responses/responses.py__aiter__patterntests/test_vision_collator_audio.py/tmp/a.wavpath is passed throughextract_audio_infotests/test_gemma4_forced_float32_ple_dtype.pycompile()/exec()the project's own generated Gemma4 PLE cast helper sourceThe remaining 181 extras findings are MEDIUM (non-gating). They were reviewed by package and are all textbook false positives on top-1000 PyPI code: build machinery and plugin
__import__(setuptools, numba, sklearn/scipyarray_api_compat), bytecodemarshalcaches (jinja2, setuptools), env config reads (click, huggingface-hub, triton knobs, omegaconf, argbind),chr()unicode fixtures in tests (networkx, regex), base64-embedded fonts/payloads with legitimate consumers (pillow ImageFont, pydantic Base64 types), and "bc1" wallet-prefix collisions with the BC1 DDS pixel format (pillow), spline boundary conditions (scipy), and theano broadcastables (sympy). Nothing suspicious was found: no typosquats, no obfuscated payloads, no unexpected network exfiltration.Local shard results (same requirement sets and Python 3.12 as CI)
pip scan-packages :: extras: exit 0, 99 suppressed (was exit 1 with 5 active CRITICAL)pip scan-packages :: hf-stack: exit 0, 122 suppressed (was exit 1 with 1 CRITICAL + 1 HIGH after the unsloth-zoo 2026.7.5 release)pip scan-packages :: studio: exit 0, 151 suppressedLocal extras resolution matched the failing CI run exactly (124 archives, identical versions), and the five added openai evidence blocks are byte-identical to the CI log's active findings.