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

Enable Jenkins Security Scan #180

Merged
merged 1 commit into from
Jul 3, 2024
Merged

Enable Jenkins Security Scan #180

merged 1 commit into from
Jul 3, 2024

Conversation

strangelookingnerd
Copy link
Contributor

It is stated in the JENKINS SECURITY POLICY that

The Jenkins project takes security seriously. We make every possible effort to ensure users can adequately secure their automation infrastructure. To that end, we work with Jenkins core and plugin developers, as well as security researchers, to fix security vulnerabilities in Jenkins in a timely manner, and to improve the security of Jenkins in general.

We as plugin developers should try our best to support this. One way of doing so is to enable the Jenkins Security Scan on this repository. For more details see the documentation.

This PR may create new issues in the Code scanning section of this project once it is merged. I'd be happy to try and help resolve those if necessary.

Please note this PR was created semi-automatically. If you find any issue with it, don't hesitate to ping me.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@uhafner uhafner added the internal Internal changes without user or API impact label Jun 26, 2024
@uhafner
Copy link
Member

uhafner commented Jun 26, 2024

How can I disable the rule 'Stapler: Missing permission check'? It creates false positives in all my projects.

https://github.com/jenkinsci/coverage-plugin/security/code-scanning/59

@strangelookingnerd
Copy link
Contributor Author

strangelookingnerd commented Jun 26, 2024

How can I disable the rule 'Stapler: Missing permission check'? It creates false positives in all my projects.

https://github.com/jenkinsci/coverage-plugin/security/code-scanning/59

To inline disable rules you can annotate with

@SuppressWarnings("codeql[jenkins/no-permission-check]")

or

@SuppressWarnings("lgtm[jenkins/no-permission-check]")

Alternatively you could provide a custom configuration for codeql to globally disable the rule - however I have never tried that myself. May need some trial & error.

It may be also a chance to try to get rid of the false-positive by refining the rule defined in https://github.com/jenkins-infra/jenkins-codeql - unfortunately I'm unable to check the link you provided to see what's actually being wrong / false-positve.

@uhafner uhafner added tests Enhancement of tests and removed internal Internal changes without user or API impact labels Jul 2, 2024
@uhafner uhafner marked this pull request as draft July 2, 2024 07:46
@uhafner
Copy link
Member

uhafner commented Jul 2, 2024

Blocked by jenkins-infra/jenkins-codeql#43

@uhafner uhafner marked this pull request as ready for review July 3, 2024 08:19
@uhafner uhafner merged commit 20e8a22 into jenkinsci:main Jul 3, 2024
31 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Enhancement of tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants