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

Hosting request for harbor plugin #3604

Closed
identifysun opened this issue Nov 5, 2023 · 16 comments
Closed

Hosting request for harbor plugin #3604

identifysun opened this issue Nov 5, 2023 · 16 comments
Labels
bot-check-complete Automated hosting checks passed hosting-request Request to host a component in jenkinsci security-audit-done The hosting request code passed the security audit with success

Comments

@identifysun
Copy link
Contributor

identifysun commented Nov 5, 2023

Repository URL

https://github.com/identifysun/harbor-plugin

New Repository Name

harbor-plugin

Description

The Harbor Plugin enables integration between Jenkins and Harbor services. It provides the capability to synchronize and asynchronously wait for Harbor image scan results during Jenkins pipelines. The plugin ensures pipeline execution is interrupted if any security risks are detected, while allowing the pipeline to continue if the image passes the security scan.

GitHub users to have commit permission

@identifysun
@cumtzhangqijie

Jenkins project users to have release permission

cnhttpd

Issue tracker

GitHub issues

@identifysun identifysun added the hosting-request Request to host a component in jenkinsci label Nov 5, 2023
@jenkins-cert-app
Copy link
Collaborator

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 🎉.
  • /audit-skip => the audit is not necessary, the hosting can continue 🎉.
  • /audit-findings => the audit reveals some issues that require corrections ✏️.

Anyone:

  • /request-security-scan => the findings from the Jenkins Security Scan were corrected, this command will re-scan your repository 🔍.
  • /audit-review => the findings from the audit were corrected, this command will ping the security team to review the findings 👀. It's only applicable when the previous audit required changes.

Only one command can be requested per comment.

(automatically generated message, version: 1.26.17)

@jenkins-cert-app jenkins-cert-app added the security-audit-todo The security team needs to audit the hosting request code label Nov 5, 2023
Copy link

github-actions bot commented Nov 5, 2023

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

@github-actions github-actions bot added the bot-check-complete Automated hosting checks passed label Nov 5, 2023
@jenkins-cert-app
Copy link
Collaborator

The Jenkins Security Scan discovered 12 finding(s) 🔍.
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.


Stapler: Missing POST/RequirePOST annotation

You can find detailed information about this finding here.

HarborServer.java#104
Potential CSRF vulnerability: If DescriptorImpl#doFillWebhookSecretIdItems connects to user-specified URLs, modifies state, or is expensive to run, it should be annotated with @POST or @RequirePOST
HarborServer.java#94
Potential CSRF vulnerability: If DescriptorImpl#doCheckBaseUrl connects to user-specified URLs, modifies state, or is expensive to run, it should be annotated with @POST or @RequirePOST
WaitForHarborWebhookStep.java#139
Potential CSRF vulnerability: If DescriptorImpl#doFillSeverityItems connects to user-specified URLs, modifies state, or is expensive to run, it should be annotated with @POST or @RequirePOST
WaitForHarborWebhookStep.java#125
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
WaitForHarborWebhookStep.java#116
Potential CSRF vulnerability: If DescriptorImpl#doFillServerItems 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.

HarborWebHookAction.java#56
Potential missing permission check in HarborWebHookAction#doIndex
HarborServer.java#94
Potential missing permission check in DescriptorImpl#doCheckBaseUrl
WaitForHarborWebhookStep.java#139
Potential missing permission check in DescriptorImpl#doFillSeverityItems
WaitForHarborWebhookStep.java#116
Potential missing permission check in DescriptorImpl#doFillServerItems

Jenkins: Plaintext password storage

You can find detailed information about this finding here.

HarborInterceptor.java#12
Field should be reviewed whether it stores a password and is serialized to disk: credential
Artifact.java#42
Field should be reviewed whether it stores a password and is serialized to disk: accessories

Jenkins: Generally unsafe method calls

You can find detailed information about this finding here.

HarborClientImpl.java#64
Potentially unsafe invocation of SSLContext#init

@jenkins-cert-app jenkins-cert-app added security-audit-needs-correction The security audit revealed issues that must be corrected from the hosting request and removed security-audit-todo The security team needs to audit the hosting request code labels Nov 5, 2023
Copy link

github-actions bot commented Nov 5, 2023

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

@identifysun
Copy link
Contributor Author

/request-security-scan

@jenkins-cert-app jenkins-cert-app added security-audit-todo The security team needs to audit the hosting request code and removed security-audit-needs-correction The security audit revealed issues that must be corrected from the hosting request labels Nov 5, 2023
@jenkins-cert-app
Copy link
Collaborator

The Jenkins Security Scan discovered 7 finding(s) 🔍.
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.


Stapler: Missing permission check

You can find detailed information about this finding here.

HarborWebHookAction.java#56
Potential missing permission check in HarborWebHookAction#doIndex
HarborServer.java#95
Potential missing permission check in DescriptorImpl#doCheckBaseUrl
WaitForHarborWebhookStep.java#142
Potential missing permission check in DescriptorImpl#doFillSeverityItems
WaitForHarborWebhookStep.java#117
Potential missing permission check in DescriptorImpl#doFillServerItems

Jenkins: Plaintext password storage

You can find detailed information about this finding here.

HarborInterceptor.java#12
Field should be reviewed whether it stores a password and is serialized to disk: credential
Artifact.java#42
Field should be reviewed whether it stores a password and is serialized to disk: accessories

Jenkins: Generally unsafe method calls

You can find detailed information about this finding here.

HarborClientImpl.java#64
Potentially unsafe invocation of SSLContext#init

@jenkins-cert-app jenkins-cert-app added security-audit-needs-correction The security audit revealed issues that must be corrected from the hosting request and removed security-audit-todo The security team needs to audit the hosting request code labels Nov 5, 2023
@identifysun
Copy link
Contributor Author

/request-security-scan

@jenkins-cert-app jenkins-cert-app added security-audit-todo The security team needs to audit the hosting request code and removed security-audit-needs-correction The security audit revealed issues that must be corrected from the hosting request labels Nov 5, 2023
@jenkins-cert-app
Copy link
Collaborator

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


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

@jenkins-cert-app jenkins-cert-app added security-audit-done The hosting request code passed the security audit with success and removed security-audit-todo The security team needs to audit the hosting request code labels Nov 5, 2023
@NotMyFault
Copy link
Member

Hey @identifysun,

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

@identifysun
Copy link
Contributor Author

@NotMyFault

Thank you for your feedback.

I have fixed the issues you mentioned. Please help verify the changes.

Thank you!

@NotMyFault
Copy link
Member

/request-security-scan

@jenkins-cert-app jenkins-cert-app added security-audit-todo The security team needs to audit the hosting request code and removed security-audit-done The hosting request code passed the security audit with success labels Nov 11, 2023
@NotMyFault
Copy link
Member

/hosting re-check

Copy link

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
Copy link
Collaborator

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


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

@jenkins-cert-app jenkins-cert-app added security-audit-done The hosting request code passed the security audit with success and removed security-audit-todo The security team needs to audit the hosting request code labels Nov 11, 2023
@NotMyFault
Copy link
Member

/hosting host

@jenkins-infra-bot
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot-check-complete Automated hosting checks passed hosting-request Request to host a component in jenkinsci security-audit-done The hosting request code passed the security audit with success
Projects
None yet
Development

No branches or pull requests

4 participants