Skip to content
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

feat(analyzer): Add option to skip setup.py analysis of PIP dependencies #8893

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

haikoschol
Copy link
Contributor

Previously, the PIP package manager has always set the --analyze-setup-py-insecurely flag on invocations of python-inspector. This is a potential security risk, as python-inspector will execute setup.py files of resolved dependencies.

It also causes analysis to fail if those setup.py files import packages that are not part of the Python standard library (such as numexpr in version 2.10.1).

This change makes it configurable whether the flag is set or not.

@haikoschol haikoschol requested a review from a team as a code owner July 16, 2024 16:01
Copy link

codecov bot commented Jul 16, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 67.52%. Comparing base (dfb014d) to head (fd24c3c).
Report is 3 commits behind head on main.

Files Patch % Lines
...rs/python/src/main/kotlin/utils/PythonInspector.kt 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8893      +/-   ##
============================================
- Coverage     67.54%   67.52%   -0.03%     
  Complexity     1166     1166              
============================================
  Files           244      244              
  Lines          7775     7776       +1     
  Branches        865      866       +1     
============================================
- Hits           5252     5251       -1     
- Misses         2167     2169       +2     
  Partials        356      356              
Flag Coverage Δ
funTest-non-docker 33.92% <ø> (ø)
test 37.89% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@haikoschol haikoschol force-pushed the py-inspector-option branch from fcf98cd to e84525c Compare July 17, 2024 06:20
Previously, the PIP package manager has always set the
"--analyze-setup-py-insecurely" flag on invocations of python-inspector.
This is a potential security risk, as python-inspector will execute
setup.py files of resolved dependencies.
It also causes analysis to fail if those setup.py files import packages
that are not part of the Python standard library (such as numexpr in
version 2.10.1).

This change makes it configurable whether the flag is set or not.

Signed-off-by: Haiko Schol <[email protected]>
@haikoschol haikoschol force-pushed the py-inspector-option branch from e84525c to fd24c3c Compare July 17, 2024 06:43
@sschuberth sschuberth enabled auto-merge (rebase) July 17, 2024 06:58
@sschuberth sschuberth disabled auto-merge July 17, 2024 07:10
@sschuberth
Copy link
Member

The PubFunTest failure is unrelated.

@sschuberth sschuberth merged commit 2d3847e into oss-review-toolkit:main Jul 17, 2024
20 of 22 checks passed
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.

2 participants