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

JFrog CLI allows only one repository to be specified for resolving artifacts #2912

Open
luigidematteis opened this issue Feb 25, 2025 · 1 comment
Labels
question Further information is requested

Comments

@luigidematteis
Copy link

luigidematteis commented Feb 25, 2025

Hi,
I'd like to describe a technical challenge that we are facing in order to implement JFrog Xray scan steps into the CI/CD process of our customer.

We have 1000+ projects, i.e. thousands of repositories, and JFrog Artifactory is integrated with our customer LDAP system, in such a way that if a user has permissions to access repositories A, B, and C, he can run a pipeline and build an application that uses artifacts from those repositories.

Now we're integrating JFrog Xray as a security scan tool, but we've found a limitation that is seriously compromising its integration in our customer infrastructure, because the jf-cli allows only one repository to be specified to resolve artifacts.

To explain better the issue we're facing, I'll take as example only one specific tool (Maven) for simplicity, but it applies also to any other tool that we have to cover in our CI/CD process.

https://docs.jfrog-applications.jfrog.io/ci-and-sdks/ci-integrations/jenkins-jfrog-plugin

jf mvn-config --repo-resolve-releases libs-release --repo-resolve-snapshots libs-snapshots --repo-deploy-releases libs-release-local --repo-deploy-snapshots libs-snapshot-local

The flags --repo-resolve-releases, --repo-resolve-snapshots, etc. de-facto override the repositories configuration specified in settings.xml that Maven uses to configure the application.

It means that without using the jf-cli a User that has permissions to access repositories A, B, C, as previously said, will be able to build the application in pipeline, while using the jf-cli this will not possible anymore.

The solution proposed by the support and by somebody from your team in other threads is to create virtual repositories that include the required repositories (for example, in this case they would be: A, B, and C), but this is not feasible as it would require to dynamically create virtual repositories for each user/application that requires artifacts from different projects.

In addition, this mechanism would required a lot of maintenance costs, as dependencies for an application can change, i.e. the virtual repositories should be constantly maintained, which means updated or removed.

Looking at the jf-cli code, it seems to be a design choice to accept only one repository for resolving artifacts. What are the reasons behind it? Why not allowing to specify multiple repositories to resolve artifacts?

@luigidematteis luigidematteis added the question Further information is requested label Feb 25, 2025
@shuvadipc shuvadipc transferred this issue from jfrog/jfrog-cli Feb 27, 2025
@shuvadipc shuvadipc transferred this issue from jfrog/jfrog-cli-security Mar 6, 2025
@luigidematteis
Copy link
Author

luigidematteis commented Mar 6, 2025

I'd like to add one more detail about this issue, which is that to build the artifact using the jf-cli (instead of just scanning it) is required in order to have a complete SBOM also for non-Uber JARs, or essentially for any type of artifact that doesn't directly contains all the dependencies inside.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant