Commit Graph
10809 Commits
Author SHA1 Message Date
James Nord b8c9841c30 [SECURITY-167] Plugin manager was also vulnerable.
Although the plugiun manager was vulnerable getting information
out of Jenkins was harder - however it would still be possible to
do bad things such as reading from /dev/zero on Linux
2015-02-27 18:18:23 +00:00
Jesse Glick be06d6c4b8 Merge pull request #11 from jenkinsci-cert/SECURITY-162
[SECURITY-162] Forbid symlink attacks from artifact archiving
2015-02-07 11:25:08 -05:00
Robert Sandell 1887656c11 Merge pull request #9 from jenkinsci-cert/SECURITY-165
[SECURITY-165] blacklist the document xpath function for use in Api
2015-02-06 18:18:30 +01:00
Jesse Glick 1bba1ac3c6 [SECURITY-162] Capture the root directory in VirtualFile.forFile and reject attempts to escape it. 2015-02-06 11:37:24 -05:00
Robert Sandell c03afbbd4f Moved new class to other package 2015-02-06 14:52:20 +01:00
Robert Sandell 1629a93fbc Tidy up
Review comments fixed:
 Added license header
 Reformat the issue comment
 Restricted NoExternalUse
 toLowerCase in English locale
 lesser resolution of declared exception from the test
2015-02-06 10:34:41 +01:00
Jesse Glick a001f71ded Merge pull request #6 from jenkinsci-cert/SECURITY-125
[SECURITY-125] Matrix project script security
2015-02-05 15:44:47 -05:00
Robert Sandell de4414cbf3 [SECURITY-165] blacklist the document xpath function for use in Api 2015-02-05 20:37:57 +01:00
James Nord 5564a62eb6 Merge pull request #7 from jenkinsci-cert/SECURITY-167_2
[SECURITY-167] Followup tweaks to address review comments.
2015-02-05 16:19:14 +00:00
James Nord fe5077e534 remove uneeded "@since TODO" 2015-02-05 14:45:35 +00:00
Ryan Campbell 1338e661aa Merge pull request #5 from jenkinsci-cert/SECURITY-166
Fixes for SECURITY-166
2015-02-05 08:44:51 -06:00
James Nord 1786daa514 [SECURITY-167] Followup tweaks to address review comments.
Addresses some comments received after the original fix was merged.
2015-02-05 14:36:29 +00:00
James Nord 065c3b40d3 Merge pull request #4 from jenkinsci-cert/security-167
SECURITY-167

defend against XXE attacks in core https://issues.jenkins-ci.org/browse/SECURITY-167
2015-02-05 10:21:26 +00:00
Jesse Glick 41786ad019 Preventing cyclic dependencies among bundled plugins.
Reproducible for example via HelpLinkTest.testMatrixConfig.
Otherwise have: matrix-project → script-security → matrix-auth → windows-slaves → antisamy-markup-formatter → matrix-project
Tried to come up with a generic way of doing this automatically, but failed.
Just because we bundle a particular build of some plugin does not mean it was built against anything recent,
and for use on older cores it may well need some of those implicit dependencies.
2015-02-04 16:45:53 -05:00
Jesse Glick 5d43fdf1e6 matrix-project 1.0
(cherry picked from commit 0bd831e2d9)
2015-02-04 14:05:32 -05:00
Jesse Glick da829b345d isMatrixProject ought to handle nulls, just in case.
(cherry picked from commit 747d550c3c)
2015-02-04 14:05:11 -05:00
Jesse Glick 92ca85339f Preparing to include transitional release.
(cherry picked from commit 071951e658)
2015-02-04 14:05:00 -05:00
Jesse Glick 04681f6b84 Extracting some miscellaneous usages from core/src.
(cherry picked from commit 04aace98d1)
2015-02-04 14:04:46 -05:00
Jesse Glick a236b34364 DetachedPlugin entry.
(cherry picked from commit e4ba41d539)
2015-02-04 14:04:40 -05:00
Jesse Glick 5361065437 Extracting MatrixAggregatable dependency.
(cherry picked from commit 5d9e4d7b07)
2015-02-04 14:04:36 -05:00
Jesse Glick 3ca23a1111 Unclear status of MatrixConfiguration when enableFingerprintsInDependencyGraph mode selected.
(cherry picked from commit b9d8f554c6)
2015-02-04 14:04:30 -05:00
Jesse Glick 1b47215e68 Removing MatrixChildAction dependency.
(cherry picked from commit 42195d83c4)
2015-02-04 14:04:21 -05:00
Jesse Glick 5a9b69d2fc XStream initializations moved to MatrixProject.
(cherry picked from commit dbed304407)

Conflicts:
	core/src/main/java/hudson/model/Run.java
2015-02-04 14:04:04 -05:00
Jesse Glick bf2cd1a689 isMatrixProject appears unused, but keep for compatibility.
(cherry picked from commit d72fda46a6)
2015-02-04 14:01:44 -05:00
Jesse Glick 17ba1dad1f Comment, but not critical for separation.
(cherry picked from commit e405078e09)
2015-02-04 14:01:38 -05:00
Jesse Glick 7d926f720e Removing hudson.matrix classes and associated resources as a first pass.
(cherry picked from commit 4aad749cbe)

Conflicts:
	core/src/main/java/hudson/matrix/MatrixBuild.java
	core/src/main/java/hudson/matrix/MatrixConfiguration.java
	core/src/main/java/hudson/matrix/MatrixProject.java
	core/src/main/resources/hudson/matrix/MatrixProject/configure-entries.jelly
2015-02-04 13:08:01 -05:00
Ryan Campbell 71f9d5ebf4 [SECURITY-165] Add constants for system-wide usernames 2015-02-04 10:24:17 -06:00
Ryan Campbell 09c04e3b66 Resolve feedback on SECURITY-165 2015-02-04 09:36:16 -06:00
Ryan Campbell 01a087d127 [SECURITY-166] Prevent the creation of anonymous, system or unknown users.
These users can still be instantiated, as would happen if there is no security and an anonymous user triggers a build -- the anonymous user would correctly be created and added to the User list. This fix merely prevents the saving of that user, and therefore prevents them from logging in.

There may be some plugins which trigger a build as the SYSTEM user, and that is not prohibited here.

Also prevent full names of 'anonymous', 'system' or 'uknown'. As discussed on SECURITY-166 this may encumber auditing since full names are used in most places in the UI
2015-02-04 05:48:05 -06:00
James Nord b579a53cfd [SECURITY-167] update log message when prevention is disabled.
add stack trace so the offending plugin/code can be identified
2015-02-04 10:35:03 +00:00
James Nord c58ea9fe79 [SECURITY-167] attempt to set JAXP properties.
Atempt to set SAX specific properties to defend against XXE attacks.
2015-02-03 15:59:01 +00:00
James Nord d6e14b1eca [SECURITY-167] defend against XXE attacks.
Added a new EntityResolver that will throw an exception if any attempts
are made to load external entities.
Made the transforer use SAX so that we can use out EntityResolover.

As we can't defend against calls that have already parsed the xml (e.g.
DOMSource) if we are parsed one of those throw an exception (which can be
disabled with a System property.
2015-02-03 13:52:46 +00:00
Jesse Glick 318627de88 Updated help-useBrowser.html.
In 20340e1842 @daniel-beck suggested updating this text.
2015-01-20 14:11:37 -05:00
Jesse Glick 20340e1842 Restricting postBack access to users with ADMINISTER. 2015-01-20 13:44:08 -05:00
Jesse Glick c1adb4e628 Only do a server-side metadata check if at least one update site claims to be due for a check.
Avoids rechecking at every startup, mainly relevant during interactive testing when restarts may be quite frequent.
2015-01-13 14:56:45 -05:00
Jesse Glick 73e6650381 Do not want to download metadata in the background during functional tests. 2015-01-13 14:45:43 -05:00
Jesse Glick ad5cb7cab6 Avoid NPE if DailyCheck happens to run during shutdown. 2015-01-13 14:37:12 -05:00
Jesse Glick aa36a5d3db DailyCheck.initialDelay=0 so it runs right after startup if using server-based download. 2015-01-13 14:19:53 -05:00
Jesse Glick 83cf4aa451 Need to append .html to .json only in updateNow, not for browser-based checks. 2015-01-13 14:16:09 -05:00
Jesse Glick 7e7d545588 Set up an admin monitor in case of browser-based download.
Also moving this switch to security settings.
2015-01-12 11:16:00 -05:00
Jesse Glick 52cc68808d Keep comments in the PR. 2015-01-09 16:48:33 -05:00
Jesse Glick 712a223728 Trim whitespace off JSONP. 2015-01-09 16:48:23 -05:00
Jesse Glick cc95634ddf Can get signatures from *.json.html. 2015-01-09 16:18:04 -05:00
Jesse Glick f80faace93 Merge branch 'security' into SECURITY-163 2015-01-09 15:41:41 -05:00
Jesse Glick 16afb73b25 [FIXED JENKINS-25937] Treat BadPaddingException as an unloadable key and continue.
(cherry picked from commit 6318b8d800)
2015-01-09 15:33:20 -05:00
Jesse Glick 877f4b37ee Misleading error message.
(cherry picked from commit e4c5c71042)
2015-01-09 15:33:19 -05:00
Jesse Glick 6b71faccb9 Reproduced problem in a test. 2015-01-09 15:25:41 -05:00
Jesse Glick d00f7ab9b6 Removed DownloadSettings.checkSignature; back to using a plain system property for this.
(cherry picked from commit df9c92e461)
2015-01-09 15:16:44 -05:00
Jesse Glick 8c9910f2bb @kohsuke prefers that the option to disable signature checks not even be presented unless -Dhudson.model.DownloadService.noSignatureCheck is used.
(cherry picked from commit 54c85007f3)
2015-01-09 15:15:34 -05:00
Jesse Glick a47dc036d8 Be a bit paranoid and ensure the admin has CONFIGURE_UPDATECENTER before turning off signature checks.
(cherry picked from commit 1262d88289)
2015-01-09 15:15:34 -05:00