Skip to content

DAST Scanner Profiles implementation - Form MVC - Boilerplate

Summary

This issue covers the basic groundwork for preparing the implementation of the DAST Scanner profile form.

Implementation plan

Production code

  • Create the DastScannerProfilesController#new action in ee/app/controllers/projects/dast_scanner_profiles_controller.rb.
  • Create the corresponding new route in ee/config/routes/project.rb.
    • The route should be protected with the same policy as /:namespace/:project/-/on_demand_scans.
  • Create a basic HAML view in ee/app/views/projects/dast_scanner_profiles/new.html.haml.
    • Make sure the breadcrumbs are properly set in the new view.
  • Update the sidebar so that the On-demand scans item remains active when on the New scanner profile page. Affected files:
    • ee/app/views/layouts/nav/sidebar/_project_security_link.html.haml
    • ee/app/helpers/ee/projects_helper.rb
  • Create a new Vue app that will eventually be responsible for rendering the New Scanner Profile form.
    • Create DastScannerProfileForm in ee/app/assets/javascripts/dast_scanner_profiles/components/dast_scanner_profile_form.vue.
    • Create ee/app/assets/javascripts/dast_scanner_profiles/dast_scanner_profiles_bundle.js that renders the Vue component in the new HAML view.
    • Create ee/app/assets/javascripts/pages/projects/dast_scanner_profiles/new/index.js to bootstrap the app on the required page.

Specs

  • ee/spec/frontend/dast_scanner_profiles_form/components/dast_scanner_profiles_form_spec.js
    • App renders properly.
  • ee/spec/requests/projects/dast_scanner_profiles_controller_spec.rb
    • Assert that the controller properly responds to GET requests. This should be similar to what we have in ee/spec/requests/projects/dast_site_profiles_controller_spec.rb.
  • ee/spec/views/projects/dast_scanner_profiles/new.html.haml_spec.rb
    • Assert that the view renders properly.

Related resources

Edited by Paul Gascou-Vaillancourt