Skip to content

Add code snippet generation for DAST Configuration

Dheeraj Joshi requested to merge djadmin-dast-settings-generate-snippet into master

Related issue - #330721 (closed), design - #276957[dast-config-snippet.png]

What does this MR do?

This MR adds generate code snippet button for DAST Configuration Form.

  • The button opens a modal to let user copy the snippet
  • The scanner/site profile names are hardcoded for now, and shall be included in a separate MR
  • The syntax highlighting will be added in #332973 (closed)

Screenshots (strongly suggested)

1. DAST Settings Page

image

Note: Profile selectors will be included in a separate MR

2. Snippet Modal

DAST API Fuzzing
image image

How to test this

  1. Enable the feature flag.
echo "Feature.enable(:dast_configuration_ui)" | rails c
  1. Navigate to a project's Security Configuration page at /:namespace/:project/-/security/configuration.
  2. Click on Enable or Manage button for DAST.
  3. Click on Generate Code Snippet

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Dheeraj Joshi

Merge request reports