Skip to content

Commit e88faf7

Browse files
committed
feat: PoC - Pentest Pipeline with OWASP ZAP
1 parent 661cbe5 commit e88faf7

File tree

3 files changed

+91
-4
lines changed

3 files changed

+91
-4
lines changed

.github/workflows/c4po-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
name: "CI: Clean Build C4PO"
1111

1212
on:
13-
pull_request:
14-
branches: [ "main" ]
15-
13+
# ToDo: Change "push" back to "pull_request" before integration
14+
push:
15+
branches: [ "test" ]
1616

1717
env:
1818
ANGULAR_PATH: security-c4po-angular

.github/workflows/c4po-pentest.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# GitHub recommends pinning actions to a commit SHA.
7+
# To get a newer version, you will need to update the SHA.
8+
# You can also reference a tag or branch, but the action may change without warning.
9+
10+
name: "Security C4PO Pentest Pipeline PoC"
11+
12+
on:
13+
pull_request:
14+
branches: [ "main" ]
15+
16+
#on:
17+
# schedule:
18+
# Runs every sunday at 00:00.
19+
# - cron: '0 0 * * 0'
20+
21+
env:
22+
ANGULAR_PATH: security-c4po-angular
23+
API_PATH: security-c4po-api
24+
REPORTING_PATH: security-c4po-reporting
25+
CFG_PATH: security-c4po-cfg
26+
27+
jobs:
28+
29+
zap_baseline_scan:
30+
name: "ZAP Baseline Job"
31+
32+
runs-on: ubuntu-latest
33+
34+
steps:
35+
36+
- name: "ZAP Baseline Scan"
37+
# Focuses on identifying common and high impact vulnerabilites.
38+
# Designed to catch low hanging fruit & well-known security issues (XXS, SQL-Injection, ...)
39+
uses: zaproxy/[email protected]
40+
with:
41+
token: ${{ secrets.GITHUB_TOKEN }}
42+
docker_name: 'ghcr.io/zaproxy/zaproxy:stable'
43+
target: 'https://security.c4po.dev'
44+
rules_file_name: '.zap/rules.tsv'
45+
artifact_name: zap_baseline_scan
46+
cmd_options: '-a'
47+
48+
zap_api_scan:
49+
name: "ZAP API Job"
50+
51+
runs-on: ubuntu-latest
52+
53+
steps:
54+
55+
- name: "ZAP API Scan"
56+
# Focuses on scanning RESTful APIs
57+
# Optional: The format of the defintion, openapi, soap, or graphql. (Default is openapi)
58+
# Looks for a wide range of vulnerabilities (SQL-Injections, authentication issues, insecure direct object references, ...)
59+
uses: zaproxy/[email protected]
60+
with:
61+
token: ${{ secrets.GITHUB_TOKEN }}
62+
docker_name: 'ghcr.io/zaproxy/zaproxy:stable'
63+
format: openapi
64+
target: 'https://security.c4po.dev'
65+
rules_file_name: '.zap/rules.tsv'
66+
artifact_name: zap_api_scan
67+
cmd_options: '-a'
68+
69+
#zap_full_scan:
70+
# name: "ZAP Full Scan"
71+
72+
# runs-on: ubuntu-latest
73+
74+
# steps:
75+
76+
# - name: "ZAP Full Scan"
77+
# Focuses on comprehensive and thorough security assessment of web-application.
78+
# Scan includes passive & active scanning, spidering and more in-depth checks for vulnerabilities.
79+
# uses: zaproxy/[email protected]
80+
# with:
81+
# token: ${{ secrets.GITHUB_TOKEN }}
82+
# docker_name: 'ghcr.io/zaproxy/zaproxy:stable'
83+
# target: 'https://security.c4po.dev'
84+
# rules_file_name: '.zap/rules.tsv'
85+
# artifact_name: zap_full_scan
86+
# cmd_options: '-a'

.github/workflows/c4po-release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ name: "CD: Publish C4PO to Docker Hub"
1111

1212
on:
1313
push:
14-
branches: [ "main" ]
14+
# ToDo: Change back to main before integration
15+
branches: [ "test" ]
1516

1617
env:
1718
ANGULAR_PATH: security-c4po-angular

0 commit comments

Comments
 (0)