Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab/ci/rules.gitlab-ci.yml3
-rw-r--r--db/post_migrate/20220901073300_remove_partial_trigram_indexes_for_issues.rb25
-rw-r--r--db/schema_migrations/202209010733001
-rw-r--r--db/structure.sql4
-rw-r--r--doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md12
-rw-r--r--doc/api/merge_request_approvals.md146
-rw-r--r--doc/development/code_review.md31
-rw-r--r--doc/development/service_ping/implement.md2
-rw-r--r--doc/development/service_ping/index.md11
-rw-r--r--doc/user/admin_area/settings/sign_in_restrictions.md20
-rw-r--r--doc/user/application_security/container_scanning/index.md49
-rw-r--r--doc/user/project/issues/confidential_issues.md13
-rw-r--r--doc/user/project/issues/img/confidential_issues_create.pngbin8185 -> 0 bytes
-rw-r--r--doc/user/project/issues/img/confidential_issues_create_v15_4.pngbin0 -> 13023 bytes
-rw-r--r--doc/user/project/issues/img/confidential_issues_system_notes.pngbin4214 -> 0 bytes
-rw-r--r--doc/user/project/issues/img/confidential_issues_system_notes_v15_4.pngbin0 -> 4289 bytes
-rw-r--r--lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml6
-rw-r--r--lib/tasks/gitlab/usage_data.rake5
-rw-r--r--spec/tasks/gitlab/usage_data_rake_spec.rb6
19 files changed, 179 insertions, 155 deletions
diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml
index 83590a2861c..b2ab53f42c1 100644
--- a/.gitlab/ci/rules.gitlab-ci.yml
+++ b/.gitlab/ci/rules.gitlab-ci.yml
@@ -771,7 +771,8 @@
rules:
- !reference [".strict-ee-only-rules", rules]
- !reference [".frontend:rules:default-frontend-jobs-as-if-foss", rules]
- - !reference [".frontend:rules:jest:minimal:as-if-foss", rules]
+ - <<: *if-merge-request
+ changes: *frontend-patterns-for-as-if-foss
.frontend:rules:jest:
rules:
diff --git a/db/post_migrate/20220901073300_remove_partial_trigram_indexes_for_issues.rb b/db/post_migrate/20220901073300_remove_partial_trigram_indexes_for_issues.rb
new file mode 100644
index 00000000000..096b74bc1c6
--- /dev/null
+++ b/db/post_migrate/20220901073300_remove_partial_trigram_indexes_for_issues.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+class RemovePartialTrigramIndexesForIssues < Gitlab::Database::Migration[2.0]
+ TITLE_INDEX_NAME = 'index_issues_on_title_trigram_non_latin'
+ DESCRIPTION_INDEX_NAME = 'index_issues_on_description_trigram_non_latin'
+
+ disable_ddl_transaction!
+
+ def up
+ remove_concurrent_index_by_name :issues, TITLE_INDEX_NAME
+ remove_concurrent_index_by_name :issues, DESCRIPTION_INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index :issues, :title,
+ name: TITLE_INDEX_NAME,
+ using: :gin, opclass: { description: :gin_trgm_ops },
+ where: "title NOT SIMILAR TO '[\\u0000-\\u218F]*' OR description NOT SIMILAR TO '[\\u0000-\\u218F]*'"
+
+ add_concurrent_index :issues, :description,
+ name: DESCRIPTION_INDEX_NAME,
+ using: :gin, opclass: { description: :gin_trgm_ops },
+ where: "title NOT SIMILAR TO '[\\u0000-\\u218F]*' OR description NOT SIMILAR TO '[\\u0000-\\u218F]*'"
+ end
+end
diff --git a/db/schema_migrations/20220901073300 b/db/schema_migrations/20220901073300
new file mode 100644
index 00000000000..47cba2c6c05
--- /dev/null
+++ b/db/schema_migrations/20220901073300
@@ -0,0 +1 @@
+92ca7bd3f150c9d447e6ab2152b7039379fece41bdef85addcf59b464dc95eb8 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 322e7055758..a8ac768d587 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -28942,8 +28942,6 @@ CREATE INDEX index_issues_on_confidential ON issues USING btree (confidential);
CREATE INDEX index_issues_on_description_trigram ON issues USING gin (description gin_trgm_ops);
-CREATE INDEX index_issues_on_description_trigram_non_latin ON issues USING gin (description gin_trgm_ops) WHERE (((title)::text !~ similar_escape('[\u0000-\u218F]*'::text, NULL::text)) OR (description !~ similar_escape('[\u0000-\u218F]*'::text, NULL::text)));
-
CREATE INDEX index_issues_on_duplicated_to_id ON issues USING btree (duplicated_to_id) WHERE (duplicated_to_id IS NOT NULL);
CREATE INDEX index_issues_on_id_and_weight ON issues USING btree (id, weight);
@@ -28980,8 +28978,6 @@ CREATE INDEX index_issues_on_sprint_id ON issues USING btree (sprint_id);
CREATE INDEX index_issues_on_title_trigram ON issues USING gin (title gin_trgm_ops);
-CREATE INDEX index_issues_on_title_trigram_non_latin ON issues USING gin (title gin_trgm_ops) WHERE (((title)::text !~ similar_escape('[\u0000-\u218F]*'::text, NULL::text)) OR (description !~ similar_escape('[\u0000-\u218F]*'::text, NULL::text)));
-
CREATE INDEX index_issues_on_updated_at ON issues USING btree (updated_at);
CREATE INDEX index_issues_on_updated_by_id ON issues USING btree (updated_by_id) WHERE (updated_by_id IS NOT NULL);
diff --git a/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md b/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
index 612cdd06e99..4f602ecf6e3 100644
--- a/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
+++ b/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
@@ -785,18 +785,6 @@ subgroup.members.map(&:errors).map(&:full_messages)
subgroup.members_and_requesters.map(&:errors).map(&:full_messages)
```
-## Authentication
-
-### Re-enable standard web sign-in form
-
-Re-enable the standard username and password-based sign-in form if it was disabled as a [Sign-in restriction](../../user/admin_area/settings/sign_in_restrictions.md#password-authentication-enabled).
-
-You can use this method when a configured external authentication provider (through SSO or an LDAP configuration) is facing an outage and direct sign-in access to GitLab is required.
-
-```ruby
-Gitlab::CurrentSettings.update!(password_authentication_enabled_for_web: true)
-```
-
## Routes
### Remove redirecting routes
diff --git a/doc/api/merge_request_approvals.md b/doc/api/merge_request_approvals.md
index f32a5eebaeb..55c6386dfd7 100644
--- a/doc/api/merge_request_approvals.md
+++ b/doc/api/merge_request_approvals.md
@@ -27,7 +27,7 @@ GET /projects/:id/approvals
| Attribute | Type | Required | Description |
| --------- | ------- | -------- | ------------------- |
-| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding) |
+| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
```json
{
@@ -54,15 +54,15 @@ POST /projects/:id/approvals
**Parameters:**
-| Attribute | Type | Required | Description |
-| ------------------------------------------------ | ------- | -------- | --------------------------------------------------------------------------------------------------- |
-| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding) |
-| `approvals_before_merge` | integer | no | How many approvals are required before an MR can be merged. Deprecated in 12.0 in favor of Approval Rules API. |
-| `disable_overriding_approvers_per_merge_request` | boolean | no | Allow or prevent overriding approvers per MR |
-| `merge_requests_author_approval` | boolean | no | Allow or prevent authors from self approving merge requests; `true` means authors can self approve |
-| `merge_requests_disable_committers_approval` | boolean | no | Allow or prevent committers from self approving merge requests |
-| `require_password_to_approve` | boolean | no | Require approver to enter a password to authenticate before adding the approval |
-| `reset_approvals_on_push` | boolean | no | Reset approvals on a new push. |
+| Attribute | Type | Required | Description |
+| ------------------------------------------------ | ------- | -------- | -- |
+| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
+| `approvals_before_merge` | integer | no | How many approvals are required before a merge request can be merged. Deprecated in GitLab 12.0 in favor of Approval Rules API. |
+| `disable_overriding_approvers_per_merge_request` | boolean | no | Allow or prevent overriding approvers per merge request. |
+| `merge_requests_author_approval` | boolean | no | Allow or prevent authors from self approving merge requests; `true` means authors can self approve. |
+| `merge_requests_disable_committers_approval` | boolean | no | Allow or prevent committers from self approving merge requests. |
+| `require_password_to_approve` | boolean | no | Require approver to enter a password to authenticate before adding the approval. |
+| `reset_approvals_on_push` | boolean | no | Reset approvals on a new push. |
| `selective_code_owner_removals` | boolean | no | Reset approvals from Code Owners if their files changed. Can be enabled only if `reset_approvals_on_push` is disabled. |
```json
@@ -79,9 +79,7 @@ POST /projects/:id/approvals
### Get project-level rules
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in GitLab 12.3.
> - Moved to GitLab Premium in 13.9.
-> - `protected_branches` property was [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/460) in GitLab 12.7.
> - Pagination support [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/31011) in GitLab 15.3 [with a flag](../administration/feature_flags.md) named `approval_rules_pagination`. Enabled by default.
> - `applies_to_all_protected_branches` property was [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/335316) in GitLab 15.3.
@@ -97,7 +95,7 @@ Use the `page` and `per_page` [pagination](index.md#offset-based-pagination) par
| Attribute | Type | Required | Description |
|----------------------|---------|----------|-----------------------------------------------------------|
-| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding) |
+| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
```json
[
@@ -198,8 +196,8 @@ GET /projects/:id/approval_rules/:approval_rule_id
| Attribute | Type | Required | Description |
|----------------------|---------|----------|-----------------------------------------------------------|
-| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding) |
-| `approval_rule_id` | integer | yes | The ID of a approval rule |
+| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
+| `approval_rule_id` | integer | yes | The ID of a approval rule. |
```json
{
@@ -285,7 +283,6 @@ GET /projects/:id/approval_rules/:approval_rule_id
### Create project-level rule
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in GitLab 12.3.
> - Moved to GitLab Premium in 13.9.
> - [Removed](https://gitlab.com/gitlab-org/gitlab/-/issues/357300) the Vulnerability-Check feature in GitLab 15.0.
> - `applies_to_all_protected_branches` property was [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/335316) in GitLab 15.3.
@@ -298,17 +295,17 @@ POST /projects/:id/approval_rules
**Parameters:**
-| Attribute | Type | Required | Description |
-|-------------------------------------|-------------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding) |
-| `name` | string | yes | The name of the approval rule |
-| `report_type` | string | no | The report type required when the rule type is `report_approver`. The supported report types are: `license_scanning` and `code_coverage`. |
-| `approvals_required` | integer | yes | The number of required approvals for this rule |
-| `rule_type` | string | no | The type of rule. `any_approver` is a pre-configured default rule with `approvals_required` at `0`. Other rules are `regular`. |
-| `user_ids` | Array | no | The ids of users as approvers |
-| `group_ids` | Array | no | The ids of groups as approvers |
-| `protected_branch_ids` | Array | no | The IDs of protected branches to scope the rule by. To identify the ID, [use the API](protected_branches.md#list-protected-branches). |
+| Attribute | Type | Required | Description |
+|-------------------------------------|-------------------|----------|------------ |
+| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
+| `approvals_required` | integer | yes | The number of required approvals for this rule. |
+| `name` | string | yes | The name of the approval rule. |
| `applies_to_all_protected_branches` | boolean | no | Whether the rule is applied to all protected branches. If set to `true`, the value of `protected_branch_ids` is ignored. Default is `false`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/335316) in GitLab 15.3. |
+| `group_ids` | Array | no | The IDs of groups as approvers. |
+| `protected_branch_ids` | Array | no | The IDs of protected branches to scope the rule by. To identify the ID, [use the API](protected_branches.md#list-protected-branches). |
+| `report_type` | string | no | The report type required when the rule type is `report_approver`. The supported report types are `license_scanning` and `code_coverage`. |
+| `rule_type` | string | no | The type of rule. `any_approver` is a pre-configured default rule with `approvals_required` at `0`. Other rules are `regular`. |
+| `user_ids` | Array | no | The IDs of users as approvers. |
```json
{
@@ -411,7 +408,6 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
### Update project-level rule
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in GitLab 12.3.
> - Moved to GitLab Premium in 13.9.
> - [Removed](https://gitlab.com/gitlab-org/gitlab/-/issues/357300) the Vulnerability-Check feature in GitLab 15.0.
> - `applies_to_all_protected_branches` property was [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/335316) in GitLab 15.3.
@@ -426,16 +422,16 @@ PUT /projects/:id/approval_rules/:approval_rule_id
**Parameters:**
-| Attribute | Type | Required | Description |
-|-------------------------------------|-------------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding) |
-| `approval_rule_id` | integer | yes | The ID of a approval rule |
-| `name` | string | yes | The name of the approval rule |
-| `approvals_required` | integer | yes | The number of required approvals for this rule |
-| `user_ids` | Array | no | The ids of users as approvers |
-| `group_ids` | Array | no | The ids of groups as approvers |
-| `protected_branch_ids` | Array | no | The IDs of protected branches to scope the rule by. To identify the ID, [use the API](protected_branches.md#list-protected-branches). |
+| Attribute | Type | Required | Description |
+|-------------------------------------|-------------------|----------|-------------|
+| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
+| `approvals_required` | integer | yes | The number of required approvals for this rule. |
+| `approval_rule_id` | integer | yes | The ID of a approval rule. |
+| `name` | string | yes | The name of the approval rule. |
| `applies_to_all_protected_branches` | boolean | no | Whether the rule is applied to all protected branches. If set to `true`, the value of `protected_branch_ids` is ignored. Default is `false`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/335316) in GitLab 15.3. |
+| `group_ids` | Array | no | The IDs of groups as approvers. |
+| `protected_branch_ids` | Array | no | The IDs of protected branches to scope the rule by. To identify the ID, [use the API](protected_branches.md#list-protected-branches). |
+| `user_ids` | Array | no | The IDs of users as approvers. |
```json
{
@@ -521,8 +517,7 @@ PUT /projects/:id/approval_rules/:approval_rule_id
### Delete project-level rule
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in GitLab 12.3.
-> - Moved to GitLab Premium in 13.9.
+> Moved to GitLab Premium in 13.9.
You can delete project approval rules using the following endpoint:
@@ -534,8 +529,8 @@ DELETE /projects/:id/approval_rules/:approval_rule_id
| Attribute | Type | Required | Description |
|--------------------|-------------------|----------|------------------------------------------------------------------------------|
-| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding) |
-| `approval_rule_id` | integer | yes | The ID of a approval rule |
+| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
+| `approval_rule_id` | integer | yes | The ID of a approval rule. |
## Merge request-level MR approvals
@@ -556,8 +551,8 @@ GET /projects/:id/merge_requests/:merge_request_iid/approvals
| Attribute | Type | Required | Description |
|---------------------|-------------------|----------|------------------------------------------------------------------------------|
-| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding) |
-| `merge_request_iid` | integer | yes | The IID of MR |
+| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
+| `merge_request_iid` | integer | yes | The IID of the merge request. |
```json
{
@@ -600,11 +595,11 @@ POST /projects/:id/merge_requests/:merge_request_iid/approvals
**Parameters:**
-| Attribute | Type | Required | Description |
-|----------------------|-------------------|----------|------------------------------------------------------------------------------------------------|
-| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding) |
-| `merge_request_iid` | integer | yes | The IID of MR |
-| `approvals_required` | integer | yes | Approvals required before MR can be merged. Deprecated in 12.0 in favor of Approval Rules API. |
+| Attribute | Type | Required | Description |
+|----------------------|-------------------|----------|-------------|
+| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
+| `approvals_required` | integer | yes | Approvals required before MR can be merged. Deprecated in GitLab 12.0 in favor of Approval Rules API. |
+| `merge_request_iid` | integer | yes | The IID of the merge request. |
```json
{
@@ -625,8 +620,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/approvals
### Get the approval state of merge requests
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13712) in GitLab 12.3.
-> - Moved to GitLab Premium in 13.9.
+> Moved to GitLab Premium in 13.9.
You can request information about a merge request's approval state by using the following endpoint:
@@ -644,8 +638,8 @@ This includes additional information about the users who have already approved
| Attribute | Type | Required | Description |
|---------------------|-------------------|----------|------------------------------------------------------------------------------|
-| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding) |
-| `merge_request_iid` | integer | yes | The IID of MR |
+| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
+| `merge_request_iid` | integer | yes | The IID of the merge request. |
```json
{
@@ -698,7 +692,6 @@ This includes additional information about the users who have already approved
### Get merge request level rules
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13712) in GitLab 12.3.
> - Moved to GitLab Premium in 13.9.
> - Pagination support [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/31011) in GitLab 15.3 [with a flag](../administration/feature_flags.md) named `approval_rules_pagination`. Enabled by default.
@@ -714,8 +707,8 @@ Use the `page` and `per_page` [pagination](index.md#offset-based-pagination) par
| Attribute | Type | Required | Description |
|---------------------|---------|----------|---------------------|
-| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding) |
-| `merge_request_iid` | integer | yes | The IID of MR |
+| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
+| `merge_request_iid` | integer | yes | The IID of the merge request. |
```json
[
@@ -792,8 +785,8 @@ GET /projects/:id/merge_requests/:merge_request_iid/approval_rules/:approval_rul
| Attribute | Type | Required | Description |
|---------------------|---------|----------|------------------------------------------------------------------------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
-| `merge_request_iid` | integer | yes | The IID of a merge request. |
| `approval_rule_id` | integer | yes | The ID of an approval rule. |
+| `merge_request_iid` | integer | yes | The IID of a merge request. |
```json
{
@@ -855,8 +848,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/approval_rules/:approval_rul
### Create merge request level rule
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in GitLab 12.3.
-> - Moved to GitLab Premium in 13.9.
+> Moved to GitLab Premium in 13.9.
You can create merge request approval rules using the following endpoint:
@@ -869,12 +861,12 @@ POST /projects/:id/merge_requests/:merge_request_iid/approval_rules
| Attribute | Type | Required | Description |
|----------------------------|---------|----------|------------------------------------------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding) |
-| `merge_request_iid` | integer | yes | The IID of MR |
-| `name` | string | yes | The name of the approval rule |
-| `approvals_required` | integer | yes | The number of required approvals for this rule |
-| `approval_project_rule_id` | integer | no | The ID of a project-level approval rule |
-| `user_ids` | Array | no | The ids of users as approvers |
-| `group_ids` | Array | no | The ids of groups as approvers |
+| `approvals_required` | integer | yes | The number of required approvals for this rule. |
+| `merge_request_iid` | integer | yes | The IID of the merge request. |
+| `name` | string | yes | The name of the approval rule. |
+| `approval_project_rule_id` | integer | no | The ID of a project-level approval rule. |
+| `group_ids` | Array | no | The IDs of groups as approvers. |
+| `user_ids` | Array | no | The IDs of users as approvers. |
**Important:** When `approval_project_rule_id` is set, the `name`, `users` and
`groups` of project-level rule are copied. The `approvals_required` specified
@@ -940,8 +932,7 @@ is used.
### Update merge request level rule
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in GitLab 12.3.
-> - Moved to GitLab Premium in 13.9.
+> Moved to GitLab Premium in 13.9.
You can update merge request approval rules using the following endpoint:
@@ -959,12 +950,12 @@ These are system generated rules.
| Attribute | Type | Required | Description |
|----------------------|---------|----------|------------------------------------------------|
| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
-| `merge_request_iid` | integer | yes | The IID of a merge request. |
+| `approvals_required` | integer | yes | The number of required approvals for this rule. |
| `approval_rule_id` | integer | yes | The ID of an approval rule. |
+| `merge_request_iid` | integer | yes | The IID of a merge request. |
| `name` | string | yes | The name of the approval rule. |
-| `approvals_required` | integer | yes | The number of required approvals for this rule. |
-| `user_ids` | Array | no | The IDs of users as approvers. |
| `group_ids` | Array | no | The IDs of groups as approvers. |
+| `user_ids` | Array | no | The IDs of users as approvers. |
```json
{
@@ -1026,8 +1017,7 @@ These are system generated rules.
### Delete merge request level rule
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11877) in GitLab 12.3.
-> - Moved to GitLab Premium in 13.9.
+> Moved to GitLab Premium in 13.9.
You can delete merge request approval rules using the following endpoint:
@@ -1042,9 +1032,9 @@ These are system generated rules.
| Attribute | Type | Required | Description |
|---------------------|---------|----------|---------------------------|
-| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding) |
-| `merge_request_iid` | integer | yes | The IID of the merge request |
-| `approval_rule_id` | integer | yes | The ID of an approval rule |
+| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
+| `approval_rule_id` | integer | yes | The ID of an approval rule. |
+| `merge_request_iid` | integer | yes | The IID of the merge request. |
## Approve merge request
@@ -1061,10 +1051,10 @@ POST /projects/:id/merge_requests/:merge_request_iid/approve
| Attribute | Type | Required | Description |
|---------------------|---------|----------|-------------------------|
-| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding) |
-| `merge_request_iid` | integer | yes | The IID of the merge request |
-| `sha` | string | no | The `HEAD` of the merge request |
+| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
| `approval_password` | string | no | Current user's password. Required if [**Require user password to approve**](../user/project/merge_requests/approvals/settings.md#require-user-password-to-approve) is enabled in the project settings. |
+| `merge_request_iid` | integer | yes | The IID of the merge request. |
+| `sha` | string | no | The `HEAD` of the merge request. |
The `sha` parameter works in the same way as
when [accepting a merge request](merge_requests.md#merge-a-merge-request): if it is passed, then it must
@@ -1124,5 +1114,5 @@ POST /projects/:id/merge_requests/:merge_request_iid/unapprove
| Attribute | Type | Required | Description |
|---------------------|---------|----------|---------------------|
-| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding) |
-| `merge_request_iid` | integer | yes | The IID of a merge request |
+| `id` | integer or string | yes | The ID or [URL-encoded path of a project](index.md#namespaced-path-encoding). |
+| `merge_request_iid` | integer | yes | The IID of a merge request. |
diff --git a/doc/development/code_review.md b/doc/development/code_review.md
index a70ec44fd38..35897012b60 100644
--- a/doc/development/code_review.md
+++ b/doc/development/code_review.md
@@ -504,24 +504,25 @@ Before taking the decision to merge:
before merging. A comment must be posted if the MR is merged with any failed job.
- If the MR contains both Quality and non-Quality-related changes, the MR should be merged by the relevant maintainer for user-facing changes (backend, frontend, or database) after the Quality related changes are approved by a Software Engineer in Test.
-If a merge request is fundamentally ready, but needs only trivial fixes (such as
-typos), consider demonstrating a [bias for action](https://about.gitlab.com/handbook/values/#bias-for-action)
-by making those changes directly without going back to the author. You can do this by
-using the [suggest changes](../user/project/merge_requests/reviews/suggestions.md) feature to apply
-your own suggestions to the merge request. Note that:
-
-- If the changes are not straightforward, please prefer allowing the author to make the change.
-- **Before applying suggestions**, edit the merge request to make sure
- [squash and merge](../user/project/merge_requests/squash_and_merge.md#squash-and-merge)
- is enabled, otherwise, the pipeline's Danger job fails.
- - If a merge request does not have squash and merge enabled, and it
- has more than one commit, then see the note below about rewriting
- commit history.
-
-Authors are not authorized to merge their own merge requests and need to seek another maintainer to merge.
+At least one maintainer must approve an MR before it can be merged. MR authors and
+people who add commits to an MR are not authorized to approve the merge request,
+so they must seek a maintainer who has not contributed to the MR to approve the MR before it can be merged.
+
This policy is in place to satisfy the CHG-04 control of the GitLab
[Change Management Controls](https://about.gitlab.com/handbook/engineering/security/security-assurance/security-compliance/guidance/change-management.html).
+To implement this policy in `gitlab-org/gitlab`, we have enabled the following
+settings to ensure MRs get an approval from a top-level CODEOWNERS maintainer:
+
+- [Prevent approval by author](../user/project/merge_requests/approvals/settings.md#prevent-approval-by-author).
+- [Prevent approvals by users who add commits](../user/project/merge_requests/approvals/settings.md#prevent-approvals-by-users-who-add-commits).
+- [Prevent editing approval rules in merge requests](../user/project/merge_requests/approvals/settings.md#prevent-editing-approval-rules-in-merge-requests).
+- [Remove all approvals when commits are added to the source branch](../user/project/merge_requests/approvals/settings.md#remove-all-approvals-when-commits-are-added-to-the-source-branch)
+
+ There are scenarios such as rebasing locally or applying suggestions that are considered
+ the same as adding a commit and could reset existing approvals. Approvals are not removed
+ when rebasing from the UI or with the [`/rebase` quick action](../user/project/quick_actions.md).
+
When ready to merge:
WARNING:
diff --git a/doc/development/service_ping/implement.md b/doc/development/service_ping/implement.md
index 561595d2048..8c04992fd67 100644
--- a/doc/development/service_ping/implement.md
+++ b/doc/development/service_ping/implement.md
@@ -620,7 +620,7 @@ alt_usage_data(999)
### Add counters to build new metrics
When adding the results of two counters, use the `add` Service Data method that
-handles fallback values and exceptions. It also generates a valid [SQL export](index.md#export-service-ping-sql-queries-and-definitions).
+handles fallback values and exceptions. It also generates a valid [SQL export](index.md#export-service-ping-data).
Example:
diff --git a/doc/development/service_ping/index.md b/doc/development/service_ping/index.md
index 4481fe33bda..251021cd8f0 100644
--- a/doc/development/service_ping/index.md
+++ b/doc/development/service_ping/index.md
@@ -374,9 +374,9 @@ Possible values are "Amazon Aurora PostgreSQL", "PostgreSQL on Amazon RDS", "Clo
In GitLab 13.5, `pg_system_id` was added to send the [PostgreSQL system identifier](https://www.2ndquadrant.com/en/blog/support-for-postgresqls-system-identifier-in-barman/).
-## Export Service Ping SQL queries and definitions
+## Export Service Ping data
-Two Rake tasks exist to export Service Ping definitions.
+Rake tasks exist to export Service Ping data in different formats.
- The Rake tasks export the raw SQL queries for `count`, `distinct_count`, `sum`.
- The Rake tasks export the Redis counter class or the line of the Redis block for `redis_usage_data`.
@@ -385,12 +385,15 @@ Two Rake tasks exist to export Service Ping definitions.
In the home directory of your local GitLab installation run the following Rake tasks for the YAML and JSON versions respectively:
```shell
-# for YAML export
+# for YAML export of SQL queries
bin/rake gitlab:usage_data:dump_sql_in_yaml
-# for JSON export
+# for JSON export of SQL queries
bin/rake gitlab:usage_data:dump_sql_in_json
+# for JSON export of Non SQL data
+bin/rake gitlab:usage_data:dump_non_sql_in_json
+
# You may pipe the output into a file
bin/rake gitlab:usage_data:dump_sql_in_yaml > ~/Desktop/usage-metrics-2020-09-02.yaml
```
diff --git a/doc/user/admin_area/settings/sign_in_restrictions.md b/doc/user/admin_area/settings/sign_in_restrictions.md
index 7316b1bdbb8..e3fa8ba6df5 100644
--- a/doc/user/admin_area/settings/sign_in_restrictions.md
+++ b/doc/user/admin_area/settings/sign_in_restrictions.md
@@ -26,7 +26,7 @@ You can restrict the password authentication for web interface and Git over HTTP
- **Git over HTTP(S)**: When this feature is disabled, a [Personal Access Token](../../profile/personal_access_tokens.md)
or LDAP password must be used to authenticate.
-In the event of an external authentication provider outage, use the [GitLab Rails console](../../../administration/operations/rails_console.md) to [re-enable the standard web sign-in form](../../../administration/troubleshooting/gitlab_rails_cheat_sheet.md#re-enable-standard-web-sign-in-form). This configuration can also be changed over the [Application settings REST API](../../../api/settings.md#change-application-settings) while authenticating with an administrator account's personal access token.
+In the event of an external authentication provider outage, use the [GitLab Rails console](../../../administration/operations/rails_console.md) to [re-enable the standard web sign-in form](#re-enable-standard-web-sign-in-form-in-rails-console). This configuration can also be changed over the [Application settings REST API](../../../api/settings.md#change-application-settings) while authenticating with an administrator account's personal access token.
## Admin Mode
@@ -128,14 +128,14 @@ To access this text box:
Your users see the **Custom sign-in text** when they navigate to the sign-in screen for your
GitLab instance.
-<!-- ## Troubleshooting
+## Troubleshooting
-Include any troubleshooting steps that you can foresee. If you know beforehand what issues
-one might have when setting this up, or when something is changed, or on upgrading, it's
-important to describe those, too. Think of things that may go wrong and include them here.
-This is important to minimize requests for support, and to avoid doc comments with
-questions that you know someone might ask.
+### Re-enable standard web sign-in form in rails console
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
-If you have none to add when creating a doc, leave this section in place
-but commented out to help encourage others to add to it in the future. -->
+Re-enable the standard username and password-based sign-in form if it was disabled as a [Sign-in restriction](#password-authentication-enabled).
+
+You can use this method through the [rails console](../../../administration/operations/rails_console.md#starting-a-rails-console-session) when a configured external authentication provider (through SSO or an LDAP configuration) is facing an outage and direct sign-in access to GitLab is required.
+
+```ruby
+Gitlab::CurrentSettings.update!(password_authentication_enabled_for_web: true)
+```
diff --git a/doc/user/application_security/container_scanning/index.md b/doc/user/application_security/container_scanning/index.md
index 059253cc929..7963f0ce03e 100644
--- a/doc/user/application_security/container_scanning/index.md
+++ b/doc/user/application_security/container_scanning/index.md
@@ -14,6 +14,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
> - Integration with Grype as an alternative scanner [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/326279) in GitLab 14.0.
> - [Changed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/86092) the major analyzer version from `4` to `5` in GitLab 15.0.
> - [Moved](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/86783) from GitLab Ultimate to GitLab Free in 15.0.
+> - Container Scanning variables that reference Docker [renamed](https://gitlab.com/gitlab-org/gitlab/-/issues/357264) in GitLab 15.4.
Your application's Docker image may itself be based on Docker images that contain known
vulnerabilities. By including an extra Container Scanning job in your pipeline that scans for those
@@ -83,7 +84,7 @@ To enable container scanning in your pipeline, you need the following:
- [Build and push](../../packages/container_registry/index.md#build-and-push-by-using-gitlab-cicd)
the Docker image to your project's container registry.
- If you're using a third-party container registry, you might need to provide authentication
- credentials through the `DOCKER_USER` and `DOCKER_PASSWORD` [configuration variables](#available-cicd-variables).
+ credentials through the `CS_REGISTRY_USER` and `CS_REGISTRY_PASSWORD` [configuration variables](#available-cicd-variables).
For more details on how to use these variables, see [authenticate to a remote registry](#authenticate-to-a-remote-registry).
## Configuration
@@ -157,13 +158,13 @@ include:
container_scanning:
variables:
- DOCKER_IMAGE: example.com/user/image:tag
+ CS_IMAGE: example.com/user/image:tag
```
##### Authenticate to a remote registry
-Scanning an image in a private registry requires authentication. Provide the username in the `DOCKER_USER`
-variable, and the password in the `DOCKER_PASSWORD` configuration variable.
+Scanning an image in a private registry requires authentication. Provide the username in the `CS_REGISTRY_USER`
+variable, and the password in the `CS_REGISTRY_PASSWORD` configuration variable.
For example, to scan an image from AWS Elastic Container Registry:
@@ -178,9 +179,9 @@ container_scanning:
include:
- template: Security/Container-Scanning.gitlab-ci.yml
- DOCKER_IMAGE: <aws_account_id>.dkr.ecr.<region>.amazonaws.com/<image>:<tag>
- DOCKER_USER: AWS
- DOCKER_PASSWORD: "$AWS_ECR_PASSWORD"
+ CS_IMAGE: <aws_account_id>.dkr.ecr.<region>.amazonaws.com/<image>:<tag>
+ CS_REGISTRY_USER: AWS
+ CS_REGISTRY_PASSWORD: "$AWS_ECR_PASSWORD"
```
Authenticating to a remote registry is not supported when [FIPS mode](../../../development/fips_compliance.md#enable-fips-mode) is enabled.
@@ -251,7 +252,7 @@ including a large number of false positives.
| `CI_APPLICATION_REPOSITORY` | `$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG` | Docker repository URL for the image to be scanned. | All |
| `CI_APPLICATION_TAG` | `$CI_COMMIT_SHA` | Docker repository tag for the image to be scanned. | All |
| `CS_ANALYZER_IMAGE` | `registry.gitlab.com/security-products/container-scanning:5` | Docker image of the analyzer. | All |
-| `CS_DEFAULT_BRANCH_IMAGE` | `""` | The name of the `DOCKER_IMAGE` on the default branch. See [Setting the default branch image](#setting-the-default-branch-image) for more details. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/338877) in GitLab 14.5. | All |
+| `CS_DEFAULT_BRANCH_IMAGE` | `""` | The name of the `CS_IMAGE` on the default branch. See [Setting the default branch image](#setting-the-default-branch-image) for more details. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/338877) in GitLab 14.5. | All |
| `CS_DISABLE_DEPENDENCY_LIST` | `"false"` | Disable Dependency Scanning for packages installed in the scanned image. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/345434) in GitLab 14.6. | All |
| `CS_DISABLE_LANGUAGE_VULNERABILITY_SCAN` | `"true"` | Disable scanning for language-specific packages installed in the scanned image. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/345434) in GitLab 14.6. | All |
| `CS_DOCKER_INSECURE` | `"false"` | Allow access to secure Docker registries using HTTPS without validating the certificates. | All |
@@ -259,10 +260,14 @@ including a large number of false positives.
| `CS_IGNORE_UNFIXED` | `"false"` | Ignore vulnerabilities that are not fixed. | All |
| `CS_REGISTRY_INSECURE` | `"false"` | Allow access to insecure registries (HTTP only). Should only be set to `true` when testing the image locally. Works with all scanners, but the registry must listen on port `80/tcp` for Trivy to work. | All |
| `CS_SEVERITY_THRESHOLD` | `UNKNOWN` | Severity level threshold. The scanner outputs vulnerabilities with severity level higher than or equal to this threshold. Supported levels are Unknown, Low, Medium, High, and Critical. | Trivy |
-| `DOCKER_IMAGE` | `$CI_APPLICATION_REPOSITORY:$CI_APPLICATION_TAG` | The Docker image to be scanned. If set, this variable overrides the `$CI_APPLICATION_REPOSITORY` and `$CI_APPLICATION_TAG` variables. | All |
-| `DOCKER_PASSWORD` | `$CI_REGISTRY_PASSWORD` | Password for accessing a Docker registry requiring authentication. The default is only set if `$DOCKER_IMAGE` resides at [`$CI_REGISTRY`](../../../ci/variables/predefined_variables.md). Not supported when [FIPS mode](../../../development/fips_compliance.md#enable-fips-mode) is enabled. | All |
-| `DOCKER_USER` | `$CI_REGISTRY_USER` | Username for accessing a Docker registry requiring authentication. The default is only set if `$DOCKER_IMAGE` resides at [`$CI_REGISTRY`](../../../ci/variables/predefined_variables.md). Not supported when [FIPS mode](../../../development/fips_compliance.md#enable-fips-mode) is enabled. | All |
-| `DOCKERFILE_PATH` | `Dockerfile` | The path to the `Dockerfile` to use for generating remediations. By default, the scanner looks for a file named `Dockerfile` in the root directory of the project. You should configure this variable only if your `Dockerfile` is in a non-standard location, such as a subdirectory. See [Solutions for vulnerabilities](#solutions-for-vulnerabilities-auto-remediation) for more details. | All |
+| <!-- start_remove The following content will be removed on remove_date: '2023-08-22' --> `DOCKER_IMAGE` | `$CI_APPLICATION_REPOSITORY:$CI_APPLICATION_TAG` | **Deprecated** will be removed in GitLab 16.0. Replaced by `CS_IMAGE`. The Docker image to be scanned. If set, this variable overrides the `$CI_APPLICATION_REPOSITORY` and `$CI_APPLICATION_TAG` variables. | All |
+| `DOCKER_PASSWORD` | `$CI_REGISTRY_PASSWORD` | **Deprecated** will be removed in GitLab 16.0. Replaced by `CS_REGISTRY_PASSWORD`. Password for accessing a Docker registry requiring authentication. The default is only set if `$DOCKER_IMAGE` resides at [`$CI_REGISTRY`](../../../ci/variables/predefined_variables.md). Not supported when [FIPS mode](../../../development/fips_compliance.md#enable-fips-mode) is enabled. | All |
+| `DOCKER_USER` | `$CI_REGISTRY_USER` | **Deprecated** will be removed in GitLab 16.0. Replaced by `CS_REGISTRY_USER`. Username for accessing a Docker registry requiring authentication. The default is only set if `$DOCKER_IMAGE` resides at [`$CI_REGISTRY`](../../../ci/variables/predefined_variables.md). Not supported when [FIPS mode](../../../development/fips_compliance.md#enable-fips-mode) is enabled. | All |
+| `DOCKERFILE_PATH` | `Dockerfile` | **Deprecated** will be removed in GitLab 16.0. Replaced by `CS_DOCKERFILE_PATH`. The path to the `Dockerfile` to use for generating remediations. By default, the scanner looks for a file named `Dockerfile` in the root directory of the project. You should configure this variable only if your `Dockerfile` is in a non-standard location, such as a subdirectory. See [Solutions for vulnerabilities](#solutions-for-vulnerabilities-auto-remediation) for more details. | All <!-- end_remove --> |
+| `CS_IMAGE` | `$CI_APPLICATION_REPOSITORY:$CI_APPLICATION_TAG` | The Docker image to be scanned. If set, this variable overrides the `$CI_APPLICATION_REPOSITORY` and `$CI_APPLICATION_TAG` variables. | All |
+| `CS_REGISTRY_PASSWORD` | `$CI_REGISTRY_PASSWORD` | Password for accessing a Docker registry requiring authentication. The default is only set if `$CS_IMAGE` resides at [`$CI_REGISTRY`](../../../ci/variables/predefined_variables.md). Not supported when [FIPS mode](../../../development/fips_compliance.md#enable-fips-mode) is enabled. | All |
+| `CS_REGISTRY_USER` | `$CI_REGISTRY_USER` | Username for accessing a Docker registry requiring authentication. The default is only set if `$CS_IMAGE` resides at [`$CI_REGISTRY`](../../../ci/variables/predefined_variables.md). Not supported when [FIPS mode](../../../development/fips_compliance.md#enable-fips-mode) is enabled. | All |
+| `CS_DOCKERFILE_PATH` | `Dockerfile` | The path to the `Dockerfile` to use for generating remediations. By default, the scanner looks for a file named `Dockerfile` in the root directory of the project. You should configure this variable only if your `Dockerfile` is in a non-standard location, such as a subdirectory. See [Solutions for vulnerabilities](#solutions-for-vulnerabilities-auto-remediation) for more details. | All |
| `SECURE_LOG_LEVEL` | `info` | Set the minimum logging level. Messages of this logging level or higher are output. From highest to lowest severity, the logging levels are: `fatal`, `error`, `warn`, `info`, `debug`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/10880) in GitLab 13.1. | All |
### Supported distributions
@@ -309,7 +314,7 @@ Starting with GitLab 14.10, `-fips` is automatically added to `CS_ANALYZER_IMAGE
enabled in the GitLab instance.
Container scanning of images in authenticated registries is not supported when [FIPS mode](../../../development/fips_compliance.md#enable-fips-mode)
-is enabled. When `CI_GITLAB_FIPS_MODE` is `"true"`, and `DOCKER_USER` or `DOCKER_PASSWORD` is set,
+is enabled. When `CI_GITLAB_FIPS_MODE` is `"true"`, and `CS_REGISTRY_USER` or `CS_REGISTRY_PASSWORD` is set,
the analyzer exits with an error and does not perform the scan.
### Enable Container Scanning through an automatic merge request
@@ -426,14 +431,14 @@ container_scanning:
variables:
CS_DEFAULT_BRANCH_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
before_script:
- - export DOCKER_IMAGE="$CI_REGISTRY_IMAGE/$CI_COMMIT_BRANCH:$CI_COMMIT_SHA"
+ - export CS_IMAGE="$CI_REGISTRY_IMAGE/$CI_COMMIT_BRANCH:$CI_COMMIT_SHA"
- |
if [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then
- export DOCKER_IMAGE="$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA"
+ export CS_IMAGE="$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA"
fi
```
-`CS_DEFAULT_BRANCH_IMAGE` should remain the same for a given `DOCKER_IMAGE`. If it changes, then a
+`CS_DEFAULT_BRANCH_IMAGE` should remain the same for a given `CS_IMAGE`. If it changes, then a
duplicate set of vulnerabilities are created, which must be manually dismissed.
When using [Auto DevOps](../../../topics/autodevops/index.md), `CS_DEFAULT_BRANCH_IMAGE` is
@@ -500,7 +505,7 @@ This example excludes from `gl-container-scanning-report.json`:
- `generalallowlist` block allows you to specify CVE IDs globally. All vulnerabilities with matching CVE IDs are excluded from the scan report.
-- `images` block allows you to specify CVE IDs for each container image independently. All vulnerabilities from the given image with matching CVE IDs are excluded from the scan report. The image name is retrieved from one of the environment variables used to specify the Docker image to be scanned, such as `$CI_APPLICATION_REPOSITORY:$CI_APPLICATION_TAG` or `DOCKER_IMAGE`. The image provided in this block **must** match this value and **must not** include the tag value. For example, if you specify the image to be scanned using `DOCKER_IMAGE=alpine:3.7`, then you would use `alpine` in the `images` block, but you cannot use `alpine:3.7`.
+- `images` block allows you to specify CVE IDs for each container image independently. All vulnerabilities from the given image with matching CVE IDs are excluded from the scan report. The image name is retrieved from one of the environment variables used to specify the Docker image to be scanned, such as `$CI_APPLICATION_REPOSITORY:$CI_APPLICATION_TAG` or `CS_IMAGE`. The image provided in this block **must** match this value and **must not** include the tag value. For example, if you specify the image to be scanned using `CS_IMAGE=alpine:3.7`, then you would use `alpine` in the `images` block, but you cannot use `alpine:3.7`.
You can specify container image in multiple ways:
@@ -650,7 +655,7 @@ To scan an image in an external private registry, you must configure access cred
container scanning analyzer can authenticate itself before attempting to access the image to scan.
If you use the GitLab [Container Registry](../../packages/container_registry/index.md),
-the `DOCKER_USER` and `DOCKER_PASSWORD` [configuration variables](#available-cicd-variables)
+the `CS_REGISTRY_USER` and `CS_REGISTRY_PASSWORD` [configuration variables](#available-cicd-variables)
are set automatically and you can skip this configuration.
This example shows the configuration needed to scan images in a private [Google Container Registry](https://cloud.google.com/container-registry/):
@@ -661,9 +666,9 @@ include:
container_scanning:
variables:
- DOCKER_USER: _json_key
- DOCKER_PASSWORD: "$GCP_CREDENTIALS"
- DOCKER_IMAGE: "gcr.io/path-to-you-registry/image:tag"
+ CS_REGISTRY_USER: _json_key
+ CS_REGISTRY_PASSWORD: "$GCP_CREDENTIALS"
+ CS_IMAGE: "gcr.io/path-to-you-registry/image:tag"
```
Before you commit this configuration, [add a CI/CD variable](../../../ci/variables/index.md#add-a-cicd-variable-to-a-project)
@@ -772,7 +777,7 @@ Some vulnerabilities can be fixed by applying the solution that GitLab
automatically generates.
To enable remediation support, the scanning tool _must_ have access to the `Dockerfile` specified by
-the [`DOCKERFILE_PATH`](#available-cicd-variables) CI/CD variable. To ensure that the scanning tool
+the [`CS_DOCKERFILE_PATH`](#available-cicd-variables) CI/CD variable. To ensure that the scanning tool
has access to this
file, it's necessary to set [`GIT_STRATEGY: fetch`](../../../ci/runners/configure_runners.md#git-strategy) in
your `.gitlab-ci.yml` file by following the instructions described in this document's
diff --git a/doc/user/project/issues/confidential_issues.md b/doc/user/project/issues/confidential_issues.md
index 402ce4bebec..5a1e66c8f7d 100644
--- a/doc/user/project/issues/confidential_issues.md
+++ b/doc/user/project/issues/confidential_issues.md
@@ -22,7 +22,7 @@ confidential checkbox and hit **Save changes**.
When you create a confidential issue in a project, the project becomes listed in the **Contributed projects** section in your [profile](../../profile/index.md). **Contributed projects** does not show information about the confidential issue; it only shows the project name.
-![Creating a new confidential issue](img/confidential_issues_create.png)
+![Creating a new confidential issue](img/confidential_issues_create_v15_4.png)
## Modify issue confidentiality
@@ -39,9 +39,12 @@ The second way is to locate the **Confidentiality** section in the sidebar and s
| ![Turn off confidentiality](img/turn_off_confidentiality_v15_1.png) | ![Turn on confidentiality](img/turn_on_confidentiality_v15_1.png) |
Every change from regular to confidential and vice versa, is indicated by a
-system note in the issue's comments.
+system note in the issue's comments:
-![Confidential issues system notes](img/confidential_issues_system_notes.png)
+![Confidential issues system notes](img/confidential_issues_system_notes_v15_4.png)
+
+- **{eye-slash}** The issue is made confidential.
+- **{eye}** The issue is made public.
When an issue is made confidential, only users with at least the Reporter role
for the project have access to the issue.
@@ -51,7 +54,7 @@ the issue even if they were actively participating before the change.
## Confidential issue indicators
There are a few things that visually separate a confidential issue from a
-regular one. In the issues index page view, you can see the eye-slash (**{eye-slash}**) icon
+regular one. In the issues index page view, you can see the confidential (**{eye-slash}**) icon
next to the issues that are marked as confidential:
![Confidential issues index page](img/confidential_issues_index_page.png)
@@ -61,7 +64,7 @@ you cannot see confidential issues at all.
---
-Likewise, while inside the issue, you can see the eye-slash icon right next to
+Likewise, while inside the issue, you can see the confidential (**{eye-slash}**) icon right next to
the issue number. There is also an indicator in the comment area that the
issue you are commenting on is confidential.
diff --git a/doc/user/project/issues/img/confidential_issues_create.png b/doc/user/project/issues/img/confidential_issues_create.png
deleted file mode 100644
index 0a141eb39f8..00000000000
--- a/doc/user/project/issues/img/confidential_issues_create.png
+++ /dev/null
Binary files differ
diff --git a/doc/user/project/issues/img/confidential_issues_create_v15_4.png b/doc/user/project/issues/img/confidential_issues_create_v15_4.png
new file mode 100644
index 00000000000..ff489ad8605
--- /dev/null
+++ b/doc/user/project/issues/img/confidential_issues_create_v15_4.png
Binary files differ
diff --git a/doc/user/project/issues/img/confidential_issues_system_notes.png b/doc/user/project/issues/img/confidential_issues_system_notes.png
deleted file mode 100644
index 355be80ecb6..00000000000
--- a/doc/user/project/issues/img/confidential_issues_system_notes.png
+++ /dev/null
Binary files differ
diff --git a/doc/user/project/issues/img/confidential_issues_system_notes_v15_4.png b/doc/user/project/issues/img/confidential_issues_system_notes_v15_4.png
new file mode 100644
index 00000000000..e448f609112
--- /dev/null
+++ b/doc/user/project/issues/img/confidential_issues_system_notes_v15_4.png
Binary files differ
diff --git a/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml b/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml
index 3d7883fb87a..79a08c33fdf 100644
--- a/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml
+++ b/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml
@@ -11,12 +11,12 @@
#
# Requirements:
# - A `test` stage to be present in the pipeline.
-# - You must define the image to be scanned in the DOCKER_IMAGE variable. If DOCKER_IMAGE is the
+# - You must define the image to be scanned in the CS_IMAGE variable. If CS_IMAGE is the
# same as $CI_APPLICATION_REPOSITORY:$CI_APPLICATION_TAG, you can skip this.
-# - Container registry credentials defined by `DOCKER_USER` and `DOCKER_PASSWORD` variables if the
+# - Container registry credentials defined by `CS_REGISTRY_USER` and `CS_REGISTRY_PASSWORD` variables if the
# image to be scanned is in a private registry.
# - For auto-remediation, a readable Dockerfile in the root of the project or as defined by the
-# DOCKERFILE_PATH variable.
+# CS_DOCKERFILE_PATH variable.
#
# Configure container scanning with CI/CD variables (https://docs.gitlab.com/ee/ci/variables/index.html).
# List of available variables: https://docs.gitlab.com/ee/user/application_security/container_scanning/#available-variables
diff --git a/lib/tasks/gitlab/usage_data.rake b/lib/tasks/gitlab/usage_data.rake
index ab06ce15235..da8443a2406 100644
--- a/lib/tasks/gitlab/usage_data.rake
+++ b/lib/tasks/gitlab/usage_data.rake
@@ -17,6 +17,11 @@ namespace :gitlab do
puts Gitlab::Json.pretty_generate(Gitlab::Usage::ServicePingReport.for(output: :all_metrics_values))
end
+ desc 'GitLab | UsageData | Generate non SQL data for usage ping in JSON'
+ task dump_non_sql_in_json: :environment do
+ puts Gitlab::Json.pretty_generate(Gitlab::Usage::ServicePingReport.for(output: :non_sql_metrics_values))
+ end
+
desc 'GitLab | UsageData | Generate usage ping and send it to Versions Application'
task generate_and_send: :environment do
result = ServicePing::SubmitService.new.execute
diff --git a/spec/tasks/gitlab/usage_data_rake_spec.rb b/spec/tasks/gitlab/usage_data_rake_spec.rb
index f05b7876fdb..207a9884090 100644
--- a/spec/tasks/gitlab/usage_data_rake_spec.rb
+++ b/spec/tasks/gitlab/usage_data_rake_spec.rb
@@ -31,6 +31,12 @@ RSpec.describe 'gitlab:usage data take tasks', :silence_stdout do
end
end
+ describe 'dump_non_sql_in_json' do
+ it 'dumps non SQL data in json format' do
+ expect { run_rake_task('gitlab:usage_data:dump_non_sql_in_json') }.to output(/.*"recorded_at":.*/).to_stdout
+ end
+ end
+
describe 'generate_sql_metrics_fixture' do
it 'generates fixture file correctly' do
run_rake_task('gitlab:usage_data:generate_sql_metrics_queries')