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

Add support for fetching from repository mentioned in pom file #289

Closed
wants to merge 13 commits into from

Conversation

renypaul
Copy link

Issue: #286

Description

This change allows packages to be fetched from repository other than https://repo.maven.apache.org/maven2/

  • Get username and password from settings file for the corresponding server ID mentioned in the pom file
  • Added support for authentication if username and password mentioned while fetching the package

  Issue: aquasecurity#286
  ## Description
  This change allows packages to be fetched from repository other than https://repo.maven.apache.org/maven2/
  - Get username and password from settings file for the corresponding server ID mentioned in the pom file
  - Added support for authentication if username and password mentioned while fetching the package
@knqyf263 knqyf263 requested a review from DmitriyLewen January 31, 2024 16:05
Copy link
Collaborator

@DmitriyLewen DmitriyLewen left a comment

Choose a reason for hiding this comment

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

Hello @renypaul
Thanks for your work!

I left some comments.
Can you also added some tests for these changes?

Regards, Dmitriy

pkg/java/pom/settings.go Outdated Show resolved Hide resolved
pkg/java/pom/parse.go Outdated Show resolved Hide resolved
pkg/java/pom/parse.go Outdated Show resolved Hide resolved
  - Merging the servers with precedence to global settings.xml
  - Checking for releases and snapshots
  - Avoid pluginRepository for feteching dependend packages
  - Added test case
@renypaul renypaul requested a review from DmitriyLewen February 5, 2024 04:06
Copy link
Collaborator

@DmitriyLewen DmitriyLewen left a comment

Choose a reason for hiding this comment

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

I refactored a little.
@renypaul Can you take a look please?

pkg/java/pom/parse.go Show resolved Hide resolved
@renypaul renypaul requested a review from DmitriyLewen February 6, 2024 04:49
pkg/java/pom/settings_test.go Outdated Show resolved Hide resolved
pkg/java/pom/settings.go Show resolved Hide resolved
pkg/java/pom/settings.go Outdated Show resolved Hide resolved
renypaul and others added 3 commits February 6, 2024 15:29
Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>
Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>
Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>
@renypaul renypaul requested a review from DmitriyLewen February 6, 2024 10:03
Copy link
Collaborator

@DmitriyLewen DmitriyLewen left a comment

Choose a reason for hiding this comment

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

@renypaul Thanks a lot for your work!
I approved this PR.
@knqyf263 take a look and merge this, when you have time, please.

@renypaul
Copy link
Author

renypaul commented Feb 6, 2024

Thanks @DmitriyLewen for the careful review and suggestions

@renypaul
Copy link
Author

renypaul commented Feb 9, 2024

@knqyf263 Gentle reminder on merge. Also it will be helpful to know when we can expect trivy with this change. FYI @DmitriyLewen

@knqyf263
Copy link
Collaborator

knqyf263 commented Feb 9, 2024

Hopefully, I'll check it next week.

@renypaul
Copy link
Author

Hopefully, I'll check it next week.

Gentle reminder @knqyf263

@DmitriyLewen
Copy link
Collaborator

Hello @renypaul

We have moved go-dep-parser to Trivy - https://github.com/aquasecurity/trivy/tree/main/pkg/dependent/parser.

Do you have time to open a new PR for Trivy with these changes?
If not, tell me, I will do it.

@renypaul
Copy link
Author

Hello @renypaul

We have moved go-dep-parser to Trivy - https://github.com/aquasecurity/trivy/tree/main/pkg/dependent/parser.

Do you have time to open a new PR for Trivy with these changes? If not, tell me, I will do it.

Thanks @DmitriyLewen I have created a PR at https://github.com/aquasecurity/trivy/pull/6171/files . It will be great if this can be included in the next release. Please feel free to update the code if needed.

@DmitriyLewen
Copy link
Collaborator

go-dep-parser has been moved to Trivy.
aquasecurity/trivy#6171 was created for these changes.

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.

3 participants