Commit Graph

22 Commits

Author SHA1 Message Date
Nick Thomas 69645389e9
Prevent a path traversal attack on global file templates
The API permits path traversal characters like '../' to be passed down
to the template finder. Detect these requests and cause them to fail
with a 500 response code.
2018-12-05 14:12:35 +00:00
gfyoung f93f8f569d Enable even more frozen string for lib/gitlab
Enables frozen string for the following:

* lib/gitlab/patch/**/*.rb
* lib/gitlab/popen/**/*.rb
* lib/gitlab/profiler/**/*.rb
* lib/gitlab/project_authorizations/**/*.rb
* lib/gitlab/prometheus/**/*.rb
* lib/gitlab/query_limiting/**/*.rb
* lib/gitlab/quick_actions/**/*.rb
* lib/gitlab/redis/**/*.rb
* lib/gitlab/request_profiler/**/*.rb
* lib/gitlab/search/**/*.rb
* lib/gitlab/sherlock/**/*.rb
* lib/gitlab/sidekiq_middleware/**/*.rb
* lib/gitlab/slash_commands/**/*.rb
* lib/gitlab/sql/**/*.rb
* lib/gitlab/template/**/*.rb
* lib/gitlab/testing/**/*.rb
* lib/gitlab/utils/**/*.rb
* lib/gitlab/webpack/**/*.rb

Partially addresses gitlab-org/gitlab-ce#47424.
2018-11-19 18:24:22 -08:00
Nick Thomas 34480bb850
Backport CE to changes to support group-level file templates
When the feature is available, this setting allows admins to choose a
project as a source of custom file templates. This is in addition to
any instance-wide templates, whether custom or vendored into the GitLab
codebase.
2018-10-19 01:39:59 +01:00
Nick Thomas 25bd49e4f5
Backport project template API to CE 2018-10-05 11:34:43 +01:00
Dylan Griffith f5f5d6ea1f Resolve "Un-vendor CI templates" 2018-09-26 15:39:27 +00:00
Marcel Amirault eb640eded7 Correct Gitlab Capitalization in code files 2018-09-21 12:05:37 +00:00
Nick Thomas d65e31ab72
Backport changes to Gitlab::Tempalte::BaseTemplate 2018-09-05 15:19:20 +01:00
Nick Thomas ffd164d27f
Fix bugs in Gitlab::Template::Finders preventing instances from BaseTemplate.all from loading content 2018-08-14 22:28:46 +01: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
Zeger-Jan van de Weg ed8f7ed671
Sort templates when fetching them
Used to rely on the underlying filesystem to sort the entries, now its
forced to be sorted on the name of the template.
2017-08-31 15:45:48 +02:00
Zeger-Jan van de Weg df85a7c004 Submodule Dockerfile templates 2017-04-26 15:57:44 +00:00
Sean McGivern 811e598f60 Enable and autocorrect the CustomErrorClass cop 2017-03-01 15:28:10 +00:00
Douwe Maan 7d4b52b27d Enable Style/WordArray 2017-02-23 09:32:41 -06:00
Adam Niedzielski db8ee6672c Rename "autodeploy" to "auto deploy" 2016-12-23 11:08:18 +01:00
Adam Niedzielski 9809a9af8a Introduce "Set up autodeploy" button to help configure GitLab CI for deployment
The button allows to choose a ".gitlab-ci.yml" template that automatically
sets up the deployment of an application.
The currently supported template is Kubernetes template.
2016-12-21 16:21:55 +01:00
Kamil Trzcinski 6970c1f331
Allow to use Dockerfile templates 2016-11-08 13:54:58 +00:00
Felipe Artur 2872672945 Load issues and merge requests templates from repository 2016-08-16 15:50:17 -03:00
Z.J. van de Weg bbfd62bc34 fixup! override content method 2016-06-20 14:48:28 -05:00
Z.J. van de Weg 483dc62eaa Incorporate review 2016-06-20 14:48:28 -05:00
Z.J. van de Weg 8039856d80 Add changelog item, fix rubocop issue 2016-06-20 14:48:28 -05:00
Z.J. van de Weg 620d014aef Implement backend gitlab ci dropdown
This commit builds on the groundwork in
ee008e300b1ec0abcc90e6a30816ec0754cea0dd, which refactored the backend
so the same code could be used for new dropdowns. In this commit its
used for templates for the `.gitlab-ci.yml` files.
2016-06-20 14:48:28 -05:00
ZJ van de Weg 27bf7ae59e Refactor Gitlab::Gitignores 2016-06-20 14:48:28 -05:00