Commit Graph

99 Commits

Author SHA1 Message Date
Patrick Bajao 0e33f16b5f Add system check for authorized_keys file perm
This check is being removed from gitlab-shell as the file
is now being managed by gitlab-rails.
2019-08-29 16:33:04 +08:00
Zeger-Jan van de Weg 3ace5766e9
Use Git 2.22 for GitLab
Part of: https://gitlab.com/gitlab-org/gitaly/issues/1715
2019-08-07 14:25:58 +02:00
Drew Blessing 05d5504d07 Sanitize LDAP output in Rake tasks
The various LDAP check Rake tasks have long supported a SANITIZE
environment variable. When present, identifiable information is
obscured such as user names and project/group names. Until now,
the LDAP check did not honor this. Now it will only say how many
users were found. This should at least give the indication that
the LDAP configuration found something, but will not leak what
it is. Resolves #56131
2019-06-21 05:49:56 -05:00
Yoginth 2f6a20ce66 Fix typos in the whole gitlab-ce project 2019-05-20 14:11:44 +00:00
Stan Hu 0ca790aff7 Bump required Ruby version check to 2.5.3
Relates to https://gitlab.com/gitlab-org/gitlab-ce/issues/58079

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/60704
2019-04-18 10:15:53 -07:00
Zeger-Jan van de Weg 98befb5d40 Update preflight check to require 2.21 2019-04-16 14:09:45 +00:00
Andrew Newdigate 3288e1a874 Adds the Rubocop ReturnNil cop
This style change enforces `return if ...` instead of
`return nil if ...` to save maintainers a few minor review points
2019-03-06 17:51:56 +02:00
Semyon Pupkov c379973bce chore(rubocop): fix Style/TrivialAccessors issues 2019-01-16 13:53:04 +05:00
Michael Kozono 6855e6b586 Extract system check rake task logic
These changes make the code more reusable, testable, and most
importantly, overrideable.
2018-12-03 13:51:46 -08:00
Douwe Maan cd7f2d35ae Merge branch '46950-systemcheck-use-gem-ruby-instead-of-hardcoding-ruby-version' into 'master'
SystemCheck: Use a more reliable way to detect current Ruby version

Closes #46950

See merge request gitlab-org/gitlab-ce!23291
2018-11-22 10:20:47 +00:00
Francisco Javier López e178329b45 Upgraded minimum Git version to 2.18.0 2018-11-21 22:37:08 +00:00
Gabriel Mazetto e94001ba89 Use a more reliable way to detect current Ruby version 2018-11-21 21:46:27 +01:00
gfyoung c8755543f0 Enable even more frozen string in lib/**/*.rb
Enables frozen string for the following files:

* lib/generators/**/*.rb
* lib/gitaly/**/*.rb
* lib/google_api/**/*.rb
* lib/haml_lint/**/*.rb
* lib/json_web_token/**/*.rb
* lib/mattermost/**/*.rb
* lib/microsoft_teams/**/*.rb
* lib/object_storage/**/*.rb
* lib/omni_auth/**/*.rb
* lib/peek/**/*.rb
* lib/rouge/**/*.rb
* lib/rspec_flaky/**/*.rb
* lib/system_check/**/*.rb

Partially addresses #47424.
2018-10-08 11:16:49 -07:00
Marcel Amirault 6876c7afa8 Fix grammar (setup to set-up) in code comments, spec, views, etc. 2018-09-17 09:17:33 +00:00
Jacob Vosmaer (GitLab) 5cf5680f9c Deny repository disk access in development and test 2018-06-14 11:18:25 +00:00
Lin Jen-Shin 5240bb7574 Bring changes from EE for lib/system_check/simple_executor.rb 2018-06-14 02:39:20 +08:00
Jacob Vosmaer f376347f24 Find and mark more Git disk access locations, part 2 2018-06-12 14:33:37 +02:00
Jacob Vosmaer 008a6a6ce6 Route path lookups through legacy_disk_path 2018-03-21 18:18:32 +01:00
Dmitriy Zaporozhets aeab4e6263
Use Project#full_name instead of name_with_namespace
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2018-03-07 16:07:09 +02:00
Alejandro Rodríguez c01f81fa08 [ci skip] Fix example commands to refer to the correct versions 2018-01-31 17:02:50 +00:00
Lin Jen-Shin 8e87ecbf30 Eliminate the warnings from task helpers 2018-01-26 19:42:48 +08:00
🙈 jacopo beschi 🙉 729f05f0e3 Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
Jacopo 181cd299f9 Adds Rubocop rule for line break after guard clause
Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
2017-11-16 17:58:29 +01:00
Nick Thomas 2f0f62e588
Remove an exception from the git user default SSH config check 2017-11-02 13:31:11 +00:00
Zeger-Jan van de Weg 2994de7590 Upgrade Ruby to 2.3.5
Part of gitlab-org/gitlab-ce#38040
2017-10-31 14:19:14 +01:00
Toon Claes d13669716a Create idea of read-only database
In GitLab EE, a GitLab instance can be read-only (e.g. when it's a Geo
secondary node). But in GitLab CE it also might be useful to have the
"read-only" idea around. So port it back to GitLab CE.

Also having the principle of read-only in GitLab CE would hopefully
lead to less errors introduced, doing write operations when there
aren't allowed for read-only calls.

Closes gitlab-org/gitlab-ce#37534.
2017-10-06 22:37:40 +02:00
Nick Thomas 43c712f5dd
Whitelist authorized_keys.lock in the gitlab:check rake task 2017-10-02 11:25:02 +01:00
Gabriel Mazetto c505a52347 Fixed few gitlab:check tasks that were failing with exception 2017-09-25 00:34:12 +02:00
Lin Jen-Shin 7e62ad05b5 Fix rake gitlab:incoming_email:check and make it
report error properly, so that we know what's really wrong.
2017-09-22 02:03:57 +08:00
Gabriel Mazetto 2c489f8289 Refactor on namespace and repository checks and added specs 2017-09-12 06:57:22 +02:00
Gabriel Mazetto cc28abeafd Detect orphaned repositories and namespaces in any storage 2017-09-12 04:06:00 +02:00
Sean McGivern 446c7fc6f1 Merge branch 'system-checks-incoming-email' into 'master'
Move Incoming Email checks to System Checks

See merge request !14028
2017-09-06 09:02:47 +00:00
Nick Thomas 48115be509 Add a system check for the git user's custom SSH configuration 2017-09-04 18:16:31 +01:00
Gabriel Mazetto 71000b394b Refactored Incoming Email checks to use SystemCheck library 2017-09-04 04:25:58 +02:00
Gabriel Mazetto eb79e5689e Refactored app/init script check to use dynamic skip reason 2017-09-04 03:59:37 +02:00
Gabriel Mazetto 706d49b259 Added dynamic skip reason to SystemCheck 2017-09-04 03:58:54 +02:00
Maxim Rydkin 78c5d4ddc2 replace `is_multi_check?` with `multi_check?` 2017-08-29 11:14:42 +03:00
Maxim Rydkin 6a56bec735 replace `is_gitlab_user?` with `gitlab_user?` 2017-08-29 11:14:41 +03:00
Gabriel Mazetto b0f2861c3d Make the SimpleExecutor rescue exceptions in the executing Checks 2017-06-27 17:48:04 +02:00
Gabriel Mazetto 0d4d9a6a63 Refactor and move things around to improve in YAGNI perspective 2017-05-31 20:45:00 +02:00
Gabriel Mazetto d219f9a691 Fix BasicExecutor specs 2017-05-31 14:33:03 +02:00
Gabriel Mazetto 3f187751d4 Fixed and improved some existing checks and SystemCheck library 2017-05-31 14:33:03 +02:00
Gabriel Mazetto bca5603740 Fix codestyle 2017-05-31 14:33:03 +02:00
Gabriel Mazetto ecdbde3d95 Improve Specs and some fixes 2017-05-31 14:33:03 +02:00
Gabriel Mazetto 27e632758f Add ActiveUsers Check 2017-05-31 14:33:03 +02:00
Gabriel Mazetto 13e88c9395 Refactor gitlab:app:checks to use SystemCheck 2017-05-31 14:33:03 +02:00
Gabriel Mazetto a4460f420b Fix a few method signature checks 2017-05-31 14:33:03 +02:00
Gabriel Mazetto f182ea4ea5 Some code-style fixes and documentation 2017-05-31 14:33:03 +02:00
Gabriel Mazetto 500e5227a0 WIP SystemCheck library for executing checks from a rake task 2017-05-31 14:33:03 +02:00