Skip to content

Add a few instances of ecosystem_specific data#263

Open
kelbyludwig wants to merge 4 commits intopypa:mainfrom
kelbyludwig:add-ecosystem-specific
Open

Add a few instances of ecosystem_specific data#263
kelbyludwig wants to merge 4 commits intopypa:mainfrom
kelbyludwig:add-ecosystem-specific

Conversation

@kelbyludwig
Copy link

In #175 y'all added support for marking specific module attributes as affected. But, at least currently, that field is not used in any advisory.

I dug through a few recent advisories and found a few that were scoped to affected libraries instead of, say, vulnerable open-source HTTP APIs that use Python. My commits add a little more detail to the rationale I used when selecting affected modules/attributes.

I recognize that this data may not actually be used by pip-audit just yet which is why I "only" added data to three new entries. I figured that would be a good enough place to start and see if this is a useful thread to pull on :)

Also, since OSV (intentionally) does not specify exactly how to define ecosystem_specific (It is defined as a generic "object"), I added a PYSEC-specific JSONSchema check based on what I understood from the README.

From the fix:
https://github.com/langchain-ai/langchain/pull/18697/changes

It does appear that the fix was to change RequestsToolkit initialization
to require an explicit opt-into "dangerous" behavior so I've scoped the
import there.
The linked fix:

run-llama/llama_index@cdeaab9#diff-36053ee3f29c57f74fbd3d7bf920633fadb93f8eff85251d95dd707bb4d929b9

The additional validation is done in intialization of ImageDocument.
The fix commit:

https://github.com/python-pillow/Pillow/pull/9041/changes

The advisory mentions this affects "users who save untrusted data". I
believe the test `test_save_large_file` is aiming to exercise the
vulnerable codepath. It does so by calling `.save` on a PIL.Image.Image
object (Generated by the `hopper` helper:

https://github.com/radarhere/Pillow/blob/8cd86b63626259d70b50545fabb554924ed3bd8a/Tests/helper.py#L254
)
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.

1 participant