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

DL3013: Fix false positives for VCS, http and local path packages (#389) #845

Merged
merged 2 commits into from Jul 9, 2022

Conversation

Lunkentuss
Copy link
Contributor

@Lunkentuss Lunkentuss commented Jun 15, 2022

What I did

  • Fix false positive when installing package with other supported VCS
    such as: pip install bzr+ssh://..@1.0.0, as described in
    https://pip.pypa.io/en/stable/topics/vcs-support/.
  • Fix false positive when installing package from local directory:
    pip install my/install/path
  • Fix false positive when installing package from http/https url:
    pip install https://foo.bar/baz-1.0.0.zip

fixes #389

How I did it

Extended the previous check for a git+https vcs scheme to allow any of the supported vcs sources, such as git+ssh and bzr+ssh, documented in https://pip.pypa.io/en/stable/topics/vcs-support/. Also added passing check if a package source included a forward slash (/) but is not a valid vcs source.

How to verify it

Compare the supported VCS in this PR from the VCS supported from the pip documentation https://pip.pypa.io/en/stable/topics/vcs-support/. Also, the following Dockerfile illustrates cases where hadolint now runs without any warnings.

FROM python:3.10

RUN pip install --no-cache-dir \
  git+ssh://hello@1.3 \
  hello/bar/baz \
  https://foo.bar/baz-1.0.0.zip

Peter Hansson added 2 commits June 15, 2022 22:37
…dolint#389)

- Fix false positive when installing package with other supported VCS
  such as: `pip install bzr+ssh://..@1.0.0`, as described in
  https://pip.pypa.io/en/stable/topics/vcs-support/.
- Fix false positive when installing package from local directory:
  `pip install my/install/path`
- Fix false positive when installing package from http/https url:
  `pip install https://foo.bar/baz-1.0.0.zip`
@lorenzo
Copy link
Member

lorenzo commented Jul 9, 2022

thanks!

@lorenzo lorenzo merged commit cbf1479 into hadolint:master Jul 9, 2022
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.

pip install directory detected as DL3013
2 participants