Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/devopsshield-cis-trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Last applied at: Mon, 20 Jan 2025 03:13:44 GMT
# DevOps Shield - The ultimate DevSecOps platform designed to secure your DevOps.
# https://devopsshield.com
##############################################################
# This is a DevOps Shield - Application Security - Code Security Template.

# This workflow template uses actions that are not certified by DevOps Shield.
# They are provided by a third-party and are governed by separate terms of service, privacy policy, and support documentation.

# Use this workflow template for integrating code security into your pipelines and workflows.

# DevOps Shield Workflow Template Details:
# ------------------------------------------------------------
# Code: GH_CIS_TRIVY
# Name: Trivy Container Image Scanning
# DevSecOpsControls: CIS
# Provider: Aqua Security
# Categories: Code Scanning, Dockerfile
# Description:
# Scan Docker container images for vulnerabilities in OS packages and language dependencies with Trivy from Aqua Security.
# Trivy is a comprehensive and versatile security scanner.
# Trivy has scanners that look for security issues, and targets where it can find those issues.
# Find vulnerabilities, misconfigurations, secrets, SBOM in containers, Kubernetes, code repositories, clouds and more.
# Read the official documentation to find out more.
# For more information:
# https://trivy.dev/latest/
# https://github.com/aquasecurity/trivy
# ------------------------------------------------------------
# Source repository: https://github.com/aquasecurity/trivy-action
##############################################################

name: Trivy Container Image Scanning

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: 0 0 * * 0

jobs:
trivy:
name: Trivy vulnerability scanner

runs-on: ubuntu-latest

permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build an image from Dockerfile
run: |
docker build -t docker.io/my-organization/my-app:${{ github.sha }} .

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@v0.29.0
with:
image-ref: 'docker.io/my-organization/my-app:${{ github.sha }}'
format: 'sarif'
output: 'trivy-results.sarif'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'
61 changes: 61 additions & 0 deletions .github/workflows/devopsshield-dast-zed-attack-proxy-zap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Last applied at: Mon, 20 Jan 2025 03:13:45 GMT
# DevOps Shield - The ultimate DevSecOps platform designed to secure your DevOps.
# https://devopsshield.com
##############################################################
# This is a DevOps Shield - Application Security - Code Security Template.

# This workflow template uses actions that are not certified by DevOps Shield.
# They are provided by a third-party and are governed by separate terms of service, privacy policy, and support documentation.

# Use this workflow template for integrating code security into your pipelines and workflows.

# DevOps Shield Workflow Template Details:
# ------------------------------------------------------------
# Code: GH_DAST_Zed_Attack_Proxy_ZAP
# Name: Zed Attack Proxy (ZAP) Penetration Testing
# DevSecOpsControls: DAST
# Provider: Checkmarx
# Categories: Code Scanning, Penetration Testing
# Description:
# Zed Attack Proxy (ZAP) by Checkmarx is a free, open-source penetration testing tool.
# ZAP is designed specifically for testing web applications and is both flexible and extensible.
# Automate with ZAP. ZAP provides range of options for security automation.
# The world's most widely used web app scanner. Free and open source. A community based GitHub Top 1000 project that anyone can contribute to.
# A GitHub Action for running the ZAP Full Scan to perform Dynamic Application Security Testing (DAST).
# The ZAP full scan action runs the ZAP spider against the specified target (by default with no time limit) followed by an optional ajax spider scan and then a full active scan before reporting the results.
# WARNING this action will perform attacks on the target website. You should only scan targets that you have permission to test.
# Read the official documentation to find out more.
# For more information:
# https://www.zaproxy.org/
# https://www.zaproxy.org/docs/
# https://github.com/zaproxy/
# https://www.zaproxy.org/docs/automate/
# https://www.zaproxy.org/docs/guides/zapping-the-top-10-2021/
# ------------------------------------------------------------
# Source repository: https://github.com/zaproxy/action-full-scan
##############################################################

name: Zed Attack Proxy (ZAP) Full Scan

on:
push:
branches: [ main ]
schedule:
- cron: 0 0 * * 0

jobs:
zap_scan:
name: ZAP Full Scan
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- uses: actions/checkout@v4

- name: Run ZAP Scan
uses: zaproxy/action-full-scan@v0.12.0
id: zap
with:
target: 'https://www.zaproxy.org/'
60 changes: 60 additions & 0 deletions .github/workflows/devopsshield-sca-anchore-syft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Last applied at: Mon, 20 Jan 2025 03:13:47 GMT
# DevOps Shield - The ultimate DevSecOps platform designed to secure your DevOps.
# https://devopsshield.com
##############################################################
# This is a DevOps Shield - Application Security - Code Security Template.

# This workflow template uses actions that are not certified by DevOps Shield.
# They are provided by a third-party and are governed by separate terms of service, privacy policy, and support documentation.

# Use this workflow template for integrating code security into your pipelines and workflows.

# DevOps Shield Workflow Template Details:
# ------------------------------------------------------------
# Code: GH_SCA_ANCHORE_SYFT
# Name: Anchore Syft SBOM Scan
# DevSecOpsControls: SCA
# Provider: Anchore
# Categories: Code Scanning, Dockerfile, Dependency Management
# Description:
# Produce Software Bills of Materials based on Anchore's open source Syft tool.
# Syft is a powerful and easy-to-use open-source tool for generating Software Bill of Materials (SBOMs) for container images and filesystems.
# It provides detailed visibility into the packages and dependencies in your software, helping you manage vulnerabilities, license compliance, and software supply chain security.
# This workflow checks out code, builds an image, performs a container image
# scan with Anchore's Syft tool, and uploads the results to the GitHub Dependency submission API.
# Read the official documentation to find out more.
# For more information:
# https://github.com/anchore/syft
# ------------------------------------------------------------
# Source repository: https://github.com/anchore/sbom-action
##############################################################

name: Anchore Syft SBOM Scan

on:
push:
branches: [ main ]

jobs:
anchore-syft-Scan:
name: Anchore Syft SBOM Scan

runs-on: ubuntu-latest

permissions:
contents: write # required to upload to the Dependency submission API
actions: read # to find workflow artifacts when attaching release assets

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build the Docker image
run: docker build . --file Dockerfile --tag localbuild/testimage:latest

- name: Scan the image and upload dependency results
uses: anchore/sbom-action@v0
with:
image: "localbuild/testimage:latest"
artifact-name: image.spdx.json
dependency-snapshot: true
59 changes: 59 additions & 0 deletions .github/workflows/devopsshield-ss-trufflehog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Last applied at: Mon, 20 Jan 2025 03:13:48 GMT
# DevOps Shield - The ultimate DevSecOps platform designed to secure your DevOps.
# https://devopsshield.com
##############################################################
# This is a DevOps Shield - Application Security - Code Security Template.

# This workflow template uses actions that are not certified by DevOps Shield.
# They are provided by a third-party and are governed by separate terms of service, privacy policy, and support documentation.

# Use this workflow template for integrating code security into your pipelines and workflows.

# DevOps Shield Workflow Template Details:
# ------------------------------------------------------------
# Code: GH_SS_TRUFFLEHOG
# Name: TruffleHog Secret Scanning
# DevSecOpsControls: SS
# Provider: Truffle Security Co.
# Categories: Code Scanning, Secrets
# Description:
# TruffleHog is the most powerful secrets Discovery, Classification, Validation, and Analysis tool.
# In this context secret refers to a credential a machine uses to authenticate itself to another machine.
# This includes API keys, database passwords, private encryption keys, and more.
# Find, verify, and analyze leaked credentials.
# Read the official documentation to find out more.
# For more information:
# https://trufflesecurity.com/
# https://github.com/trufflesecurity/trufflehog
# ------------------------------------------------------------
# Source repository: https://github.com/trufflesecurity/trufflehog?tab=readme-ov-file#octocat-trufflehog-github-action
##############################################################

name: TruffleHog Secret Scanning

on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: 0 0 * * *

jobs:
gitleaks:
name: TruffleHog Secret Scanning

runs-on: ubuntu-latest

permissions:
contents: read

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Run TruffleHog
uses: trufflesecurity/trufflehog@v3
id: trufflehog
with:
extra_args: --results=verified,unknown