Skip to content

Commit f0e9d20

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 0ea2d99 commit f0e9d20

File tree

25 files changed

+119
-373
lines changed

25 files changed

+119
-373
lines changed

.rubocop_todo/gitlab/namespaced_class.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,6 @@ Gitlab/NamespacedClass:
854854
- 'ee/app/controllers/sitemap_controller.rb'
855855
- 'ee/app/controllers/smartcard_controller.rb'
856856
- 'ee/app/controllers/subscriptions_controller.rb'
857-
- 'ee/app/controllers/survey_responses_controller.rb'
858857
- 'ee/app/controllers/trial_registrations_controller.rb'
859858
- 'ee/app/controllers/trials_controller.rb'
860859
- 'ee/app/finders/audit_event_finder.rb'

.rubocop_todo/layout/line_length.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2691,7 +2691,6 @@ Layout/LineLength:
26912691
- 'ee/spec/requests/rack_attack_global_spec.rb'
26922692
- 'ee/spec/requests/repositories/git_http_controller_spec.rb'
26932693
- 'ee/spec/requests/smartcard_controller_spec.rb'
2694-
- 'ee/spec/requests/survey_responses_controller_spec.rb'
26952694
- 'ee/spec/routing/admin_routing_spec.rb'
26962695
- 'ee/spec/routing/group_routing_spec.rb'
26972696
- 'ee/spec/routing/groups/cadences_routing_spec.rb'

.rubocop_todo/layout/space_inside_block_braces.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ Layout/SpaceInsideBlockBraces:
191191
- 'ee/spec/requests/groups/contribution_analytics_spec.rb'
192192
- 'ee/spec/requests/lfs_http_spec.rb'
193193
- 'ee/spec/requests/projects/security/policies_controller_spec.rb'
194-
- 'ee/spec/requests/survey_responses_controller_spec.rb'
195194
- 'ee/spec/serializers/member_user_entity_spec.rb'
196195
- 'ee/spec/serializers/merge_request_poll_widget_entity_spec.rb'
197196
- 'ee/spec/serializers/vulnerabilities/finding_reports_comparer_entity_spec.rb'

.rubocop_todo/layout/space_inside_parens.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ Layout/SpaceInsideParens:
129129
- 'ee/spec/requests/api/ldap_group_links_spec.rb'
130130
- 'ee/spec/requests/api/project_milestones_spec.rb'
131131
- 'ee/spec/requests/customers_dot/proxy_controller_spec.rb'
132-
- 'ee/spec/requests/survey_responses_controller_spec.rb'
133132
- 'ee/spec/serializers/member_user_entity_spec.rb'
134133
- 'ee/spec/services/app_sec/dast/profiles/create_service_spec.rb'
135134
- 'ee/spec/services/app_sec/dast/site_profile_secret_variables/create_or_update_service_spec.rb'

.rubocop_todo/style/percent_literal_delimiters.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ Style/PercentLiteralDelimiters:
140140
- 'app/models/resource_timebox_event.rb'
141141
- 'app/models/user.rb'
142142
- 'app/models/user_interacted_project.rb'
143-
- 'app/models/users/in_product_marketing_email.rb'
144143
- 'app/policies/identity_provider_policy.rb'
145144
- 'app/presenters/dev_ops_report/metric_presenter.rb'
146145
- 'app/presenters/search_service_presenter.rb'

app/models/users/in_product_marketing_email.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class InProductMarketingEmail < ApplicationRecord
4141

4242
# Tracks we don't send emails for (e.g. unsuccessful experiment). These
4343
# are kept since we already have DB records that use the enum value.
44-
INACTIVE_TRACK_NAMES = %w(invite_team).freeze
44+
INACTIVE_TRACK_NAMES = %w[invite_team experience].freeze
4545
ACTIVE_TRACKS = tracks.except(*INACTIVE_TRACK_NAMES)
4646

4747
scope :for_user_with_track_and_series, -> (user, track, series) do

app/services/namespaces/in_product_marketing_emails_service.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ class InProductMarketingEmailsService
3737
interval_days: [1, 5, 10],
3838
completed_actions: [:git_write, :pipeline_created, :trial_started],
3939
incomplete_actions: [:user_added]
40-
},
41-
experience: {
42-
interval_days: [30],
43-
completed_actions: [:created, :git_write],
44-
incomplete_actions: []
4540
}
4641
}.freeze
4742

config/metrics/counts_all/20210518081225_in_product_marketing_email_experience_0_sent.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ product_stage: growth
88
product_group: activation
99
product_category: onboarding
1010
value_type: number
11-
status: active
11+
status: removed
1212
milestone: "13.12"
1313
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/61347
14+
removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/92280
15+
milestone_removed: "15.2"
1416
time_frame: all
1517
data_source: database
1618
distribution:

config/routes.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,6 @@
190190
scope '/push_from_secondary/:geo_node_id' do
191191
draw :git_http
192192
end
193-
194-
# Used for survey responses
195-
resources :survey_responses, only: :index
196193
end
197194

198195
Gitlab.jh do
Binary file not shown.
Binary file not shown.

doc/user/application_security/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@ From the merge request security widget, select **Expand** to unfold the widget,
222222

223223
## View security scan information in the pipeline Security tab
224224

225-
A pipeline's security tab lists all findings in the current branch. It includes new findings introduced by this branch and existing vulnerabilities that were already present when the branch was created. These results likely do not match the findings displayed in the Merge Request security widget as those do not include the existing vulnerabilities (with the exception of showing any existing vulnerabilities that are no longer detected in the feature branch).
226-
227-
For more details, see [security tab](vulnerability_report/pipeline.md#view-vulnerabilities-in-a-pipeline).
225+
A pipeline's security tab lists all findings in the current branch. It includes new findings introduced by this branch
226+
and existing vulnerabilities already present when you created the branch. These results likely do not match the findings
227+
displayed in the Merge Request security widget, as those do not include the existing vulnerabilities. Refer to [View vulnerabilities in a pipeline](vulnerability_report/pipeline.md) for more information.
228228

229229
## View security scan information in the Security Dashboard
230230

doc/user/application_security/vulnerability_report/pipeline.md

Lines changed: 103 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,32 @@ To view vulnerabilities in a pipeline:
1616
1. From the list, select the pipeline you want to check for vulnerabilities.
1717
1. Select the **Security** tab.
1818

19-
**Scan details** shows vulnerabilities introduced by the merge request, in addition to existing vulnerabilities
20-
from the latest successful pipeline in your project's default branch.
19+
A pipeline consists of multiple jobs, which may include security scans. When a job declares and produces security scan
20+
reports using [`artifacts:reports`](../../../ci/yaml/artifacts_reports.md), GitLab parses and ingests the contents of
21+
these reports to create vulnerabilities associated with the project the pipeline belongs to.
2122

22-
A pipeline consists of multiple jobs, such as SAST and DAST scans. If a job fails to finish,
23-
the security dashboard doesn't show SAST scanner output. For example, if the SAST
24-
job finishes but the DAST job fails, the security dashboard doesn't show SAST results. On failure,
25-
the analyzer outputs an [exit code](../../../development/integrations/secure.md#exit-code).
23+
If a job fails to finish, the pipeline vulnerability report doesn't show vulnerability findings detected by this job.
24+
For example, if a pipeline contains DAST and SAST jobs, but the DAST job fails by returning a non-zero
25+
[exit code](../../../development/integrations/secure.md#exit-code), the report doesn't show DAST results.
2626

27-
## View total number of vulnerabilities per scan
27+
The pipeline vulnerability report only shows results contained in the security report artifacts. This report differs from
28+
the [Vulnerability Report](index.md), which contains cumulative results of all successful jobs, and from the merge request
29+
[security widget](../#view-security-scan-information-in-merge-requests), which combines the branch results with
30+
cumulative results.
2831

29-
To view the total number of vulnerabilities per scan:
32+
Before GitLab displays results, the vulnerability findings in all pipeline reports are [deduplicated](#deduplication-process).
3033

31-
1. On the top bar, select **Menu > Projects** and find your project.
32-
1. On the left sidebar, select **CI/CD > Pipelines**.
33-
1. Select the **Status** of a branch.
34-
1. Select the **Security** tab.
34+
## Scan details
35+
36+
**Scan details** shows a summary of vulnerability findings in the pipeline and the source reports.
37+
38+
GitLab displays one row of information for each [scan type](../terminology/#scan-type-report-type) artifact present in
39+
the pipeline.
3540

36-
**Scan details** shows vulnerabilities introduced by the merge request, in addition to existing vulnerabilities
37-
from the latest successful pipeline in your project's default branch.
41+
Note that each scan type's total number of vulnerabilities includes dismissed findings. If the number of findings
42+
in the report doesn't match the number in **Scan details**, ensure that **Hide dismissed** is disabled.
3843

39-
## Download security scan outputs
44+
### Download security scan outputs
4045

4146
> - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/3728) in GitLab 13.10.
4247
> - [Improved](https://gitlab.com/gitlab-org/gitlab/-/issues/333660) in GitLab 14.2.
@@ -48,10 +53,89 @@ Depending on the type of security scanner, you can download:
4853

4954
To download a security scan output:
5055

51-
1. On the top bar, select **Menu > Projects** and find your project.
52-
1. On the left sidebar, select **CI/CD > Pipelines**.
53-
1. Select the **Status** of a branch.
54-
1. Select the **Security** tab.
5556
1. In **Scan details**, select **Download results**:
5657
- To download a JSON file, select the JSON artifact.
5758
- To download a CSV file, select **Download scanned resources**.
59+
60+
## Scan results
61+
62+
This shows a list of the combined results for all security report artifacts. The filters work like the
63+
[Vulnerability Report filters](index.md#vulnerability-report-filters), but they are limited to **Severity** and **Tool**, with
64+
the addition of a **Hide dismissed** toggle.
65+
66+
When you review the vulnerability findings reported in the pipeline, you can select one or more entries for dismissal,
67+
similar to [Dismissing a vulnerability](index.md#dismissing-a-vulnerability) in the Vulnerability Report.
68+
69+
When you merge the branch corresponding to the pipeline into the default branch, all reported findings are combined into
70+
the [Vulnerability Report](index.md). Scan results in pipelines executed on the default branch are
71+
incorporated once the pipeline finishes.
72+
73+
| Existing vulnerability status | Dismissed in pipeline? | New vulnerability status |
74+
|:------------------------------|:-----------------------|:-------------------------|
75+
| any | Yes | Dismissed |
76+
| Dismissed | any | Dismissed |
77+
| Confirmed | No | Confirmed |
78+
| Needs triage (Detected) | No | Needs triage (Detected) |
79+
| Resolved | No | Needs triage (Detected) |
80+
| N/A (i.e.: new vulnerability) | No | Needs triage (Detected) |
81+
82+
## Deduplication process
83+
84+
When a pipeline contains jobs that produce multiple security reports of the same type, it is possible that the same
85+
vulnerability finding is present in multiple reports. This duplication is common when different scanners are used to
86+
increase coverage. The deduplication process allows you to maximize the vulnerability scanning coverage while reducing
87+
the number of findings you need to manage.
88+
89+
A finding is considered a duplicate of another finding when their [scan type](../terminology/#scan-type-report-type),
90+
[location](../terminology/#location-fingerprint) and
91+
[identifiers](../../../development/integrations/secure.md#identifiers) are the same.
92+
93+
The scan type must match because each can have its own definition for the location of a vulnerability. For example,
94+
static analyzers are able to locate a file path and line number, whereas a container scanning analyzer uses the image
95+
name instead.
96+
97+
When comparing identifiers, GitLab does not compare `CWE` and `WASC` during deduplication because they are
98+
"type identifiers" and are used to classify groups of vulnerabilities. Including these identifiers results in
99+
many findings being incorrectly considered duplicates.
100+
101+
In a set of duplicated findings, the first occurrence of a finding is kept and the remaining are skipped. Security
102+
reports are processed in alphabetical file path order, and findings are processed sequentially in the order they
103+
appear in a report.
104+
105+
### Deduplication examples
106+
107+
- Example 1: matching identifiers and location, mismatching scan type.
108+
- Finding
109+
- Scan type: `sast`
110+
- Location fingerprint: `adc83b19e793491b1c6ea0fd8b46cd9f32e592fc`
111+
- Identifiers: CVE-2022-25510
112+
- Other Finding
113+
- Scan type: `secret_detection`
114+
- Location fingerprint: `adc83b19e793491b1c6ea0fd8b46cd9f32e592fc`
115+
- Identifiers: CVE-2022-25510
116+
- Deduplication result: not duplicates because the scan type is different.
117+
- Example 2: matching location and scan type, mismatching type identifiers.
118+
- Finding
119+
- Scan type: `sast`
120+
- Location fingerprint: `adc83b19e793491b1c6ea0fd8b46cd9f32e592fc`
121+
- Identifiers: CWE-259
122+
- Other Finding
123+
- Scan type: `sast`
124+
- Location fingerprint: `adc83b19e793491b1c6ea0fd8b46cd9f32e592fc`
125+
- Identifiers: CWE-798
126+
- Deduplication result: duplicates because `CWE` identifiers are ignored.
127+
- Example 3: matching scan type, location and identifiers.
128+
- Finding
129+
- Scan type: `container_scanning`
130+
- Location fingerprint: `adc83b19e793491b1c6ea0fd8b46cd9f32e592fc`
131+
- Identifiers: CVE-2022-25510, CWE-259
132+
- Other Finding
133+
- Scan type: `container_scanning`
134+
- Location fingerprint: `adc83b19e793491b1c6ea0fd8b46cd9f32e592fc`
135+
- Identifiers: CVE-2022-25510, CWE-798
136+
- Deduplication result: duplicates because all criteria match, and type identifiers are ignored.
137+
138+
The examples above don't include the raw location values. Each scan type defines its own
139+
`fingerprint_data`, which is used to generate a `SHA1` hash that is used as the `location_fingerprint`.
140+
You can find definitions for each scan type [`gitlab/lib/gitlab/ci/reports/security/locations`](https://gitlab.com/gitlab-org/gitlab/-/tree/01c69e97340b7c1c7e30c0caec8506910b6503c8/lib/gitlab/ci/reports/security/locations)
141+
and [`gitlab/ee/lib/gitlab/ci/reports/security/locations`](https://gitlab.com/gitlab-org/gitlab/-/tree/01c69e97340b7c1c7e30c0caec8506910b6503c8/ee/lib/gitlab/ci/reports/security/locations).
Binary file not shown.
Binary file not shown.

doc/user/project/code_owners.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ Inviting **Subgroup Y** to a parent group of **Project A**
8585
[is not supported](https://gitlab.com/gitlab-org/gitlab/-/issues/288851). To set **Subgroup Y** as
8686
Code Owners, add this group directly to the project itself.
8787

88+
NOTE:
89+
For approval to be required, groups as Code Owners must have a direct membership
90+
(not inherited membership) in the project. Approval can only be optional for groups
91+
that inherit membership. Members in the Code Owners group also must be direct members,
92+
and not inherit membership from any parent groups.
93+
8894
### Add a group as a Code Owner
8995

9096
To set a group as a Code Owner:

lib/gitlab/email/message/in_product_marketing/experience.rb

Lines changed: 0 additions & 92 deletions
This file was deleted.

0 commit comments

Comments
 (0)