diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-27 21:10:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-27 21:10:29 +0300 |
commit | da50206243972a4cafcaea7539aed7c6986c775e (patch) | |
tree | 4078741032de093f8ae49a13ec984271402f2f35 /lib/gitlab | |
parent | eef9c80f1c3e81fcb50c51d8f419ab095d4747fd (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/alert_management/payload/base.rb | 12 | ||||
-rw-r--r-- | lib/gitlab/alert_management/payload/prometheus.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml | 14 |
3 files changed, 16 insertions, 14 deletions
diff --git a/lib/gitlab/alert_management/payload/base.rb b/lib/gitlab/alert_management/payload/base.rb index bb578037a82..74e47e5226e 100644 --- a/lib/gitlab/alert_management/payload/base.rb +++ b/lib/gitlab/alert_management/payload/base.rb @@ -20,6 +20,7 @@ module Gitlab :alert_markdown, :alert_title, :annotations, + :description, :ends_at, :environment, :environment_name, @@ -29,11 +30,12 @@ module Gitlab :gitlab_fingerprint, :gitlab_prometheus_alert_id, :gitlab_y_label, - :description, + :has_required_attributes?, :hosts, :metric_id, :metrics_dashboard_url, :monitoring_tool, + :resolved?, :runbook, :service, :severity, @@ -121,6 +123,14 @@ module Gitlab end end + def resolved? + status == 'resolved' + end + + def has_required_attributes? + true + end + private def plain_gitlab_fingerprint; end diff --git a/lib/gitlab/alert_management/payload/prometheus.rb b/lib/gitlab/alert_management/payload/prometheus.rb index 566196fdd22..336e9b319e8 100644 --- a/lib/gitlab/alert_management/payload/prometheus.rb +++ b/lib/gitlab/alert_management/payload/prometheus.rb @@ -61,6 +61,10 @@ module Gitlab ) end + def has_required_attributes? + project && title && starts_at_raw + end + private def plain_gitlab_fingerprint diff --git a/lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml b/lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml index 1908ed4c6b6..425f16fd212 100644 --- a/lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml @@ -9,7 +9,7 @@ variables: # (SAST, Dependency Scanning, ...) SECURE_ANALYZERS_PREFIX: "registry.gitlab.com/gitlab-org/security-products/analyzers" - SAST_DEFAULT_ANALYZERS: "bandit, brakeman, gosec, spotbugs, flawfinder, phpcs-security-audit, security-code-scan, nodejs-scan, eslint, secrets, sobelow, pmd-apex, kubesec" + SAST_DEFAULT_ANALYZERS: "bandit, brakeman, gosec, spotbugs, flawfinder, phpcs-security-audit, security-code-scan, nodejs-scan, eslint, sobelow, pmd-apex, kubesec" SAST_EXCLUDED_PATHS: "spec, test, tests, tmp" SAST_ANALYZER_IMAGE_TAG: 2 SAST_DISABLE_DIND: "true" @@ -186,18 +186,6 @@ pmd-apex-sast: exists: - '**/*.cls' -secrets-sast: - extends: .sast-analyzer - image: - name: "$SAST_ANALYZER_IMAGE" - variables: - SAST_ANALYZER_IMAGE: "$SECURE_ANALYZERS_PREFIX/secrets:$SAST_ANALYZER_IMAGE_TAG" - rules: - - if: $SAST_DISABLED || $SAST_DISABLE_DIND == 'false' - when: never - - if: $CI_COMMIT_BRANCH && - $SAST_DEFAULT_ANALYZERS =~ /secrets/ - security-code-scan-sast: extends: .sast-analyzer image: |