Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create OWASP security scan of Docker container #69

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
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
55 changes: 55 additions & 0 deletions .github/workflows/owasp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This is a basic workflow to help you get started with Actions

name: Security-scan

# Controls when the action will run.
on:
schedule:
- cron: '0 3 * * *' # everyday at 03:00 UTC
pull_request:
branches: main
push:
branches: main
tags: '*'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main

- name: Link .env file
run: ln -s .env.sample .env

# Runs a single command using the runners shell
- name: Pull and start docker via docker-compose
run: docker-compose up -d
env:
UID: $USER
GID: $USER

# Run OWASP scan
- name: OWASP ZAP Full Scan
uses: zaproxy/[email protected]
with:
# GitHub Token to create issues in the repository
#token: # optional, default is ${{ github.token }}
# Target URL
target: http://localhost:3000
# Relative path of the ZAP configuration file (e.g. for exclusions)
# rules_file_name: ".github/rules.tsv" # optional
# The Docker file to be executed
#docker_name: # default is owasp/zap2docker-stable
# Additional command line options
#cmd_options: # optional
# The title for the GitHub issue to be created
#issue_title: # optional, default is ZAP Full Scan Report
# The action status will be set to fail if ZAP identifies any alerts during the full scan
#fail_action: # optional
Loading