Repository navigation
Fix SSH endpoint permissions and CSRF (SECURITY-2093, SECURITY-2315) - #41
Open
mjatin2007 wants to merge 1 commit into
Open
mjatin2007 wants to merge 1 commit into
mjatin2007 wants to merge 1 commit into
Conversation
Require Overall/Administer for doFillCredentialIdItems and doLoginCheck, and require POST for doLoginCheck. Addresses SECURITY-2093 (CVE-2022-30958, CVE-2022-30959) and SECURITY-2315 (CVE-2022-30957) from the 2022-05-17 Jenkins security advisory. Signed-off-by: Jatin Mannepalli <mjatin2007@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Require
ADMINISTERfor the SSH credential selector (doFillCredentialIdItems) and connection check (doLoginCheck), and require POST for the connection check. Non-administrator requests to both endpoints are rejected; GET requests to the connection check are also rejected. The global-configuration validate button sends POST with a crumb, preserving the administrator workflow.This remediates already-public issues from the 2022-05-17 Jenkins security advisory:
Testing done
SSHBuildWrapperSecurityTest(6 tests): on exact unpatched basee44d09b, 4 fail (reader POST, reader GET, administrator GET, and reader credential-list access); with this change all 6 passmvn -B -ntp verify: 23 tests passed with SpotBugs and Spotless clean on Java 21 and Maven 3.9.9validateButtonPOST/crumb path and an administrator POST-with-crumb test; no manual browser test was runSubmitter checklist
security/ssh-endpoint-hardening, notmaster