jenkins-infra / repository-permissions-updater

Artifactory permissions synchronization tool and data set
78 stars 1.04k forks source link

artifactory-artifact-manager-plugin #3822

Closed jonesbusy closed 7 months ago

jonesbusy commented 7 months ago

Repository URL

https://github.com/jonesbusy/artifactory-artifact-manager-plugin

New Repository Name

artifactory-artifact-manager-plugin

Description

Hi,

This is basically an Artifact Manager implementation for Artifactory OSS and Artifactory Pro (It's similar to https://plugins.jenkins.io/artifact-manager-s3/ and https://plugins.jenkins.io/azure-artifact-manager/) but for JFrog artifactory

I allow to store artifact and stash into a generic repository of Artifactory.

Use case is mostly for on-premises deployment that don't have access to cloud service (or don't want to deploy an internal Minio instance). Or because Artifactory is already fully setup for large scale deployment (permission, chargeback, backup etc...)

Internally it used https://github.com/jfrog/artifactory-client-java which uses Apache 2.0 license

I'm currently finalizing the plugin (probably will be finalized during KubeCon), but I would like to start the hosting process already in case there is some changes to be done (I still need to test with Artifactory Pro which I don't have access for now). But basically expect "move" methods the plugin is working already.

GitHub users to have commit permission

@jonesbusy

Jenkins project users to have release permission

jonesbusy

Issue tracker

GitHub issues

github-actions[bot] commented 7 months ago

Hello from your friendly Jenkins Hosting Checker

It appears you have some issues with your hosting request. Please see the list below and correct all issues marked Required. Your hosting request will not be approved until these issues are corrected. Issues marked with Warning or Info are just recommendations and will not stall the hosting process.

You can re-trigger a check by editing your hosting request or by commenting /hosting re-check

jenkins-cert-app commented 7 months ago

Security audit, information and commands

The security team is auditing all the hosting requests, to ensure a better security by default.

This message informs you that a Jenkins Security Scan was triggered on your repository. It takes ~10 minutes to complete.

Commands The bot will parse all comments, and it will check if any line start with a command. Security team only:
  • /audit-ok => the audit is complete, the hosting can continue :tada:.
  • /audit-skip => the audit is not necessary, the hosting can continue :tada:.
  • /audit-findings => the audit reveals some issues that require corrections :pencil2:.
Anyone:
  • /request-security-scan => the findings from the Jenkins Security Scan were corrected, this command will re-scan your repository :mag:.
  • /audit-review => the findings from the audit were corrected, this command will ping the security team to review the findings :eyes:. It's only applicable when the previous audit required changes.
Only one command can be requested per comment.

(automatically generated message, version: 1.28.0)

jonesbusy commented 7 months ago

/hosting re-check

jenkins-cert-app commented 7 months ago

The Jenkins Security Scan discovered 8 finding(s) :mag:.

Please follow the instructions below for every identified issues:

After addressing the findings through one of the above methods:


Stapler: Missing POST/RequirePOST annotation

You can find detailed information about this finding here.

ArtifactoryGenericArtifactConfig.java#158 ``` Potential CSRF vulnerability: If DescriptorImpl#doCheckServerUrl connects to user-specified URLs, modifies state, or is expensive to run, it should be annotated with @POST or @RequirePOST ```
ArtifactoryGenericArtifactConfig.java#149 ``` Potential CSRF vulnerability: If DescriptorImpl#doCheckRepository connects to user-specified URLs, modifies state, or is expensive to run, it should be annotated with @POST or @RequirePOST ```
ArtifactoryGenericArtifactConfig.java#137 ``` Potential CSRF vulnerability: If DescriptorImpl#doCheckPrefix connects to user-specified URLs, modifies state, or is expensive to run, it should be annotated with @POST or @RequirePOST ```
ArtifactoryGenericArtifactConfig.java#116 ``` Potential CSRF vulnerability: If DescriptorImpl#doFillStorageCredentialIdItems connects to user-specified URLs, modifies state, or is expensive to run, it should be annotated with @POST or @RequirePOST ```

Stapler: Missing permission check

You can find detailed information about this finding here.

ArtifactoryGenericArtifactConfig.java#158 ``` Potential missing permission check in DescriptorImpl#doCheckServerUrl ```
ArtifactoryGenericArtifactConfig.java#149 ``` Potential missing permission check in DescriptorImpl#doCheckRepository ```
ArtifactoryGenericArtifactConfig.java#137 ``` Potential missing permission check in DescriptorImpl#doCheckPrefix ```

Jenkins: Plaintext password storage

You can find detailed information about this finding here.

ArtifactoryVirtualFile.java#24 ``` Field should be reviewed whether it stores a password and is serialized to disk: key ```
github-actions[bot] commented 7 months ago

Hello from your friendly Jenkins Hosting Checker

It looks like you have everything in order for your hosting request. A member of the Jenkins hosting team will check over things that I am not able to check(code review, README content, etc) and process the request as quickly as possible. Thank you for your patience.

Hosting team members can host this request with /hosting host

jonesbusy commented 7 months ago

/request-security-scan

jenkins-cert-app commented 7 months ago

The Jenkins Security Scan did not find anything dangerous with your plugin, congratulations! :tada:


:bulb: The Security team recommends that you are setting up the scan in your repository by following our guide.

NotMyFault commented 7 months ago

I'd proceed with the hosting process, the plugin looks well in its current shape.

NotMyFault commented 7 months ago

/hosting host

jenkins-infra-bot commented 7 months ago

Hosting request complete, the code has been forked into the jenkinsci project on GitHub as https://github.com/jenkinsci/artifactory-artifact-manager-plugin

GitHub issues has been selected for issue tracking and was enabled for the forked repo.

A pull request has been created against the repository permissions updater to setup release permissions. Additional users can be added by modifying the created file.

Please delete your original repository (if there are no other forks), under 'Danger Zone', so that the jenkinsci organization repository is the definitive source for the code. If there are other forks, please contact GitHub support to make the jenkinsci repo the root of the fork network (mention that Jenkins approval was given in support request 569994). Also, please make sure you properly follow the documentation on documenting your plugin so that your plugin is correctly documented.

You will also need to do the following in order to push changes and release your plugin:

Welcome aboard!