Skip to content

Commit c8c92a1

Browse files
authored
Initial commit
0 parents  commit c8c92a1

23 files changed

+1007
-0
lines changed

.checkmarx/config.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 1
2+
3+
# checkmarx-specific related configuration
4+
# every value in this section is optional
5+
checkmarx:
6+
# configure the checkmarx scan parameters for scanning this specific project
7+
scan:
8+
# configure the checkmarx scan configurations for scanning this specific project
9+
configs:
10+
# configure the SAST related configurations this specific project
11+
sast:
12+
# configure the SAST preset name used for this specific project
13+
#presetName: 'Checkmarx Default'
14+
# configure if this specific project will be run incrementally or will it run a full scan
15+
#incremental: 'false'
16+
languageMode: 'multi'
17+
engineVerbose: 'true'
18+
sca:
19+
kics:

.checkmarx/cx.config

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"bugTracker": "JIRA",
3+
"jira": {
4+
"project": "CXFLOW",
5+
"issue_type": "Bug",
6+
"opened_status": ["Open","Reopen"],
7+
"closed_status": ["Closed","Done"],
8+
"open_transition": "Reopen Issue",
9+
"close_transition": "Close Issue",
10+
"close_transition_field": "resolution",
11+
"close_transition_value": "Done",
12+
"priorities": {
13+
"High": "High",
14+
"Medium": "Medium",
15+
"Low": "Low"
16+
},
17+
"fields": [{
18+
"type": "result",
19+
"name": "application",
20+
"jira_field_type": "label"
21+
},
22+
{
23+
"type": "result",
24+
"name": "category",
25+
"jira_field_name": "Category",
26+
"jira_field_type": "label"
27+
}]
28+
}
29+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# This is a basic workflow to create GitHub Issues using the Checkmarx CxFlow GitHub Action. It runs on a push to the main branch.
2+
#
3+
# The following GitHub Secrets must be first defined:
4+
# - CHECKMARX_URL
5+
# - CHECKMARX_USERNAME
6+
# - CHECKMARX_PASSWORD
7+
# - CHECKMARX_CLIENT_SECRET
8+
# - GH_TOKEN
9+
#
10+
# Update the 'team' field to reflect the team name used in Checkmarx.
11+
#
12+
# For full documentation, including a list of all inputs, please refer to the README https://github.com/checkmarx-ts/checkmarx-cxflow-github-action
13+
14+
name: CxFlow-GitHub-Issue-Push
15+
# Controls when the action will run. Triggers the workflow on push or pull request events but only for the master branch
16+
on:
17+
push:
18+
branches:
19+
- main
20+
- master
21+
22+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel - this job is specifically configured to use the Checkmarx CxFlow Action
23+
jobs:
24+
# This workflow contains a single job called "build"
25+
build:
26+
# The type of runner that the job will run on - Ubuntu is required as Docker is leveraged for the action
27+
runs-on: ubuntu-latest
28+
# Steps require - checkout code, run CxFlow Action, Upload SARIF report (optional)
29+
steps:
30+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
31+
- uses: actions/checkout@v2
32+
- name: Checkmarx CxFlow Action
33+
uses: checkmarx-ts/checkmarx-cxflow-github-action@v1.4
34+
with:
35+
project: ${{ github.event.repository.name }}
36+
team: /CxServer
37+
checkmarx_url: ${{ secrets.CHECKMARX_URL }} # To be stored in GitHub Secrets.
38+
checkmarx_username: ${{ secrets.CHECKMARX_USERNAME }} # To be stored in GitHub Secrets.
39+
checkmarx_password: ${{ secrets.CHECKMARX_PASSWORD }} # To be stored in GitHub Secrets.
40+
checkmarx_client_secret: ${{ secrets.CHECKMARX_CLIENT_SECRET }} # To be stored in GitHub Secrets.
41+
sca_api_url: https://api.scacheckmarx.com
42+
sca_app_url: https://sca.scacheckmarx.com
43+
sca_access_control_url: https://platform.checkmarx.net
44+
sca_tenant: SCA-champions # <-- Insert Checkmarx CxSCA Tenant
45+
sca_username: ${{ secrets.CHECKMARX_SCA_USERNAME }} # To be stored in GitHub Secrets.
46+
sca_password: ${{ secrets.CHECKMARX_SCA_PASSWORD }} # To be stored in GitHub Secrets.
47+
break_build: false
48+
github_token: ${{secrets.GH_TOKEN}} # To be stored in GitHub Secrets.
49+
incremental: false
50+
scanners: sast, sca
51+
bug_tracker: GitHub
52+
params: --cx-flow.zip-exclude=".github/" --namespace=${{ github.repository_owner }} --repo-name=${{ github.event.repository.name }} --branch=${{ github.ref }}
53+
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# This is a basic workflow to create GitHub Issues using the Checkmarx CxFlow GitHub Action. It runs on a pull-request to the main branch.
2+
#
3+
# The following GitHub Secrets must be first defined:
4+
# - CHECKMARX_URL
5+
# - CHECKMARX_USERNAME
6+
# - CHECKMARX_PASSWORD
7+
# - CHECKMARX_CLIENT_SECRET
8+
# - GH_TOKEN
9+
#
10+
# Update the 'team' field to reflect the team name used in Checkmarx.
11+
#
12+
# For full documentation,including a list of all inputs, please refer to the README https://github.com/checkmarx-ts/checkmarx-cxflow-github-action
13+
14+
name: CxFlow-GitHub-Pull-Request
15+
16+
# Controls when the action will run. Triggers the workflow on push or pull request events but only for the master branch
17+
on:
18+
pull_request:
19+
types: [opened, reopened, synchronize] #Types specify which pull request events will trigger the workflow. For more events refer Github Actions documentation.
20+
branches:
21+
- master
22+
- main
23+
24+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel - this job is specifically configured to use the Checkmarx CxFlow Action
25+
jobs:
26+
# This workflow contains a single job called "build"
27+
build:
28+
# The type of runner that the job will run on - Ubuntu is required as Docker is leveraged for the action
29+
runs-on: ubuntu-latest
30+
steps:
31+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
32+
- uses: actions/checkout@v2
33+
- name: Checkmarx CxFlow Action
34+
uses: checkmarx-ts/checkmarx-cxflow-github-action@v1.4
35+
with:
36+
project: ${{ github.event.repository.name }}-${{ github.head_ref }}
37+
team: /CxServer/cxflow/jbrotsos
38+
preset: Checkmarx Default
39+
checkmarx_url: ${{ secrets.CHECKMARX_URL }} # To be stored in GitHub Secrets.
40+
checkmarx_username: ${{ secrets.CHECKMARX_USERNAME }} # To be stored in GitHub Secrets.
41+
checkmarx_password: ${{ secrets.CHECKMARX_PASSWORD }} # To be stored in GitHub Secrets.
42+
checkmarx_client_secret: ${{ secrets.CHECKMARX_CLIENT_SECRET }} # To be stored in GitHub Secrets.
43+
sca_api_url: https://api.scacheckmarx.com
44+
sca_app_url: https://sca.scacheckmarx.com
45+
sca_access_control_url: https://platform.checkmarx.net
46+
sca_tenant: SCA-champions # <-- Insert Checkmarx CxSCA Tenant
47+
sca_username: ${{ secrets.CHECKMARX_SCA_USERNAME }} # To be stored in GitHub Secrets.
48+
sca_password: ${{ secrets.CHECKMARX_SCA_PASSWORD }} # To be stored in GitHub Secrets.
49+
incremental: false
50+
break_build: false
51+
scanners: sast, sca
52+
bug_tracker: GitHubPull
53+
params: --namespace=${{ github.repository_owner }} --repo-name=${{ github.event.repository.name }} --branch=${{ github.head_ref }} --merge-id=${{ github.event.number }} --checkmarx.setting-override=true --sca.filter-severity=HIGH --cx-flow.filter-severity=High
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# This is a basic workflow to create GitHub Issues using the Checkmarx CxFlow GitHub Action. It runs on a push to the main branch.
2+
#
3+
# The following GitHub Secrets must be first defined:
4+
# - CHECKMARX_URL
5+
# - CHECKMARX_USERNAME
6+
# - CHECKMARX_PASSWORD
7+
# - CHECKMARX_CLIENT_SECRET
8+
# - GH_TOKEN
9+
#
10+
# Update the 'team' field to reflect the team name used in Checkmarx.
11+
#
12+
# For full documentation, including a list of all inputs, please refer to the README https://github.com/checkmarx-ts/checkmarx-cxflow-github-action
13+
14+
name: CxFlow-GitHub-Issue-Push
15+
# Controls when the action will run. Triggers the workflow on push or pull request events but only for the master branch
16+
on:
17+
push:
18+
branches:
19+
- main
20+
- master
21+
22+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel - this job is specifically configured to use the Checkmarx CxFlow Action
23+
jobs:
24+
# This workflow contains a single job called "build"
25+
build:
26+
# The type of runner that the job will run on - Ubuntu is required as Docker is leveraged for the action
27+
runs-on: ubuntu-latest
28+
# Steps require - checkout code, run CxFlow Action, Upload SARIF report (optional)
29+
steps:
30+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
31+
- uses: actions/checkout@v2
32+
- name: Checkmarx CxFlow Action
33+
uses: checkmarx-ts/checkmarx-cxflow-github-action@v1.4
34+
with:
35+
project: ${{ github.event.repository.name }}
36+
team: /CxServer
37+
checkmarx_url: ${{ secrets.CHECKMARX_URL }} # To be stored in GitHub Secrets.
38+
checkmarx_username: ${{ secrets.CHECKMARX_USERNAME }} # To be stored in GitHub Secrets.
39+
checkmarx_password: ${{ secrets.CHECKMARX_PASSWORD }} # To be stored in GitHub Secrets.
40+
checkmarx_client_secret: ${{ secrets.CHECKMARX_CLIENT_SECRET }} # To be stored in GitHub Secrets.
41+
sca_api_url: https://api.scacheckmarx.com
42+
sca_app_url: https://sca.scacheckmarx.com
43+
sca_access_control_url: https://platform.checkmarx.net
44+
sca_tenant: SCA-champions # <-- Insert Checkmarx CxSCA Tenant
45+
sca_username: ${{ secrets.CHECKMARX_SCA_USERNAME }} # To be stored in GitHub Secrets.
46+
sca_password: ${{ secrets.CHECKMARX_SCA_PASSWORD }} # To be stored in GitHub Secrets.
47+
github_token: ${{secrets.GH_TOKEN}} # To be stored in GitHub Secrets.
48+
incremental: false
49+
scanners: sast, sca
50+
bug_tracker: Sarif
51+
params: --cx-flow.zip-exclude=".github/" --namespace=${{ github.repository_owner }} --repo-name=${{ github.event.repository.name }} --branch=${{ github.ref }} --checkmarx.settings-override=true
52+
53+
# Upload the Report for CodeQL/Security Alerts
54+
- name: Upload SARIF file
55+
uses: github/codeql-action/upload-sarif@v1
56+
with:
57+
sarif_file: cx.sarif

Dockerfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
FROM debian:9.2
2+
3+
LABEL maintainer "opsxcq@strm.sh"
4+
5+
RUN apt-get update && \
6+
apt-get upgrade -y && \
7+
DEBIAN_FRONTEND=noninteractive apt-get install -y \
8+
debconf-utils && \
9+
echo mariadb-server mysql-server/root_password password vulnerables | debconf-set-selections && \
10+
echo mariadb-server mysql-server/root_password_again password vulnerables | debconf-set-selections && \
11+
DEBIAN_FRONTEND=noninteractive apt-get install -y \
12+
apache2 \
13+
mariadb-server \
14+
php \
15+
php-mysql \
16+
php-pgsql \
17+
php-pear \
18+
php-gd \
19+
&& \
20+
apt-get clean && \
21+
rm -rf /var/lib/apt/lists/*
22+
23+
COPY php.ini /etc/php5/apache2/php.ini
24+
COPY dvwa /var/www/html
25+
26+
COPY config.inc.php /var/www/html/config/
27+
28+
RUN chown www-data:www-data -R /var/www/html && \
29+
rm /var/www/html/index.html
30+
31+
RUN service mysql start && \
32+
sleep 3 && \
33+
mysql -uroot -pvulnerables -e "CREATE USER app@localhost IDENTIFIED BY 'vulnerables';CREATE DATABASE dvwa;GRANT ALL privileges ON dvwa.* TO 'app'@localhost;"
34+
35+
EXPOSE 80
36+
37+
COPY main.sh /
38+
ENTRYPOINT ["/main.sh"]

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# GH Demo

0 commit comments

Comments
 (0)