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

Indusface WAS CICD plugin publish #4187

Open
productteam-was opened this issue Nov 22, 2024 · 34 comments
Open

Indusface WAS CICD plugin publish #4187

productteam-was opened this issue Nov 22, 2024 · 34 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

@productteam-was
Copy link

productteam-was commented Nov 22, 2024

Repository URL

https://github.com/productteam-was/indusface-was-scan

New Repository Name

indusface-was-plugin

Description

  1. A DAST Scanner Plugin for Automated Security Testing: This plugin integrates seamlessly into the Jenkins Pipeline interface, allowing for automated security/DAST scanning within CI/CD workflows.
  2. Streamlined Security Integration: Incorporating security checks early in the development lifecycle, it helps identify vulnerabilities before they reach production, ensuring faster and safer releases.
  3. Enhanced CI/CD Security: Indusface WAS plugin enables early detection and mitigation of security vulnerabilities through automated DAST scans within the development process.
  • Automatically triggers security scans during the build process.
  • Retrieves and displays scan results.
  • Fails builds based on predefined security thresholds.
    -If your plugin provides a more user-friendly interface or simplified configuration process.

GitHub users to have commit permission

@productteam-was
@techieabhishekakash

Jenkins project users to have release permission

indusface_jenkins_plugin

Issue tracker

Jira

@productteam-was productteam-was added the hosting-request Request to host a component in jenkinsci label Nov 22, 2024
@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.31.74)

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

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.

  • ⛔ Required: The following usernames in 'Jenkins project users to have release permission' need to log into Jira: @indusface_jenkins_plugin (reports are re-synced hourly, wait to re-check for a bit after logging in)
  • ⛔ Required: The following usernames in 'Jenkins project users to have release permission' need to log into Artifactory: @indusface_jenkins_plugin (reports are re-synced hourly, wait to re-check for a bit after logging in)
  • ⛔ Required: The following usernames in 'GitHub Users to Authorize as Committers' are not valid GitHub usernames or are Organizations: AzureAD\GamyaSriyaSomalaraju
  • ⛔ Required: The dependency org.json:json should be replaced with a dependency to the api plugin io.jenkins.plugins:json-api
  • ⛔ Required: The dependency com.google.code.gson:gson should be replaced with a dependency to the api plugin io.jenkins.plugins:gson-api

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

@jenkins-cert-app
Copy link
Collaborator

The Jenkins Security Scan discovered 2 finding(s) 🔍.

For every identified issue, please do one of the following:

  • Implement the recommended fix to address the issue.
  • If you think it's a false positive, suppress the warning directly within the code.
  • Alternative, you write an explanation here about why you think it's irrelevant. That will require a manual review, leading to a slower process.

After addressing the findings through one of the above methods:

  • If all modifications have been made to the code, please initiate a new security scan by triggering the /request-security-scan command.
  • If there are any unresolved findings (those not corrected or suppressed), request a review from the Jenkins security team by using the /audit-review command.

Jenkins: Plaintext password storage

You can find detailed information about this finding here.

SamplePostBuildAction.java#29
Field should be reviewed whether it stores a password and is serialized to disk: accessKey
ScanAndBuildStatus.java#7
Field should be reviewed whether it stores a password and is serialized to disk: secretKey

@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 22, 2024
@productteam-was
Copy link
Author

/hosting re-check

@productteam-was
Copy link
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 26, 2024
@jenkins-cert-app
Copy link
Collaborator

The Jenkins Security Scan discovered 2 finding(s) 🔍.

For every identified issue, please do one of the following:

  • Implement the recommended fix to address the issue.
  • If you think it's a false positive, suppress the warning directly within the code.
  • Alternative, you write an explanation here about why you think it's irrelevant. That will require a manual review, leading to a slower process.

After addressing the findings through one of the above methods:

  • If all modifications have been made to the code, please initiate a new security scan by triggering the /request-security-scan command.
  • If there are any unresolved findings (those not corrected or suppressed), request a review from the Jenkins security team by using the /audit-review command.

Jenkins: Plaintext password storage

You can find detailed information about this finding here.

SamplePostBuildAction.java#29
Field should be reviewed whether it stores a password and is serialized to disk: accessKey
ScanAndBuildStatus.java#7
Field should be reviewed whether it stores a password and is serialized to disk: secretKey

@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 26, 2024
@productteam-was
Copy link
Author

productteam-was commented Nov 26, 2024

/audit-review

I have changed the field type to text , so it is not required to store as a password

@jenkins-cert-app jenkins-cert-app added security-audit-correction-review The hosting request code was adjusted, a new security review must be done and removed security-audit-needs-correction The security audit revealed issues that must be corrected from the hosting request labels Nov 26, 2024
@Wadeck
Copy link
Collaborator

Wadeck commented Nov 27, 2024

/audit-findings

I have changed the field type to text , so it is not required to store as a password

The presence of that field in an object that is stored on disk is sufficient to have the confidential information stored in plain text. You have to use a Secret to store it securely.

@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-correction-review The hosting request code was adjusted, a new security review must be done labels Nov 27, 2024
@productteam-was
Copy link
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 Dec 1, 2024
@jenkins-cert-app
Copy link
Collaborator

The Jenkins Security Scan discovered 1 finding(s) 🔍.

For every identified issue, please do one of the following:

  • Implement the recommended fix to address the issue.
  • If you think it's a false positive, suppress the warning directly within the code.
  • Alternative, you write an explanation here about why you think it's irrelevant. That will require a manual review, leading to a slower process.

After addressing the findings through one of the above methods:

  • If all modifications have been made to the code, please initiate a new security scan by triggering the /request-security-scan command.
  • If there are any unresolved findings (those not corrected or suppressed), request a review from the Jenkins security team by using the /audit-review command.

Jenkins: Plaintext password storage

You can find detailed information about this finding here.

ScanAndBuildStatus.java#7
Field should be reviewed whether it stores a password and is serialized to disk: secretKey

@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 Dec 1, 2024
@productteam-was
Copy link
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 Dec 1, 2024
@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 Dec 1, 2024
@productteam-was
Copy link
Author

/hosting re-check

Copy link

github-actions bot commented Dec 1, 2024

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

@productteam-was
Copy link
Author

/hosting re-check

Copy link

github-actions bot commented Dec 2, 2024

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

@productteam-was
Copy link
Author

/hosting re-check

Copy link

github-actions bot commented Dec 2, 2024

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.

  • ⛔ Required: The following usernames in 'Jenkins project users to have release permission' need to log into Jira: @indusface_jenkins_plugin (reports are re-synced hourly, wait to re-check for a bit after logging in)
  • ⛔ Required: The following usernames in 'Jenkins project users to have release permission' need to log into Artifactory: @indusface_jenkins_plugin (reports are re-synced hourly, wait to re-check for a bit after logging in)

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

@productteam-was
Copy link
Author

/hosting re-check

Copy link

github-actions bot commented Dec 2, 2024

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.

  • ⛔ Required: The following usernames in 'Jenkins project users to have release permission' need to log into Jira: @indusface_jenkins_plugin (reports are re-synced hourly, wait to re-check for a bit after logging in)
  • ⛔ Required: The following usernames in 'Jenkins project users to have release permission' need to log into Artifactory: @indusface_jenkins_plugin (reports are re-synced hourly, wait to re-check for a bit after logging in)

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

@productteam-was
Copy link
Author

/hosting re-check

Copy link

github-actions bot commented Dec 2, 2024

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.

  • ⛔ Required: The following usernames in 'Jenkins project users to have release permission' need to log into Jira: @indusface_jenkins_plugin (reports are re-synced hourly, wait to re-check for a bit after logging in)
  • ⛔ Required: The following usernames in 'Jenkins project users to have release permission' need to log into Artifactory: @indusface_jenkins_plugin (reports are re-synced hourly, wait to re-check for a bit after logging in)

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

@productteam-was
Copy link
Author

/hosting re-check

Copy link

github-actions bot commented Dec 2, 2024

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.

  • ⛔ Required: The following usernames in 'Jenkins project users to have release permission' need to log into Jira: @indusface_jenkins_plugin (reports are re-synced hourly, wait to re-check for a bit after logging in)
  • ⛔ Required: The following usernames in 'Jenkins project users to have release permission' need to log into Artifactory: @indusface_jenkins_plugin (reports are re-synced hourly, wait to re-check for a bit after logging in)

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

@productteam-was
Copy link
Author

Hi ,

I have logged into Jira and Artifactory multiple time and waited for more than an hour as mentioned in Required comments but i still see the validation is failing could you please help us with this.

Copy link

github-actions bot commented Dec 2, 2024

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 bot-check-complete Automated hosting checks passed and removed needs-fix labels Dec 2, 2024
@daniel-beck
Copy link
Contributor

@daniel-beck
Copy link
Contributor

daniel-beck commented Dec 2, 2024

This needs to be changed or justified:
https://github.com/productteam-was/indusface-was-scan/blob/952a7f3c3ab60bce3a03b5ac69b6798fa9a9142b/src/main/java/com/indusface/plugins/wasscan/SamplePostBuildAction.java#L101 looks like a bad idea, why log credentials to the build log?

This is other optional feedback:
https://github.com/productteam-was/indusface-was-scan/blob/952a7f3c3ab60bce3a03b5ac69b6798fa9a9142b/src/main/java/com/indusface/plugins/wasscan/SamplePostBuildAction.java#L97 is likely not going to be popular among users. If you can't run your build status in parallel, change getRequiredMonitorService.

https://github.com/productteam-was/indusface-was-scan/blob/952a7f3c3ab60bce3a03b5ac69b6798fa9a9142b/src/main/java/com/indusface/plugins/report/ReportAction.java#L71 looks like it will break past reports if the access credentials ever change.

https://github.com/productteam-was/indusface-was-scan/blob/952a7f3c3ab60bce3a03b5ac69b6798fa9a9142b/src/main/java/com/indusface/plugins/wasscan/SamplePostBuildAction.java#L40-L41 should have Secret as argument type so it doesn't constantly get re-encrypted, changing the job config contents on every form submission.

@productteam-was
Copy link
Author

productteam-was commented Dec 2, 2024

Maybe this log will help us verify. I have made the required changes, and we are good with the other changes. Please help us to proceed next steps .Please help us with the next steps for hosting .

@productteam-was
Copy link
Author

@daniel-beck, please review this and let us know if any modifications are needed.

@productteam-was
Copy link
Author

/hosting host

@alecharp
Copy link
Contributor

alecharp commented Dec 3, 2024

The hosting process can only concluded by someone in the team. We will review your request and let you know the next steps.

@alecharp
Copy link
Contributor

alecharp commented Dec 3, 2024

It seems that you did release the plugin once, however, https://github.com/productteam-was/indusface-was-scan/blob/5eba1656475e510cb62510bff39732a3192d9d31/pom.xml#L29 should now be HEAD.

Per https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/, https://github.com/productteam-was/indusface-was-scan/blob/5eba1656475e510cb62510bff39732a3192d9d31/pom.xml#L39 is outdated. Please select a newer core version or let us know why you select this older one. If you update the core version, make sure to update https://github.com/productteam-was/indusface-was-scan/blob/5eba1656475e510cb62510bff39732a3192d9d31/pom.xml#L51-L52 accordingly.

Is there a reason why the class here is call SamplePostBuildAction? As this class holds configuration, it means that job config file will have a reference to its name. Having the Sample prefix might be confusing to users.

It would be great to have a more descriptive text in place of https://github.com/productteam-was/indusface-was-scan/blob/5eba1656475e510cb62510bff39732a3192d9d31/src/main/resources/index.jelly#L3. This text will be visible to users in the Plugin Manager or their instance. This could help them understand the usecase the plugin is serving.

To include the CSS for the report visualisation, please use st:adjunct rather than link in https://github.com/productteam-was/indusface-was-scan/blob/5eba1656475e510cb62510bff39732a3192d9d31/src/main/resources/com/indusface/plugins/report/ReportAction/index.jelly#L4. See https://www.jenkins.io/doc/developer/views/exposing-bundled-resources/#adjuncts

@alecharp
Copy link
Contributor

alecharp commented Dec 3, 2024

I also notice that you include some plugins within the test scope in your project configuration. However, there is no test included in the repository.

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

5 participants