jenkins-infra / repository-permissions-updater

Artifactory permissions synchronization tool and data set
77 stars 1.03k forks source link

Loadmance Plugin #3347

Closed aktoluna closed 1 year ago

aktoluna commented 1 year ago

Repository URL

https://github.com/virgosol/loadmance-plugin

New Repository Name

loadmance-plugin

Description

We would like to publish the plugin I wrote for our Loadmance product.

GitHub users to have commit permission

@aktoluna

Jenkins project users to have release permission

aktoluna

Issue tracker

GitHub issues

jenkins-cert-app commented 1 year 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](https://www.jenkins.io/doc/developer/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.17.22)

github-actions[bot] commented 1 year 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

aktoluna commented 1 year ago

/hosting re-check

jenkins-cert-app commented 1 year ago

The Jenkins Security Scan discovered 14 finding(s) :mag:. For each of them, either apply the recommended correction, suppress the warning or provide a justification.

Once you're done, either re-run the scan with /request-security-scan or request the Security team to review your justifications with /audit-review.


Remoting: Unsafe Callable

You can find detailed information about this finding here.

LoadmanceBuild.java#80 ``` Potentially unsafe Callable implementation LoadmanceBuild#checkRoles ```

Jenkins: Missing permission check on a form fill web method with credentials lookup

You can find detailed information about this finding here.

LoadmanceBuilder.java#189 ``` doFillTestIdItems should perform a permission check before calling #lookupCredentials ```
LoadmanceBuilder.java#161 ``` doFillProjectIdItems should perform a permission check before calling #lookupCredentials ```
LoadmanceBuilder.java#146 ``` doFillCredentialsIdItems should perform a permission check before calling #lookupCredentials ```

Stapler: Missing POST/RequirePOST annotation

You can find detailed information about this finding here.

LoadmanceBuilder.java#189 ``` Potential CSRF vulnerability: If DescriptorImpl#doFillTestIdItems connects to user-specified URLs, modifies state, or is expensive to run, it should be annotated with @POST or @RequirePOST ```
LoadmanceBuilder.java#161 ``` Potential CSRF vulnerability: If DescriptorImpl#doFillProjectIdItems connects to user-specified URLs, modifies state, or is expensive to run, it should be annotated with @POST or @RequirePOST ```
LoadmanceBuilder.java#146 ``` Potential CSRF vulnerability: If DescriptorImpl#doFillCredentialsIdItems connects to user-specified URLs, modifies state, or is expensive to run, it should be annotated with @POST or @RequirePOST ```
LoadmanceCredentials.java#50 ``` Potential CSRF vulnerability: If DescriptorImpl#doTestConnection 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.

LoadmanceBuilder.java#189 ``` Potential missing permission check in DescriptorImpl#doFillTestIdItems ```
LoadmanceBuilder.java#161 ``` Potential missing permission check in DescriptorImpl#doFillProjectIdItems ```
LoadmanceBuilder.java#146 ``` Potential missing permission check in DescriptorImpl#doFillCredentialsIdItems ```
LoadmanceCredentials.java#50 ``` Potential missing permission check in DescriptorImpl#doTestConnection ```

Jenkins: Plaintext password storage

You can find detailed information about this finding here.

AuthRequestDto.java#5 ``` Field should be reviewed whether it stores a password and is serialized to disk: password ```
LoginResponseDto.java#5 ``` Field should be reviewed whether it stores a password and is serialized to disk: token ```
github-actions[bot] commented 1 year 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

aktoluna commented 1 year ago

/hosting re-check

github-actions[bot] commented 1 year 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

aktoluna commented 1 year ago

/hosting re-check

github-actions[bot] commented 1 year 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

NotMyFault commented 1 year ago

Hey @aktoluna,

I took a look over your hosting request and have some feedback for you:

mawinter69 commented 1 year ago
aktoluna commented 1 year ago

/hosting re-check

github-actions[bot] commented 1 year 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

github-actions[bot] commented 1 year 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

aktoluna commented 1 year ago

/hosting host

mawinter69 commented 1 year ago
mawinter69 commented 1 year ago
aktoluna commented 1 year ago

Hi,

https://github.com/virgosol/loadmance-plugin/blob/7311067d233b7ce79f9562242a5031b3567575c0/src/main/java/io/jenkins/plugins/loadmance/LoadmanceBuilder.java#L77 this should override perform(Run, ...) otherwise you're still not able to use it in a pipeline (pipelines do not inherit from AbstractBuild or Build)

I did this but I don't know if it's right. Do you have a chance to share an example?

aktoluna commented 1 year ago

/hosting host

mawinter69 commented 1 year ago

looks good I would say. Try out if it works in a pipeline

aktoluna commented 1 year ago

Ok, thank you:) I will try

aktoluna commented 1 year ago

/hosting re-check

github-actions[bot] commented 1 year 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

aktoluna commented 1 year ago

/hosting host

NotMyFault commented 1 year ago

/request-security-scan

NotMyFault commented 1 year ago

/hosting re-check

github-actions[bot] commented 1 year 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

jenkins-cert-app commented 1 year ago

The Jenkins Security Scan discovered 8 finding(s) :mag:. For each of them, either apply the recommended correction, suppress the warning or provide a justification.

Once you're done, either re-run the scan with /request-security-scan or request the Security team to review your justifications with /audit-review.


Jenkins: Missing permission check on a form fill web method with credentials lookup

You can find detailed information about this finding here.

LoadmanceBuilder.java#211 ``` doFillTestIdItems should perform a permission check before calling #lookupCredentials ```
LoadmanceBuilder.java#182 ``` doFillProjectIdItems should perform a permission check before calling #lookupCredentials ```
LoadmanceBuilder.java#166 ``` doFillCredentialsIdItems should perform a permission check before calling #lookupCredentials ```

Stapler: Missing permission check

You can find detailed information about this finding here.

LoadmanceBuilder.java#211 ``` Potential missing permission check in DescriptorImpl#doFillTestIdItems ```
LoadmanceBuilder.java#182 ``` Potential missing permission check in DescriptorImpl#doFillProjectIdItems ```
LoadmanceBuilder.java#166 ``` Potential missing permission check in DescriptorImpl#doFillCredentialsIdItems ```
LoadmanceCredentials.java#52 ``` Potential missing permission check in DescriptorImpl#doTestConnection ```

Jenkins: Plaintext password storage

You can find detailed information about this finding here.

LoginResponseDto.java#5 ``` Field should be reviewed whether it stores a password and is serialized to disk: token ```
aktoluna commented 1 year ago

/request-security-scan

aktoluna commented 1 year ago

/hosting re-check

github-actions[bot] commented 1 year 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

aktoluna commented 1 year ago

/hosting host

jenkins-cert-app commented 1 year ago

The Jenkins Security Scan discovered 6 finding(s) :mag:. For each of them, either apply the recommended correction, suppress the warning or provide a justification.

Once you're done, either re-run the scan with /request-security-scan or request the Security team to review your justifications with /audit-review.


Jenkins: Missing permission check on a form fill web method with credentials lookup

You can find detailed information about this finding here.

LoadmanceBuilder.java#219 ``` doFillTestIdItems should perform a permission check before calling #lookupCredentials ```
LoadmanceBuilder.java#183 ``` doFillProjectIdItems should perform a permission check before calling #lookupCredentials ```
LoadmanceBuilder.java#164 ``` doFillCredentialsIdItems should perform a permission check before calling #lookupCredentials ```

Stapler: Missing permission check

You can find detailed information about this finding here.

LoadmanceBuilder.java#219 ``` Potential missing permission check in DescriptorImpl#doFillTestIdItems ```
LoadmanceBuilder.java#183 ``` Potential missing permission check in DescriptorImpl#doFillProjectIdItems ```
LoadmanceBuilder.java#164 ``` Potential missing permission check in DescriptorImpl#doFillCredentialsIdItems ```
aktoluna commented 1 year ago

/request-security-scan

jenkins-cert-app commented 1 year 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.

aktoluna commented 1 year ago

/hosting host

NotMyFault commented 1 year ago

Thanks for addressing the feedback @aktoluna, and thanks @mawinter69 for reviewing. Do you want to take another look?

aktoluna commented 1 year ago

Thank you @NotMyFault . Everything seems appropriate for me.

mawinter69 commented 1 year ago

the bom version is a bit old but other than that it looks good

NotMyFault commented 1 year ago

the bom version is a bit old but other than that it looks good

Dependabot will pick that up, now worries.

NotMyFault commented 1 year ago

/hosting host

jenkins-infra-bot commented 1 year ago

Hosting request complete, the code has been forked into the jenkinsci project on GitHub as https://github.com/jenkinsci/loadmance-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:

In order for your plugin to be built by the Jenkins CI Infrastructure and check pull requests, please add a Jenkinsfile to the root of your repository with the following content: https://github.com/jenkinsci/archetypes/blob/master/common-files/Jenkinsfile

Welcome aboard!