AdautoEC / DevSecOps-sample

Just a simple CI/CD sample with SCA, SAST and DAST
MIT License
0 stars 0 forks source link

DevSecOps Pipeline - GitHub Actions

DevSecOps Pipeline using free SAST, DAST, and SCA tools for comprehensive security scanning.

How it works?

This GitHub Action pipeline runs multiple security tools, including SonarCloud, Semgrep, Snyk, Dependency-Check, OWASP ZAP, and Dastardly. The goal is to check for security vulnerabilities both in your codebase and in third-party dependencies, and to identify security issues during dynamic application testing.

SCA - Software Composition Analysis

Provided by Snyk and Dependency-Check, these steps analyze third-party dependencies for known vulnerabilities.

SAST - Static Application Security Testing

This pipeline includes two static analysis tools:

DAST - Dynamic Application Security Testing

Pipeline Workflow

  1. SAST Tools:

    • SonarCloud and Semgrep scan your codebase for security vulnerabilities and code quality issues.
  2. SCA Tools:

    • Snyk and Dependency-Check perform a Software Composition Analysis to identify vulnerable dependencies.
  3. Build and Deploy:

    • After the SCA step, a fake vulnerable application is built and deployed.
  4. DAST Tools:

    • OWASP ZAP and Dastardly perform a Dynamic Application Security Testing (DAST) scan on the deployed application to identify runtime vulnerabilities.

How to Set Up?

  1. Secrets Required:

    • SONAR_TOKEN: Your SonarCloud token.
    • SNYK_TOKEN: Your Snyk token.
    • SEMGREP_APP_TOKEN: Your Semgrep token.
  2. SonarCloud Setup:

    • Ensure you have the sonar-project.properties file in the root of your repository for the SonarCloud scan.
  3. Run: This pipeline runs on every pull request or when manually triggered (workflow_dispatch).

References: