<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged dastardly</title>
<link>https://coderlegion.com/tag/dastardly</link>
<description>Powered by Question2Answer</description>
<item>
<title>Shift Left Security: DAST with Dastardly in CI/CD</title>
<link>https://coderlegion.com/1760/shift-left-security-dast-with-dastardly-in-ci-cd</link>
<description>&lt;p&gt;In today’s DevOps-driven world, speed and security often clash. CI/CD pipelines accelerate delivery, but vulnerabilities can slip through if security isn’t automated. Enter Dastardly, a free Dynamic Application Security Testing (DAST) tool by PortSwigger (creators of Burp Suite). Designed to integrate seamlessly into CI/CD workflows, Dastardly ensures your apps stay secure without slowing down development. Let’s explore why it’s a game-changer. Conclusion:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Secure your pipeline without breaking the bank..&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=6762903111514502239&quot; alt=&quot;Dastardly&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;what-is-dastardly-&quot;&gt;&lt;strong&gt;What is Dastardly?&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Dastardly performs automated security scans directly in your CI/CD pipeline, identifying critical vulnerabilities like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SQL Injection (SQLi)&lt;/li&gt;
&lt;li&gt;Cross-Site Scripting (XSS)&lt;/li&gt;
&lt;li&gt;Server Misconfigurations&lt;/li&gt;
&lt;li&gt;Insecure APIs&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;what-is-dast-&quot;&gt;&lt;strong&gt;What is DAST?&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;DAST (Dynamic Application Security Testing) is a type of security testing that analyzes a running application to find vulnerabilities, typically in web applications. Unlike Static Application Security Testing (SAST), which analyzes source code, DAST tests applications in real-time, simulating an attacker's perspective.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key Features of DAST:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Black-box testing: It doesn't require access to source code.&lt;/li&gt;
&lt;li&gt;Focus on runtime vulnerabilities: Identifies issues like SQL injection, XSS (Cross-Site Scripting), and security misconfigurations.&lt;/li&gt;
&lt;li&gt;Automated scanning: Often used in CI/CD pipelines for continuous security testing.&lt;/li&gt;
&lt;li&gt;Language agnostic: Works on any web application regardless of the tech stack.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Dastardly by Burp&lt;/strong&gt; is a lightweight DAST tool designed for CI/CD pipelines, helping teams catch security issues early with minimal setup.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How it works:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Scans Web Apps/APIs:&lt;/strong&gt; Tests running applications for flaws.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CI/CD Integration:&lt;/strong&gt; Runs scans during builds, failing pipelines if risks are detected.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Simple Reporting:&lt;/strong&gt; Generates actionable reports with vulnerability details.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;why-choose-dastardly-over-competitors-&quot;&gt;&lt;strong&gt;Why Choose Dastardly Over Competitors?&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Let's compare it to popular alternatives:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tool:&lt;/strong&gt; Dastardly&lt;br&gt;
&lt;strong&gt;Cost:&lt;/strong&gt; Free&lt;br&gt;
&lt;strong&gt;Ease of use:&lt;/strong&gt; Low-code setup&lt;br&gt;
&lt;strong&gt;CI/CD Integration:&lt;/strong&gt; Native (CLI/Jenkins)&lt;br&gt;
&lt;strong&gt;Coverage:&lt;/strong&gt; OWASP ZAP 10&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tool:&lt;/strong&gt; Forfify&lt;br&gt;
&lt;strong&gt;Cost:&lt;/strong&gt; Paid/Enterprise&lt;br&gt;
&lt;strong&gt;Ease of use:&lt;/strong&gt; Moderate/Complex&lt;br&gt;
&lt;strong&gt;CI/CD Integration:&lt;/strong&gt; Native (Jenkins, Azure DevOps, etc.)&lt;br&gt;
&lt;strong&gt;Coverage:&lt;/strong&gt; SAST&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tool:&lt;/strong&gt; OWASP ZAP&lt;br&gt;
&lt;strong&gt;Cost:&lt;/strong&gt; Free/Open-Source&lt;br&gt;
&lt;strong&gt;Ease of use:&lt;/strong&gt; Moderate&lt;br&gt;
&lt;strong&gt;CI/CD Integration:&lt;/strong&gt; Plugin&lt;br&gt;
&lt;strong&gt;Coverage:&lt;/strong&gt; Customizable&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tool:&lt;/strong&gt; Snyk&lt;br&gt;
&lt;strong&gt;Cost:&lt;/strong&gt; Paid&lt;br&gt;
&lt;strong&gt;Ease of use:&lt;/strong&gt; Easy&lt;br&gt;
&lt;strong&gt;CI/CD Integration:&lt;/strong&gt; Native&lt;br&gt;
&lt;strong&gt;Coverage:&lt;/strong&gt; SAST/SCA/DAST&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tool:&lt;/strong&gt; Veracode&lt;br&gt;
&lt;strong&gt;Cost:&lt;/strong&gt; Enterprise&lt;br&gt;
&lt;strong&gt;Ease of use:&lt;/strong&gt; Complex&lt;br&gt;
&lt;strong&gt;CI/CD Integration:&lt;/strong&gt; Partial&lt;br&gt;
&lt;strong&gt;Coverage:&lt;/strong&gt; Comprehensive&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why Dastardly Wins:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Zero Cost: Ideal for startups and budget-conscious teams.&lt;/li&gt;
&lt;li&gt;Simplicity: Minimal configuration; no PhD in security needed.&lt;/li&gt;
&lt;li&gt;Pipeline-Friendly: Designed explicitly for CI/CD, unlike tools retrofitted for DevOps.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Integrating Dastardly with Jenkins&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=3400051317086869815&quot; alt=&quot;Jenkins&quot;&gt;&lt;/p&gt;
&lt;p&gt;Here’s how to add Dastardly to your Jenkins pipeline in 4 steps:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1- Create Pipeline from Jenkins:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=15032590918840324641&quot; alt=&quot;Jenkins Pipeline Config for Dastardly&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2- Add a Jenkins Build Step:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In your Jenkinsfile, add a stage:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pipeline {
agent any
stages {
    stage (&quot;Docker Pull Dastardly from Burp Suite container image&quot;) {
        steps {
            sh 'docker pull public.ecr.aws/portswigger/dastardly:latest'
        }
    }
    stage (&quot;Docker run Dastardly from Burp Suite Scan&quot;) {
        steps {
            cleanWs()
            sh '''
                docker run --user $(id -u) -v ${WORKSPACE}:${WORKSPACE}:rw \
                -e BURP_START_URL=https://example.com/ \
                -e BURP_REPORT_FILE_PATH=${WORKSPACE}/dastardly-report.xml \
                public.ecr.aws/portswigger/dastardly:latest
            '''
        }
    }
}
post {
    always {
        junit testResults: 'dastardly-report.xml', skipPublishingChecks: true
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;&lt;p&gt;Remove --user $(id -u) if you are gonna test one time on PowerShell.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Fail Pipeline on Risks:&lt;/strong&gt;&lt;br&gt;
Configure Dastardly to exit with a non-zero code if vulnerabilities are found.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;View Reports:&lt;/strong&gt;&lt;br&gt;
Archive the XML report in Jenkins to check the results.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;best-use-cases-amp-optimization-tips&quot;&gt;&lt;strong&gt;Best Use Cases &amp;amp; Optimization Tips&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Use Cases:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Shift-Left Security:&lt;/strong&gt; Catch vulnerabilities before production.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;API Testing:&lt;/strong&gt; Secure REST/GraphQL endpoints in CI.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Open Source Projects:&lt;/strong&gt; No cost barriers for community-driven apps.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Optimization Tips:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;1- &lt;strong&gt;Parallel Scans:&lt;/strong&gt; Run Dastardly alongside unit tests to save time.&lt;/p&gt;
&lt;p&gt;2- &lt;strong&gt;Baseline Scans:&lt;/strong&gt; Start with a baseline to ignore known false positives.&lt;/p&gt;
&lt;p&gt;3- &lt;strong&gt;Combine with SAST:&lt;/strong&gt; Pair Dastardly (DAST) with Snyk or SonarQube (SAST) for full coverage.&lt;/p&gt;
&lt;p&gt;4- &lt;strong&gt;Schedule Regular Scans:&lt;/strong&gt; Use Jenkins cron triggers for nightly scans.&lt;/p&gt;
&lt;h3 id=&quot;final-thoughts&quot;&gt;&lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Dastardly bridges the gap between speed and security, offering a no-cost, no-fuss solution for CI/CD pipelines. While it may lack the depth of enterprise tools like Veracode, its simplicity and seamless Jenkins integration make it a must-try for teams prioritizing agility. Start with Dastardly to bake security into your DevOps recipe — before the next breach bakes you.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Ready to try? Download Dastardly at portswigger.net and secure your pipeline today.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Enjoyed this?&lt;/strong&gt; Like ❤, share, and follow for more DevOps insights!&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/1760/shift-left-security-dast-with-dastardly-in-ci-cd</guid>
<pubDate>Tue, 01 Apr 2025 12:37:33 +0000</pubDate>
</item>
</channel>
</rss>