Module: Gitlab::DatabaseImporters::Security::TrainingProviders::Importer
- Defined in:
- lib/gitlab/database_importers/security/training_providers/importer.rb
Defined Under Namespace
Modules: Security
Constant Summary collapse
- KONTRA_DATA =
{ name: 'Kontra', description: "Kontra Application Security provides interactive developer security education that enables engineers to quickly learn security best practices and fix issues in their code by analysing real-world software security vulnerabilities.", url: "https://application.security/api/webhook/gitlab/exercises/search" }.freeze
- SCW_DATA =
{ name: 'Secure Code Warrior', description: "Resolve vulnerabilities faster and confidently with highly relevant and bite-sized secure coding learning.", url: "https://integration-api.securecodewarrior.com/api/v1/trial" }.freeze
- SECUREFLAG_DATA =
{ name: 'SecureFlag', description: "Get remediation advice with example code and recommended hands-on labs in a fully interactive virtualised environment.", url: "https://knowledge-base-api.secureflag.com/gitlab" }.freeze
Class Method Summary collapse
Class Method Details
.upsert_providers ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/gitlab/database_importers/security/training_providers/importer.rb', line 36 def self.upsert_providers current_time = Time.current = { created_at: current_time, updated_at: current_time } Security::TrainingProvider.upsert_all( [KONTRA_DATA.merge(), SCW_DATA.merge(), SECUREFLAG_DATA.merge()], unique_by: :index_security_training_providers_on_unique_name ) end |