jenkins-infra / repository-permissions-updater

Artifactory permissions synchronization tool and data set
79 stars 1.05k forks source link

Request to host new JENKINS plugin #3828

Open OlegGavri opened 8 months ago

OlegGavri commented 8 months ago

Repository URL

https://github.com/OlegGavri/gparms

New Repository Name

global-pipeline-parameters-plugin

Description

This plugin allow any Pipeline Jobs store and read values common for all jobs. This values will be shared between all jobs in Jenkins Instance.

GitHub users to have commit permission

@reffum

Jenkins project users to have release permission

reffum

Issue tracker

Jira

github-actions[bot] commented 8 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 8 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)

jenkins-cert-app commented 8 months ago

:x: Jenkins Security Scan failed. The Security team was notified about this.

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

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

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

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

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

Wadeck commented 8 months ago

❌ Jenkins Security Scan failed. The Security team was notified about this.

=>

[2024-03-19 12:58:04] [build-stdout] [2024-03-19 12:58:04] [autobuild] [ERROR] Failed to execute goal org.jenkins-ci.tools:maven-hpi-plugin:3.51:hpi (default-hpi) on project gparams: Missing /tmp/tmp.a3B2uGcvUx/git-clone/target/classes/index.jelly. ~Delete any from pom.xml and~ create src/main/resources/index.jelly: [2024-03-19 12:58:04] [build-stdout] [2024-03-19 12:58:04] [autobuild] [ERROR] <?jelly escape-by-default='true'?> [2024-03-19 12:58:04] [build-stdout] [2024-03-19 12:58:04] [autobuild] [ERROR] \

[2024-03-19 12:58:04] [build-stdout] [2024-03-19 12:58:04] [autobuild] [ERROR] The description here… [2024-03-19 12:58:04] [build-stdout] [2024-03-19 12:58:04] [autobuild] [ERROR] \

In other words, the tooling expects you to have a src/main/resources/index.jelly with description about what your plugin is doing.

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

OlegGavri commented 8 months ago

/hosting re-check

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

OlegGavri commented 8 months ago

❌ Jenkins Security Scan failed. The Security team was notified about this.

=>

[2024-03-19 12:58:04] [build-stdout] [2024-03-19 12:58:04] [autobuild] [ERROR] Failed to execute goal org.jenkins-ci.tools:maven-hpi-plugin:3.51:hpi (default-hpi) on project gparams: Missing /tmp/tmp.a3B2uGcvUx/git-clone/target/classes/index.jelly. ~Delete any from pom.xml and~ create src/main/resources/index.jelly: [2024-03-19 12:58:04] [build-stdout] [2024-03-19 12:58:04] [autobuild] [ERROR] [2024-03-19 12:58:04] [build-stdout] [2024-03-19 12:58:04] [autobuild] [ERROR]

[2024-03-19 12:58:04] [build-stdout] [2024-03-19 12:58:04] [autobuild] [ERROR] The description here… [2024-03-19 12:58:04] [build-stdout] [2024-03-19 12:58:04] [autobuild] [ERROR]

In other words, the tooling expects you to have a src/main/resources/index.jelly with description about what your plugin is doing.

Fix it. Add index.jelly.

NotMyFault commented 8 months ago

The plugin's functionality is already covered by the parameterized trigger plugin and by using shared pipelines. The latter exists exactly for this reason.

OlegGavri commented 8 months ago

The plugin's functionality is already covered by the parameterized trigger plugin and by using shared pipelines. The latter exists exactly for this reason.

Hello! Thank you for answer. I know about this two possibilities. I also try to use it, but they did not suit in my case. parameterized trigger run other job, but I don't need that. I need some values shared between some independent jobs and available to read/write in any time from any jobs. Shared Pipelines seems to be better for this purpose. But I can't understand how I can write value at JENKINS Server machine when Job is running on other machine? To be precisely, in my case jobs is running on some virtual machins, but the shared value must be stored in a specific file on JENKINS Servier file with specific path. I can't understand how I make it with Shared Library. Thank you for answer.

daniel-beck commented 8 months ago

This looks more like https://plugins.jenkins.io/metadata/ than the others suggested above. It looks like it does something novel (AFAICT) and potentially useful.

https://github.com/OlegGavri/gparms/blob/7e93fa1d6b00c088a7bc934ed6214f87ea085487/src/main/java/io/jenkins/plugins/GParamsReadStep.java#L71-L75 seems to implement path traversal (let name be ../config.xml), and makes the lookup path dependent on the working directory. It should involve the Jenkins home directory in the path, and require alphanumeric name up to a max length.

OlegGavri commented 8 months ago

This looks more like https://plugins.jenkins.io/metadata/ than the others suggested above. It looks like it does something novel (AFAICT) and potentially useful.

https://github.com/OlegGavri/gparms/blob/7e93fa1d6b00c088a7bc934ed6214f87ea085487/src/main/java/io/jenkins/plugins/GParamsReadStep.java#L71-L75 seems to implement path traversal (let name be ../config.xml), and makes the lookup path dependent on the working directory. It should involve the Jenkins home directory in the path, and require alphanumeric name up to a max length.

Thank you very much for your answer and for bug finding. I fix it. Metadata is seem to be more appropriate. But in my case value should be "global", not associated with Jobs, project and build etc. And gparams is very easy to use.

daniel-beck commented 8 months ago

Metadata is seem to be more appropriate. But in my case value should be "global", not associated with Jobs, project and build etc. And gparams is very easy to use.

To clarify, I'm not discouraging hosting of this plugin, just providing what I think is a better comparison. Metadata does something different, so there's a place for this plugin IMO.

OlegGavri commented 8 months ago

https://github.com/OlegGavri/gparms/blob/7e93fa1d6b00c088a7bc934ed6214f87ea085487/src/main/java/io/jenkins/plugins/GParamsReadStep.java#L71-L75 seems to implement path traversal (let name be ../config.xml), and makes the lookup path dependent on the working directory. It should involve the Jenkins home directory in the path, and require alphanumeric name up to a max length.

I have fixed this path traversal vulnerability

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

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

OlegGavri commented 8 months ago

/hosting re-check

daniel-beck commented 8 months ago

I have fixed this path traversal vulnerability

Thanks. I recommend validation be done during execution. While I expect the constructor cannot be bypassed for a Pipeline step, I am not confident about that.

https://github.com/OlegGavri/gparms/blob/8a5af9e9ee2742150840e8215bf1392c2ffee25c/src/main/java/io/jenkins/plugins/Parameters.java#L7 is wrong as there may not be a system property, use Jenkins#getRootDir instead.

OlegGavri commented 7 months ago

I have fixed this path traversal vulnerability

Thanks. I recommend validation be done during execution. While I expect the constructor cannot be bypassed for a Pipeline step, I am not confident about that.

https://github.com/OlegGavri/gparms/blob/8a5af9e9ee2742150840e8215bf1392c2ffee25c/src/main/java/io/jenkins/plugins/Parameters.java#L7 is wrong as there may not be a system property, use Jenkins#getRootDir instead.

Thanks. I fix your recommendations.

OlegGavri commented 7 months ago

/hosting re-check

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

NotMyFault 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

Hey, I took a brief look at your hosting request and have some feedback for you:

OlegGavri commented 5 months ago

NotMyFault, Thank you very much for your notes. I try to fix everything and push to master bracnh.

OlegGavri commented 5 months ago

/hosting re-check

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

OlegGavri commented 5 months ago

/hosting re-check

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

NotMyFault commented 3 months ago

/hosting re-check

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

NotMyFault commented 3 months ago

/request-security-scan

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

OlegGavri commented 1 month ago

/hosting re-check

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

OlegGavri commented 1 month ago

/request-security-scan

Thank you. I wait for you decide.

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

OlegGavri commented 1 month ago

/hosting host