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

Added parser for Pipfile.lock to cataloger #473

Merged
merged 6 commits into from
Aug 19, 2021
Merged

Added parser for Pipfile.lock to cataloger #473

merged 6 commits into from
Aug 19, 2021

Conversation

Zilborg
Copy link
Contributor

@Zilborg Zilborg commented Aug 9, 2021

Signed-off-by: Nikita 33390074+Zilborg@users.noreply.github.com

Issue: #242

@wagoodman
Copy link
Contributor

a couple of notes:

  • if you rebase your branch the integration test should pass
  • make lint-fix should either fix or at least highlight locally the lint failure

Signed-off-by: Nikita <33390074+Zilborg@users.noreply.github.com>
Signed-off-by: Nikita <33390074+Zilborg@users.noreply.github.com>
Zilborg and others added 3 commits August 17, 2021 21:21
Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Nikita <33390074+Zilborg@users.noreply.github.com>
Signed-off-by: Nikita <33390074+Zilborg@users.noreply.github.com>
@Zilborg
Copy link
Contributor Author

Zilborg commented Aug 17, 2021

fixed _version in both cases + rebased branch to actual version. Now all should be fine. I hope)

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
@wagoodman wagoodman enabled auto-merge (squash) August 19, 2021 13:07
@wagoodman
Copy link
Contributor

thanks for the contribution, @Zilborg !

@@ -48,7 +49,7 @@ func parsePipfileLock(_ string, reader io.Reader) ([]pkg.Package, error) {
return nil, fmt.Errorf("failed to parse Pipfile.lock file: %w", err)
}
for name, pkgMeta := range lock.Default {
version := pkgMeta.Version[2:len(pkgMeta.Version)]
version := strings.TrimPrefix(pkgMeta.Version, "==")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Thx! 👍

@wagoodman wagoodman merged commit cba5b57 into anchore:main Aug 19, 2021
@wagoodman wagoodman linked an issue Aug 19, 2021 that may be closed by this pull request
GijsCalis pushed a commit to GijsCalis/syft that referenced this pull request Feb 19, 2024
* Added parser for Pipfile.lock to cataloger

Signed-off-by: Nikita <33390074+Zilborg@users.noreply.github.com>

* make lint-fix

Signed-off-by: Nikita <33390074+Zilborg@users.noreply.github.com>

* Update syft/pkg/cataloger/python/parse_pipfile_lock.go

Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Nikita <33390074+Zilborg@users.noreply.github.com>

* fix _version

Signed-off-by: Nikita <33390074+Zilborg@users.noreply.github.com>

* swap method for trimming "==" prefix from pipfile pkg versions

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
Co-authored-by: Alex Goodman <alex.goodman@anchore.com>
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.

Add Pipenv support (Pipfile.lock)
2 participants