<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: KkInTech15</title>
    <description>The latest articles on DEV Community by KkInTech15 (@kkintech15).</description>
    <link>https://dev.to/kkintech15</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2489469%2Fd8d1d52a-e8d7-43c4-b575-37f2e64061f9.jpeg</url>
      <title>DEV Community: KkInTech15</title>
      <link>https://dev.to/kkintech15</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kkintech15"/>
    <language>en</language>
    <item>
      <title>🚀 Building a DevSecOps Pipeline (Local Testing) with Maven, SonarQube, Trivy, and JFrog Artifactory</title>
      <dc:creator>KkInTech15</dc:creator>
      <pubDate>Mon, 07 Jul 2025 00:33:42 +0000</pubDate>
      <link>https://dev.to/kkintech15/building-a-devsecops-pipeline-local-testing-with-maven-sonarqube-trivy-and-jfrog-artifactory-5a2a</link>
      <guid>https://dev.to/kkintech15/building-a-devsecops-pipeline-local-testing-with-maven-sonarqube-trivy-and-jfrog-artifactory-5a2a</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcyiil8ypl62qrmdjyxcz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcyiil8ypl62qrmdjyxcz.png" alt="Image description" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this post, I'm sharing the local testing phase of a real-world DevSecOps pipeline that integrates essential tools for code quality, security scanning, and artifact management — all tested on EC2 instances in AWS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqqp6pbt0dpfdvl5x94t0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqqp6pbt0dpfdvl5x94t0.png" alt="Image description" width="796" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧪 Local Testing Workflow (Completed)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ve validated the full DevSecOps pipeline locally using the following steps:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;✅ mvn clean, test, compile, package, deploy
✅ SonarQube analysis via scanner publishing results to the SonarQube UI
✅ Trivy scanning the file system and detecting known vulnerabilities in dependencies (especially in pom.xml)
✅ Maven pushing the final .jar artifact to JFrog Artifactory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzbbf7nzhb4y4doyq4xub.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzbbf7nzhb4y4doyq4xub.png" alt="Image description" width="800" height="253"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔍 SonarQube Setup Highlights&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- Installed SonarQube 10.5
- Configured PostgreSQL
- Created systemd service for automatic restart
- Verified access to SonarQube via browser UI
- Used the following sonar-project.properties to enable code  scanning and coverage reporting:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sonar.projectKey=my-app
sonar.projectName=My App
sonar.projectVersion=1.0
sonar.host.url=http://&amp;lt;sonar-server-ip&amp;gt;:9000
sonar.sources=src/main/java
sonar.tests=src/test/java
sonar.java.binaries=target/classes
sonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs1jixfchbqhleox05d3r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs1jixfchbqhleox05d3r.png" alt="Image description" width="800" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🗃️ JFrog Artifactory Setup (OSS Edition 7.71.23)&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- Installed Artifactory with Derby DB (lightweight, avoids PostgreSQL setup for testing)
- Created /opt/jfrog/var/data/derby with proper permissions
- Deployed .jar to Artifactory using Maven's distributionManagement block in pom.xml:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;distributionManagement&amp;gt;
  &amp;lt;repository&amp;gt;
    &amp;lt;id&amp;gt;jfrog-artifactory&amp;lt;/id&amp;gt;
    &amp;lt;name&amp;gt;JFrog Maven Local Repository&amp;lt;/name&amp;gt;
    &amp;lt;url&amp;gt;http://&amp;lt;artifactory-server-ip&amp;gt;:8082/artifactory/maven-local&amp;lt;/url&amp;gt;
  &amp;lt;/repository&amp;gt;
&amp;lt;/distributionManagement&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Artifactory was made accessible on port 8082 with default UI credentials&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4nc9knbefvzow9mcp2j5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4nc9knbefvzow9mcp2j5.png" alt="Image description" width="800" height="323"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔒 Trivy Scanning&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* Installed Trivy CLI on the Maven + Artifactory instance
* Scanned:
    * Entire file system for vulnerable packages
    * The pom.xml for dependency issues
* Focused on identifying Log4J-related vulnerabilities and other CVEs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;trivy fs . --scanners vuln --severity HIGH,CRITICAL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;❗ For this phase, I didn’t scan .jar directly (which is not recommended unless SBOM is enforced). That’ll be added in a later post.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fefzbagonip2dkbd4v49m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fefzbagonip2dkbd4v49m.png" alt="Image description" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📊 Jacoco for Code Coverage&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Integrated with Maven using the jacoco-maven-plugin:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;plugin&amp;gt;
  &amp;lt;groupId&amp;gt;org.jacoco&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;jacoco-maven-plugin&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;0.8.8&amp;lt;/version&amp;gt;
  ...
&amp;lt;/plugin&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Coverage report generated at:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;target/site/jacoco/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;📌 What’s Next&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the next phase, I will integrate:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* Jenkins for complete CI/CD automation
* SonarQube, Trivy, and Artifactory into Jenkins pipeline
* GitHub Webhooks or EventBridge (for event-driven builds)
* More advanced vulnerability policies
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Stay tuned! 👨‍💻&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🙌 Connect With Me&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’m building and learning in public to stay focused, attract meaningful DevOps opportunities, and grow in the open.&lt;br&gt;
You can also connect with me on LinkedIn where I post DevOps projects regularly.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
