Skip to content

Enhance Security configuration response with more info about features

Why are we doing this work

Before this issue frontend should grab data for Security Configuration page from different sources. Something comes from backend and something is stored as contants. We need to move it to one place.

For the features array, after looking into where this is currently hardcoded (app/assets/javascripts/security_configuration/components/constants.js) it'd be great if we could rename type to name and add helpPath, configHelpPath and description.

Relevant links

Raised in this thread

Non-functional requirements

  • Testing: Add relevant unit tests

Implementation plan

  • backend Enhance features items in SecurityConfigurationController#show response with next info:
  help_path: String,
  config_help_path: String,
  description: String
  • In Gitlab::Security::ScanConfiguration add methods to return help_path, config_help_path, description. Fill them with data from app/assets/javascripts/security_configuration/components/constants.js

  • in app/presenters/projects/security/configuration_presenter.rb#scan add fields to response hash to return values added on the previous step

  • Update tests

  • frontend (need a separate issue and refinement)

    • Use new fields that come with backend response and clean up deprecated code
Edited by Aditya Tiwari