DAST On-demand scans MVC - Initiate Scan - Run scans - Backend

Summary

This issue is for the backend work of #218465 (closed). The backend should be able to run new DAST scans on a given target URL passed by the frontend via a GraphQL mutation.

The proposed GraphQL mutation looks like this:

mutation {
  runDastScan(input: {projectPath: ID!, targetUrl: String!, branch: String!, scanType: DastScanTypeEnum!}) {
    pipelineUrl
  }
}
# where DastScanTypeEnum has a single value: PASSIVE

New passive DAST scan form overview

Implementation plan

  • Implement the GraphQL mutation resolver
    • The mutation triggers a new DAST scan attached to the given branch
    • It responds to the frontend with the pipeline's URL (pipelineUrl)
    • Add validation GraphQL error response
    • Add new policy
    • Mark as on-demand scan (avoid migration)
    • Add ability to use YAML string create CI pipelines
    • Move DAST scan service to use existing CI service
    • Get YAML template from FS rather than duplicate
Edited Jul 07, 2020 by Philip Cunningham
Assignee Loading
Time tracking Loading