import io.jenkins.plugins.appsentinels.AppSentinelsDastBuilder pipeline { agent any stages { stage('Run Dast') { steps { script { // Create some files withCredentials([string(credentialsId: 'APPKEY', variable: 'MY_SECRET')]) { def testConfig = [ "test_config": [ "test_suites": [ "Broken Object Level Authorization", "Broken User Authentication", ], "allowed_endpoints": [ "GET /rest/user/whoami", "GET /api/Quantitys/", ], "blocked_endpoints": [ "GET /rest/order-history", "GET /api/cards/{param-1}", ], "overwrite_host_header": "yes", "request_timeout": 10, "target_url": "", ] ] def builder = appSentinelsDastBuilder(baseurl:'https://multiapp-test.appsentinels.ai/api/v1/',apikey: env.MY_SECRET, org: 'nagarajreg2', app: 'nagarajreg2_juiceshop_data', timeZone:'Asia/Calcutta',testConf: testConfig, breakOnError: true, maxMajor: 0, maxMinor: 0, maxCritical: 0) } } } } } }