Skip to content

Commit 3351b23

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent a1eee0f commit 3351b23

File tree

47 files changed

+236
-87
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+236
-87
lines changed

app/assets/javascripts/ci/pipeline_details/graph/components/linked_pipeline.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,10 @@ export default {
300300
/>
301301
<div v-else class="gl-pr-3"><gl-loading-icon size="sm" inline /></div>
302302
<div class="gl-flex gl-min-w-0 gl-flex-1 gl-flex-col">
303-
<span class="gl-whitespace-normal" data-testid="downstream-title-content">
303+
<span
304+
class="gl-whitespace-normal gl-wrap-anywhere"
305+
data-testid="downstream-title-content"
306+
>
304307
{{ downstreamTitle }}
305308
</span>
306309
<div class="gl-truncate">

app/assets/javascripts/groups_projects/components/tabs_with_list.vue

+39-33
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script>
22
import { GlTabs, GlTab, GlBadge, GlFilteredSearchToken } from '@gitlab/ui';
3-
import { isEqual, pick } from 'lodash';
3+
import { isEqual, pick, get } from 'lodash';
44
import { __ } from '~/locale';
55
import { QUERY_PARAM_END_CURSOR, QUERY_PARAM_START_CURSOR } from '~/graphql_shared/constants';
66
import { numberToMetricPrefix } from '~/lib/utils/number_utils';
@@ -9,7 +9,6 @@ import FilteredSearchAndSort from '~/groups_projects/components/filtered_search_
99
import { calculateGraphQLPaginationQueryParams } from '~/graphql_shared/utils';
1010
import { OPERATORS_IS } from '~/vue_shared/components/filtered_search_bar/constants';
1111
import { ACCESS_LEVEL_OWNER_INTEGER } from '~/access_level/constants';
12-
import projectCountsQuery from '~/projects/your_work/graphql/queries/project_counts.query.graphql';
1312
import * as Sentry from '~/sentry/sentry_browser_wrapper';
1413
import { InternalEvents } from '~/tracking';
1514
import {
@@ -26,9 +25,6 @@ const trackingMixin = InternalEvents.mixin();
2625
// Will be made more generic to work with groups and projects in future commits
2726
export default {
2827
name: 'TabsWithList',
29-
i18n: {
30-
projectCountError: __('An error occurred loading the project counts.'),
31-
},
3228
components: {
3329
GlTabs,
3430
GlTab,
@@ -98,44 +94,30 @@ export default {
9894
return {};
9995
},
10096
},
97+
tabCountsQuery: {
98+
type: Object,
99+
required: false,
100+
default() {
101+
return {};
102+
},
103+
},
104+
tabCountsQueryErrorMessage: {
105+
type: String,
106+
required: false,
107+
default: __('An error occurred loading the tab counts.'),
108+
},
101109
},
102110
data() {
103111
return {
104112
activeTabIndex: this.initActiveTabIndex(),
105-
counts: this.tabs.reduce((accumulator, tab) => {
113+
tabCounts: this.tabs.reduce((accumulator, tab) => {
106114
return {
107115
...accumulator,
108116
[tab.value]: undefined,
109117
};
110118
}, {}),
111119
};
112120
},
113-
apollo: {
114-
counts() {
115-
return {
116-
query: projectCountsQuery,
117-
update(response) {
118-
const {
119-
currentUser: { contributed, starred },
120-
personal,
121-
member,
122-
inactive,
123-
} = response;
124-
125-
return {
126-
contributed: contributed.count,
127-
starred: starred.count,
128-
personal: personal.count,
129-
member: member.count,
130-
inactive: inactive.count,
131-
};
132-
},
133-
error(error) {
134-
createAlert({ message: this.$options.i18n.projectCountError, error, captureError: true });
135-
},
136-
};
137-
},
138-
},
139121
computed: {
140122
activeTab() {
141123
return this.tabs[this.activeTabIndex];
@@ -233,6 +215,30 @@ export default {
233215
return this.timestampTypeMap[this.activeSortOption.value];
234216
},
235217
},
218+
async created() {
219+
if (!Object.keys(this.tabCountsQuery).length) {
220+
return;
221+
}
222+
223+
try {
224+
const { data } = await this.$apollo.query({ query: this.tabCountsQuery });
225+
226+
this.tabCounts = this.tabs.reduce((accumulator, tab) => {
227+
const { count } = get(data, tab.countsQueryPath);
228+
229+
return {
230+
...accumulator,
231+
[tab.value]: count,
232+
};
233+
}, {});
234+
} catch (error) {
235+
createAlert({
236+
message: this.tabCountsQueryErrorMessage,
237+
error,
238+
captureError: true,
239+
});
240+
}
241+
},
236242
methods: {
237243
numberToMetricPrefix,
238244
createSortQuery({ sortBy, isAscending }) {
@@ -267,7 +273,7 @@ export default {
267273
this.trackEvent(this.eventTracking.tabs, { label: tab.text });
268274
},
269275
tabCount(tab) {
270-
return this.counts[tab.value];
276+
return this.tabCounts[tab.value];
271277
},
272278
shouldShowCountBadge(tab) {
273279
return this.tabCount(tab) !== undefined;

app/assets/javascripts/projects/your_work/components/app.vue

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
TIMESTAMP_TYPE_CREATED_AT,
1717
TIMESTAMP_TYPE_LAST_ACTIVITY_AT,
1818
} from '~/vue_shared/components/resource_lists/constants';
19+
import projectCountsQuery from '../graphql/queries/project_counts.query.graphql';
1920
import { PROJECT_DASHBOARD_TABS, FIRST_TAB_ROUTE_NAMES } from '../constants';
2021
2122
export default {
@@ -44,6 +45,7 @@ export default {
4445
tabs: 'click_tab_on_your_work_projects',
4546
sort: 'click_sort_on_your_work_projects',
4647
},
48+
tabCountsQuery: projectCountsQuery,
4749
name: 'YourWorkProjectsApp',
4850
components: {
4951
TabsWithList,
@@ -75,5 +77,7 @@ export default {
7577
:initial-sort="initialSort"
7678
:programming-languages="programmingLanguages"
7779
:event-tracking="$options.eventTracking"
80+
:tab-counts-query="$options.tabCountsQuery"
81+
:tab-counts-query-error-message="__('An error occurred loading the project counts.')"
7882
/>
7983
</template>

app/assets/javascripts/projects/your_work/constants.js

+5
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export const CONTRIBUTED_TAB = {
2727
query: userProjectsQuery,
2828
variables: { contributed: true },
2929
queryPath: 'currentUser.contributedProjects',
30+
countsQueryPath: 'currentUser.contributed',
3031
emptyStateComponentProps: {
3132
title: s__("Projects|You haven't contributed to any projects yet."),
3233
description: s__(
@@ -43,6 +44,7 @@ export const STARRED_TAB = {
4344
query: userProjectsQuery,
4445
variables: { starred: true },
4546
queryPath: 'currentUser.starredProjects',
47+
countsQueryPath: 'currentUser.starred',
4648
emptyStateComponentProps: {
4749
title: s__("Projects|You haven't starred any projects yet."),
4850
description: s__(
@@ -59,6 +61,7 @@ export const PERSONAL_TAB = {
5961
query: projectsQuery,
6062
variables: { personal: true },
6163
queryPath: 'projects',
64+
countsQueryPath: 'personal',
6265
emptyStateComponentProps: {
6366
title: s__("Projects|You don't have any personal projects yet."),
6467
},
@@ -71,6 +74,7 @@ export const MEMBER_TAB = {
7174
query: projectsQuery,
7275
variables: { membership: true },
7376
queryPath: 'projects',
77+
countsQueryPath: 'member',
7478
emptyStateComponentProps: {
7579
title: s__("Projects|You aren't a member of any projects yet."),
7680
},
@@ -83,6 +87,7 @@ export const INACTIVE_TAB = {
8387
query: projectsQuery,
8488
variables: { archived: 'ONLY', membership: true },
8589
queryPath: 'projects',
90+
countsQueryPath: 'inactive',
8691
emptyStateComponentProps: {
8792
title: s__("Projects|You don't have any inactive projects."),
8893
description: s__('Projects|Projects that are archived or pending deletion will appear here.'),

app/views/projects/settings/ci_cd/_form.html.haml

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
s_("CICD|Use separate caches for protected branches"),
3737
help_text: (s_('CICD|Unprotected branches will not have access to the cache from protected branches.') + ' ' + help_link_separated_caches).html_safe
3838

39+
= render_if_exists 'projects/settings/ci_cd/composite_identities_pipelines', form: f
3940
= render_if_exists 'projects/settings/ci_cd/pipeline_cancelation', form: f
4041

4142
.form-group

danger/plugins/remote_development.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# frozen_string_literal: true
22

3-
require_relative '../../tooling/danger/remote_development/desired_config_generator'
3+
require_relative '../../tooling/danger/remote_development/desired_config_generator_suggestor'
44

55
module Danger
66
class RemoteDevelopment < ::Danger::Plugin
7-
include Tooling::Danger::RemoteDevelopment::DesiredConfigGenerator
7+
include Tooling::Danger::RemoteDevelopment::DesiredConfigGeneratorSuggestor
88
end
99
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# frozen_string_literal: true
2+
3+
class CreateAiTroubleshootJobEventsTable < ClickHouse::Migration
4+
def up
5+
execute <<-SQL
6+
CREATE TABLE IF NOT EXISTS troubleshoot_job_events
7+
(
8+
user_id UInt64 NOT NULL DEFAULT 0,
9+
timestamp DateTime64(6, 'UTC') NOT NULL DEFAULT now64(),
10+
job_id UInt64 NOT NULL DEFAULT 0,
11+
project_id UInt64 NOT NULL DEFAULT 0,
12+
event UInt8 NOT NULL DEFAULT 0,
13+
namespace_path String DEFAULT '',
14+
pipeline_id UInt64 DEFAULT 0,
15+
merge_request_id UInt64 DEFAULT 0
16+
)
17+
ENGINE = ReplacingMergeTree
18+
PARTITION BY toYear(timestamp)
19+
ORDER BY (user_id, event, timestamp)
20+
SQL
21+
end
22+
23+
def down
24+
execute <<-SQL
25+
DROP TABLE IF EXISTS troubleshoot_job_events
26+
SQL
27+
end
28+
end

doc/development/testing_guide/end_to_end/best_practices/rspec_metadata_tests.md

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ This is a partial list of the [RSpec metadata](https://rspec.info/features/3-12/
4444
| `:requires_admin` | The test requires an administrator account. Tests with the tag are excluded when run against Canary and Production environments. |
4545
| `:requires_git_protocol_v2` | The test requires that Git protocol version 2 is enabled on the server. It's assumed to be enabled by default but if not the test can be skipped by setting `QA_CAN_TEST_GIT_PROTOCOL_V2` to `false`. |
4646
| `:requires_praefect` | The test requires that the GitLab instance uses [Gitaly Cluster](../../../../administration/gitaly/praefect.md) (a.k.a. Praefect) as the repository storage. It's assumed to be used by default but if not the test can be skipped by setting `QA_CAN_TEST_PRAEFECT` to `false`. |
47-
| `:runner` | The test depends on and sets up a GitLab Runner instance, typically to run a pipeline. |
4847
| `:skip_live_env` | The test is excluded when run against live deployed environments such as Staging, Canary, and Production. |
4948
| `:skip_fips_env` | The test is excluded when run against an environment in FIPS mode. |
5049
| `:skip_signup_disabled` | The test uses UI to sign up a new user and is skipped in any environment that does not allow new user registration via the UI. |

doc/user/application_security/dependency_list/_index.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,32 @@ Although this is not mandatory for populating the dependency list, the SBOM docu
5252

5353
- In GitLab 17.2, the `location` field no longer links to the commit where the dependency was last detected when the feature flag `skip_sbom_occurrences_update_on_pipeline_id_change` is enabled. The flag is disabled by default.
5454
- In GitLab 17.3 the `location` field always links to the commit where the dependency was first detected. Feature flag `skip_sbom_occurrences_update_on_pipeline_id_change` removed.
55+
- View dependency paths option [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/519965) in GitLab 17.11 [with a flag](../../../administration/feature_flags.md) named `dependency_paths`. Disabled by default.
5556

5657
{{< /history >}}
5758

59+
{{< alert type="flag" >}}
60+
61+
The availability of this feature is controlled by a feature flag.
62+
For more information, see the history.
63+
64+
{{< /alert >}}
65+
5866
To view the dependencies of a project or all projects in a group:
5967

6068
1. On the left sidebar, select **Search or go to** and find your project or group.
6169
1. Select **Secure > Dependency list**.
70+
1. Optional. If there are transitive dependencies, you can also view all of the dependency paths:
71+
- For a project, in the **Location** column, select **View dependency paths**.
72+
- For a group, in the **Location** column, select the location, then select **View dependency paths**.
6273

6374
Details of each dependency are listed, sorted by decreasing severity of vulnerabilities (if any). You can sort the list instead by component name, packager, or license.
6475

6576
| Field | Description |
6677
|:----------|:-----------|
6778
| Component | The dependency's name and version. |
6879
| Packager | The packager used to install the dependency. |
69-
| Location | For system dependencies, this lists the image that was scanned. For application dependencies, this shows a link to the packager-specific lock file in your project that declared the dependency. It also shows the [direct dependents](#dependency-paths) of the dependency, if any, and if supported. |
80+
| Location | For system dependencies, this field lists the image that was scanned. For application dependencies, this field shows a link to the packager-specific lock file in your project that declared the dependency. It also shows the direct [dependents](#dependency-paths), if any. If there are transitive dependencies, selecting **View dependency paths** shows the full path of all dependents. Transitive dependencies are indirect dependents that have a direct dependent as an ancestor. |
7081
| License (for projects only) | Links to dependency's software licenses. A warning badge that includes the number of vulnerabilities detected in the dependency. |
7182
| Projects (for groups only) | Links to the project with the dependency. If multiple projects have the same dependency, the total number of these projects is shown. To go to a project with this dependency, select the **Projects** number, then search for and select its name. The project search feature is supported only on groups that have up to 600 occurrences in their group hierarchy. |
7283

doc/user/application_security/vulnerabilities/_index.md

+27-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ including:
2121
- Available actions
2222
- Linked issues
2323
- Actions log
24-
- Filename and line number of the vulnerability (if available)
24+
- Location
2525
- Severity
2626

2727
For vulnerabilities in the [Common Vulnerabilities and Exposures (CVE)](https://www.cve.org/)
@@ -571,3 +571,29 @@ To view the security training for a vulnerability:
571571
1. Select **Secure > Vulnerability report**.
572572
1. Select the vulnerability for which you want to view security training.
573573
1. Select **View training**.
574+
575+
## View the location of a vulnerability in transitive dependencies
576+
577+
{{< history >}}
578+
579+
- View dependency paths option [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/519965) in GitLab 17.11 [with a flag](../../../administration/feature_flags.md) named `dependency_paths`. Disabled by default.
580+
581+
{{< /history >}}
582+
583+
{{< alert type="flag" >}}
584+
585+
The availability of this feature is controlled by a feature flag.
586+
For more information, see the history.
587+
588+
{{< /alert >}}
589+
590+
When managing vulnerabilities found in dependencies in the vulnerability details, under **Location**, you can view:
591+
592+
- The location of the direct dependency where the vulnerability was found.
593+
- If available, the specific line number where the vulnerability occurs.
594+
595+
If the vulnerability occurs in one or more transitive dependencies, knowing only the direct dependency may not be enough. Transitive dependencies are indirect dependencies that have a direct dependent as an ancestor.
596+
597+
If any transitive dependencies exist, you can view the paths to all dependencies, including the transitive dependencies that contain the vulnerability.
598+
599+
- On the vulnerability details page, under **Location**, select **View dependency paths**. If **View dependency paths** doesn't appear, then there are no transitive dependencies.

0 commit comments

Comments
 (0)