From e599a00b099025e08ec5f092dd5a31e970cd2098 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 24 Aug 2020 00:10:19 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- app/assets/javascripts/issue.js | 14 ++++++++----- app/views/shared/_no_ssh.html.haml | 2 +- changelogs/unreleased/create-index-for-cs.yml | 5 +++++ ...dd_index_to_container_scanning_findings.rb | 20 +++++++++++++++++++ db/schema_migrations/20200820105408 | 1 + db/structure.sql | 2 ++ doc/ci/runners/README.md | 4 ++++ .../application_security/sast/analyzers.md | 4 ++-- package.json | 2 +- .../__snapshots__/expand_button_spec.js.snap | 8 ++++---- yarn.lock | 8 ++++---- 11 files changed, 53 insertions(+), 17 deletions(-) create mode 100644 changelogs/unreleased/create-index-for-cs.yml create mode 100644 db/migrate/20200820105408_add_index_to_container_scanning_findings.rb create mode 100644 db/schema_migrations/20200820105408 diff --git a/app/assets/javascripts/issue.js b/app/assets/javascripts/issue.js index f1b37525a6d..ad0147bdca2 100644 --- a/app/assets/javascripts/issue.js +++ b/app/assets/javascripts/issue.js @@ -173,11 +173,15 @@ export default class Issue { } initIssueWarningBtnEventListener() { - return $(document).on('click', '.js-close-blocked-issue-warning button.btn-secondary', e => { - e.preventDefault(); - e.stopImmediatePropagation(); - this.toggleWarningAndCloseButton(); - }); + return $(document).on( + 'click', + '.js-close-blocked-issue-warning .js-cancel-blocked-issue-warning', + e => { + e.preventDefault(); + e.stopImmediatePropagation(); + this.toggleWarningAndCloseButton(); + }, + ); } initIssueMovedFromServiceDeskDismissHandler() { diff --git a/app/views/shared/_no_ssh.html.haml b/app/views/shared/_no_ssh.html.haml index abf39fdc644..a083a772233 100644 --- a/app/views/shared/_no_ssh.html.haml +++ b/app/views/shared/_no_ssh.html.haml @@ -7,4 +7,4 @@ = s_("MissingSSHKeyWarningLink|You won't be able to pull or push project code via SSH until you add an SSH key to your profile").html_safe .gl-alert-actions = link_to s_('MissingSSHKeyWarningLink|Add SSH key'), profile_keys_path, class: "btn gl-alert-action btn-warning btn-md new-gl-button" - = link_to s_("MissingSSHKeyWarningLink|Don't show again"), profile_path(user: {hide_no_ssh_key: true}), method: :put, role: 'button', class: 'btn gl-alert-action btn-md btn-warning btn-secondary new-gl-button' + = link_to s_("MissingSSHKeyWarningLink|Don't show again"), profile_path(user: {hide_no_ssh_key: true}), method: :put, role: 'button', class: 'btn gl-alert-action btn-md btn-warning gl-button btn-warning-secondary' diff --git a/changelogs/unreleased/create-index-for-cs.yml b/changelogs/unreleased/create-index-for-cs.yml new file mode 100644 index 00000000000..05a78c36e35 --- /dev/null +++ b/changelogs/unreleased/create-index-for-cs.yml @@ -0,0 +1,5 @@ +--- +title: Add temporary index for container scanning findings +merge_request: 39962 +author: +type: other diff --git a/db/migrate/20200820105408_add_index_to_container_scanning_findings.rb b/db/migrate/20200820105408_add_index_to_container_scanning_findings.rb new file mode 100644 index 00000000000..834e11e3d6e --- /dev/null +++ b/db/migrate/20200820105408_add_index_to_container_scanning_findings.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +class AddIndexToContainerScanningFindings < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + INDEX_NAME = 'idx_container_scanning_findings' + + disable_ddl_transaction! + + def up + add_concurrent_index(:vulnerability_occurrences, :id, + where: "report_type = 2", + name: INDEX_NAME) + end + + def down + remove_concurrent_index_by_name(:project_registry, INDEX_NAME) + end +end diff --git a/db/schema_migrations/20200820105408 b/db/schema_migrations/20200820105408 new file mode 100644 index 00000000000..647a86797dd --- /dev/null +++ b/db/schema_migrations/20200820105408 @@ -0,0 +1 @@ +e21ae06853e3a071669fa8e9ed2638f0e7854813bc5a1639b31ad6edb50f6427 \ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index ba020532953..bec2f11356c 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -18909,6 +18909,8 @@ CREATE UNIQUE INDEX epic_user_mentions_on_epic_id_index ON public.epic_user_ment CREATE INDEX idx_ci_pipelines_artifacts_locked ON public.ci_pipelines USING btree (ci_ref_id, id) WHERE (locked = 1); +CREATE INDEX idx_container_scanning_findings ON public.vulnerability_occurrences USING btree (id) WHERE (report_type = 2); + CREATE INDEX idx_deployment_clusters_on_cluster_id_and_kubernetes_namespace ON public.deployment_clusters USING btree (cluster_id, kubernetes_namespace); CREATE UNIQUE INDEX idx_deployment_merge_requests_unique_index ON public.deployment_merge_requests USING btree (deployment_id, merge_request_id); diff --git a/doc/ci/runners/README.md b/doc/ci/runners/README.md index 6d248156004..71c107d32a6 100644 --- a/doc/ci/runners/README.md +++ b/doc/ci/runners/README.md @@ -455,3 +455,7 @@ Example 2: 1. The Runner is configured to run untagged jobs and has no tags defined. 1. A job that has no tags defined is executed and run. 1. A second job that has a `docker` tag defined is stuck. + +## System calls not available on GitLab.com shared runners + +GitLab.com shared runners run on CoreOS. This means that you cannot use some system calls, like `getlogin`, from the C standard library. diff --git a/doc/user/application_security/sast/analyzers.md b/doc/user/application_security/sast/analyzers.md index 214044ad783..e2e399dd592 100644 --- a/doc/user/application_security/sast/analyzers.md +++ b/doc/user/application_security/sast/analyzers.md @@ -146,7 +146,7 @@ The [Security Scanner Integration](../../../development/integrations/secure.md) | Property / Tool | Apex | Bandit | Brakeman | ESLint security | SpotBugs | Flawfinder | Gosec | Kubesec Scanner | NodeJsScan | PHP CS Security Audit | Security code Scan (.NET) | Sobelow | | --------------------------------------- | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | :---------------------: | :-------------------------: | :----------------: | -| Severity | ✓ | ✓ | 𐄂 | 𐄂 | ✓ | 𐄂 | ✓ | ✓ | 𐄂 | ✓ | 𐄂 | 𐄂 | +| Severity | ✓ | ✓ | 𐄂 | 𐄂 | ✓ | ✓ | ✓ | ✓ | 𐄂 | ✓ | 𐄂 | 𐄂 | | Title | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | Description | ✓ | 𐄂 | 𐄂 | ✓ | ✓ | 𐄂 | 𐄂 | ✓ | ✓ | 𐄂 | 𐄂 | ✓ | | File | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | @@ -159,7 +159,7 @@ The [Security Scanner Integration](../../../development/integrations/secure.md) | Internal doc/explanation | ✓ | ⚠ | ✓ | 𐄂 | ✓ | 𐄂 | 𐄂 | 𐄂 | 𐄂 | 𐄂 | 𐄂 | ✓ | | Solution | ✓ | 𐄂 | 𐄂 | 𐄂 | ⚠ | ✓ | 𐄂 | 𐄂 | 𐄂 | 𐄂 | 𐄂 | 𐄂 | | Affected item (e.g. class or package) | ✓ | 𐄂 | ✓ | 𐄂 | ✓ | ✓ | 𐄂 | ✓ | 𐄂 | 𐄂 | 𐄂 | 𐄂 | -| Confidence | 𐄂 | ✓ | ✓ | 𐄂 | ✓ | ✓ | ✓ | ✓ | 𐄂 | 𐄂 | 𐄂 | ✓ | +| Confidence | 𐄂 | ✓ | ✓ | 𐄂 | ✓ | x | ✓ | ✓ | 𐄂 | 𐄂 | 𐄂 | ✓ | | Source code extract | 𐄂 | ✓ | ✓ | ✓ | 𐄂 | ✓ | ✓ | 𐄂 | 𐄂 | 𐄂 | 𐄂 | 𐄂 | | Internal ID | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 𐄂 | 𐄂 | ✓ | ✓ | ✓ | diff --git a/package.json b/package.json index 8c3f27849e5..2d80fb258e0 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@babel/preset-env": "^7.10.1", "@gitlab/at.js": "1.5.5", "@gitlab/svgs": "1.158.0", - "@gitlab/ui": "20.4.0", + "@gitlab/ui": "20.4.1", "@gitlab/visual-review-tools": "1.6.1", "@rails/actioncable": "^6.0.3-1", "@sentry/browser": "^5.10.2", diff --git a/spec/frontend/vue_shared/components/__snapshots__/expand_button_spec.js.snap b/spec/frontend/vue_shared/components/__snapshots__/expand_button_spec.js.snap index cd4728baeaa..c2b97f1e7f9 100644 --- a/spec/frontend/vue_shared/components/__snapshots__/expand_button_spec.js.snap +++ b/spec/frontend/vue_shared/components/__snapshots__/expand_button_spec.js.snap @@ -4,7 +4,7 @@ exports[`Expand button on click when short text is provided renders button after