HomeAboutProjectsExperienceResumeContact
{ --- PROJECT CASE STUDY --- }DevSecOps

Case Study Overview

Kawal: CI/CD Security Policy Engine

A Rust-based DevSecOps policy engine unifying Trivy, Semgrep, and Gitleaks into automated CI/CD security gates with expiring risk waivers and SHA-256 traceable reports.

September 2026 - Present
{ --- 01 · WHY IT MATTERS --- }Problem

Problem

Modern CI/CD pipelines rely on separate scanners for containers/dependencies (Trivy), static application code (Semgrep), and hardcoded secrets (Gitleaks). Each emits its own format, duplicates noisy alerts, and lacks consistent pass/block enforcement.

Engineering teams also struggle to handle accepted risks safely: temporary exceptions either turn into permanent blind spots or lack cryptographic traceability back to the exact commit.

  • Disparate JSON and SARIF outputs prevent consistent pipeline policy enforcement across repositories.
  • Duplicate findings across scanners waste triage time and hide genuinely critical vulnerabilities.
  • Manual waivers often omit expiration dates, creating unreviewed long-term exposure.
{ --- 02 · WHAT I DID --- }Decision

Decision

I built Kawal in Rust to normalize Trivy, Semgrep, and Gitleaks outputs into one unified domain model, deduplicating findings by ID, file path, and line number.

The CLI enforces policy-as-code severity thresholds and expiring risk waivers directly in CI, emitting distinct exit codes for pass, block, and execution error outcomes alongside JSON, HTML, and SARIF reports.

  • Unified JSON and SARIF scanner ingestion with deterministic deduplication by rule ID, file path, and line.
  • Implemented time-bound risk waivers with automatic expiration checks during CI policy evaluation.
  • Attached Git commit metadata and SHA-256 finding digests to every report for audit-grade traceability.
{ --- 03 · WHAT I LEARNED --- }Learning & Impact

Learning & Impact

Kawal bridges hands-on software engineering with AppSec and GRC requirements, turning fragmented scanner noise into enforceable, auditable release decisions.

It provides an extensible Rust core suitable for GitHub Actions gates and internal platform engineering standards.

  • Consolidated multi-scanner output (Trivy, Semgrep, Gitleaks) under one typed schema.
  • Enforced severity gates and expiring waivers without custom wrapper scripts per repo.
  • Produced audit-ready JSON, HTML, and SARIF artifacts stamped with commit metadata and SHA-256 digests.
{ --- KEY TAKEAWAY --- }INSIGHT

Takeaway

Writing a DevSecOps control gate in Rust underscored that security tooling is judged on determinism and auditability: predictable exit codes and signed digests make security automation trustworthy in real delivery pipelines.

{ --- STACK & LINKS --- }ACTIONS
RustTrivySemgrepGitleaksSARIF