[Security-771] Fixed and improved smoke test logic and implementation for About Jenkins page access.#11120
[Security-771] Fixed and improved smoke test logic and implementation for About Jenkins page access.#11120A1exKH wants to merge 67 commits intojenkinsci:masterfrom
Conversation
…ption and reduce repeated code.
…urces to ensure proper resource cleanup for WebClient.
|
Yay, your first pull request towards Jenkins core was created successfully! Thank you so much! |
|
I wasn't able to add the following labels: test Check that the label exists and is spelt right then try again. |
|
@jglick , @timja , @NotMyFault Thanks in advance for your feedback! |
|
I surely can take a look at the changes proposed, but I lack access to the names jira issue, therefore I'm unsure weather this meets the needed conditions. |
SECURITY-771 is about being able to see what plugins are installed and their versions with only overall read access. As part of the change The change seems ok to me although not much benefit in refactoring old security tests imo. |
@timja thanks for taking a look at this PR! Regarding your point about refactoring the old security tests, let me explain the benefits this PR brings: What this PR delivers:
Why these changes matter:
Could you help route this to the Security team for their review, please? |
This is generally unnecessary for published issues except in weird edge cases. https://www.jenkins.io/security/issue/SECURITY-771 has everything in this case. Security team does not object to this PR in principle. Personally this PR looks unnecessary though. The newly added test configurations are unnecessary (without Overall/Read, you never get past |
@daniel-beck til about this redirect 👀 But +1 with your and Tim's thoughts. |
|
Hi team, thank you for the feedback so far! To clarify the intent of this PR, the main improvements are:
Regarding the new test configurations, could you please help me understand why they are considered unnecessary? I added them to explicitly test the access control path for users without Overall/Read permission, ensuring the redirect logic is triggered correctly. I believe these changes significantly improve the code quality and reliability of this security test. |
There was a problem hiding this comment.
Pull request overview
This PR fixes and improves the smoke test for About Jenkins page access control (SECURITY-771) by expanding test coverage to validate all critical permission combinations. The test was refactored from a single test method into two focused test methods with improved organization and clarity.
Changes:
- Refactored authorization setup into a dedicated
setupTestAuthorization()method for better organization - Extracted user access logic into reusable helper methods (
accessAsUser()andaccessAsAnonymous()) - Split the original test into two focused test methods: one for users with elevated permissions and one for users with basic permissions
- Added comprehensive test coverage for 7 permission scenarios including edge cases
- Introduced string constants for test data to improve maintainability
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…dback in code review.
|
@MarkEWaite thank you for your help with triggering Copilot code review! All comments were addressed and resolved.
|
|
Can you stop merging master into this, it notifies us each time. This is low priority for us. |




In this PR was fixed and improved smoke test logic and implementation for About Jenkins page access for users with different permissions.
In this smoke test were covered all critical permission combinations:
Key Details:
SECURITY-771 (CVE-2018-1000192) is a 2018 Jenkins vulnerability where the CLI and UI allowed non-administrator users to enumerate installed plugins, potentially exposing sensitive environment information. It was addressed in the May 9, 2018 Jenkins Security Advisory by restricting plugin information access.
Vulnerability Type: Information Exposure (Plugin Enumeration).
Impact: Non-authenticated or low-privilege users could list all installed plugins, helping attackers identify potential vulnerabilities in specific plugin versions.
Affected Components: Jenkins CLI and User Interface.
Before update:

After update:


Testing done
Local test run passed for updated test.
To run test you can use the next command:
mvn test -Dtest=AboutJenkinsTestScreenshots:



Proposed changelog entries
Proposed changelog category
/label tests, skip-changelog`
Proposed upgrade guidelines
N/A
Submitter checklist
@Restrictedor have@since TODOJavadocs, as appropriate.@Deprecated(since = "TODO")or@Deprecated(forRemoval = true, since = "TODO"), if applicable.evalto ease future introduction of Content Security Policy (CSP) directives (see documentation).Desired reviewers
@mention
Before the changes are marked as
ready-for-merge:Maintainer checklist
upgrade-guide-neededlabel is set and there is a Proposed upgrade guidelines section in the pull request title (see example).lts-candidateto be considered (see query).