Skip to content

Commit 2924979

Browse files
committed
Merge branch 'main' of https://github.com/thomasbeck95/CTM
2 parents 54b6ef6 + 2c21598 commit 2924979

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3946
-213
lines changed

.github/workflows/codeql.yml

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL Advanced"
13+
14+
on:
15+
push:
16+
branches: [ "main" ]
17+
pull_request:
18+
branches: [ "main" ]
19+
schedule:
20+
- cron: '39 14 * * 4'
21+
22+
jobs:
23+
analyze:
24+
name: Analyze (${{ matrix.language }})
25+
# Runner size impacts CodeQL analysis time. To learn more, please see:
26+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27+
# - https://gh.io/supported-runners-and-hardware-resources
28+
# - https://gh.io/using-larger-runners (GitHub.com only)
29+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31+
permissions:
32+
# required for all workflows
33+
security-events: write
34+
35+
# required to fetch internal or private CodeQL packs
36+
packages: read
37+
38+
# only required for workflows in private repositories
39+
actions: read
40+
contents: read
41+
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
include:
46+
- language: javascript-typescript
47+
build-mode: none
48+
- language: python
49+
build-mode: none
50+
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
51+
# Use `c-cpp` to analyze code written in C, C++ or both
52+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
53+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
54+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
55+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
56+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
57+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
58+
steps:
59+
- name: Checkout repository
60+
uses: actions/checkout@v4
61+
62+
# Add any setup steps before running the `github/codeql-action/init` action.
63+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
64+
# or others). This is typically only required for manual builds.
65+
# - name: Setup runtime (example)
66+
# uses: actions/setup-example@v1
67+
68+
# Initializes the CodeQL tools for scanning.
69+
- name: Initialize CodeQL
70+
uses: github/codeql-action/init@v3
71+
with:
72+
languages: ${{ matrix.language }}
73+
build-mode: ${{ matrix.build-mode }}
74+
# If you wish to specify custom queries, you can do so here or in a config file.
75+
# By default, queries listed here will override any specified in a config file.
76+
# Prefix the list here with "+" to use these queries and those in the config file.
77+
78+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
79+
# queries: security-extended,security-and-quality
80+
81+
# If the analyze step fails for one of the languages you are analyzing with
82+
# "We were unable to automatically build your code", modify the matrix above
83+
# to set the build mode to "manual" for that language. Then modify this step
84+
# to build your code.
85+
# ℹ️ Command-line programs to run using the OS shell.
86+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
87+
- if: matrix.build-mode == 'manual'
88+
shell: bash
89+
run: |
90+
echo 'If you are using a "manual" build mode for one or more of the' \
91+
'languages you are analyzing, replace this with the commands to build' \
92+
'your code, for example:'
93+
echo ' make bootstrap'
94+
echo ' make release'
95+
exit 1
96+
97+
- name: Perform CodeQL Analysis
98+
uses: github/codeql-action/analyze@v3
99+
with:
100+
category: "/language:${{matrix.language}}"

.github/workflows/fortify.yml

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
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+
################################################################################################################################################
7+
# Fortify Application Security provides your team with solutions to empower DevSecOps practices, enable cloud transformation, and secure your #
8+
# software supply chain. To learn more about Fortify, start a free trial or contact our sales team, visit fortify.com. #
9+
# #
10+
# Use this starter workflow as a basis for integrating Fortify Application Security Testing into your GitHub workflows. This template #
11+
# demonstrates the steps to package the code+dependencies, initiate a scan, and optionally import SAST vulnerabilities into GitHub Security #
12+
# Code Scanning Alerts. Additional information is available in the workflow comments and the Fortify AST Action / fcli / Fortify product #
13+
# documentation. If you need additional assistance, please contact Fortify support. #
14+
################################################################################################################################################
15+
16+
name: Fortify AST Scan
17+
18+
# Customize trigger events based on your DevSecOps process and/or policy
19+
on:
20+
push:
21+
branches: [ "main" ]
22+
pull_request:
23+
# The branches below must be a subset of the branches above
24+
branches: [ "main" ]
25+
schedule:
26+
- cron: '41 21 * * 5'
27+
workflow_dispatch:
28+
29+
jobs:
30+
Fortify-AST-Scan:
31+
# Use the appropriate runner for building your source code. Ensure dev tools required to build your code are present and configured appropriately (MSBuild, Python, etc).
32+
runs-on: ubuntu-latest
33+
permissions:
34+
actions: read
35+
contents: read
36+
security-events: write
37+
38+
steps:
39+
# Check out source code
40+
- name: Check Out Source Code
41+
uses: actions/checkout@v4
42+
43+
# Java is required to run the various Fortify utilities. Ensuring proper version is installed on the runner.
44+
- name: Setup Java
45+
uses: actions/setup-java@v4
46+
with:
47+
java-version: 17
48+
distribution: 'temurin'
49+
50+
# Perform SAST and optionally SCA scan via Fortify on Demand/Fortify Hosted/Software Security Center, then
51+
# optionally export SAST results to the GitHub code scanning dashboard. In case further customization is
52+
# required, you can use sub-actions like fortify/github-action/setup@v1 to set up the various Fortify tools
53+
# and run them directly from within your pipeline; see https://github.com/fortify/github-action#readme for
54+
# details.
55+
- name: Run FoD SAST Scan
56+
uses: fortify/github-action@a92347297e02391b857e7015792cd1926a4cd418
57+
with:
58+
sast-scan: true
59+
env:
60+
### Required configuration when integrating with Fortify on Demand
61+
FOD_URL: https://ams.fortify.com
62+
FOD_TENANT: ${{secrets.FOD_TENANT}}
63+
FOD_USER: ${{secrets.FOD_USER}}
64+
FOD_PASSWORD: ${{secrets.FOD_PAT}}
65+
### Optional configuration when integrating with Fortify on Demand
66+
# EXTRA_PACKAGE_OPTS: -oss # Extra 'scancentral package' options, like '-oss'' if
67+
# Debricked SCA scan is enabled on Fortify on Demand
68+
# EXTRA_FOD_LOGIN_OPTS: --socket-timeout=60s # Extra 'fcli fod session login' options
69+
# FOD_RELEASE: MyApp:MyRelease # FoD release name, default: <org>/<repo>:<branch>; may
70+
# replace app+release name with numeric release ID
71+
# DO_WAIT: true # Wait for scan completion, implied if 'DO_EXPORT: true'
72+
# DO_EXPORT: true # Export SAST results to GitHub code scanning dashboard
73+
### Required configuration when integrating with Fortify Hosted / Software Security Center & ScanCentral
74+
# SSC_URL: ${{secrets.SSC_URL}} # SSC URL
75+
# SSC_TOKEN: ${{secrets.SSC_TOKEN}} # SSC CIToken or AutomationToken
76+
# SC_SAST_TOKEN: ${{secrets.SC_SAST_TOKEN}} # ScanCentral SAST client auth token
77+
# SC_SAST_SENSOR_VERSION: ${{vars.SC_SAST_SENSOR_VERSION}} # Sensor version on which to run the scan;
78+
# usually defined as organization or repo variable
79+
### Optional configuration when integrating with Fortify Hosted / Software Security Center & ScanCentral
80+
# EXTRA_SC_SAST_LOGIN_OPTS: --socket-timeout=60s # Extra 'fcli sc-sast session login' options
81+
# SSC_APPVERSION: MyApp:MyVersion # SSC application version, default: <org>/<repo>:<branch>
82+
# EXTRA_PACKAGE_OPTS: -bv myCustomPom.xml # Extra 'scancentral package' options
83+
# DO_WAIT: true # Wait for scan completion, implied if 'DO_EXPORT: true'
84+
# DO_EXPORT: true # Export SAST results to GitHub code scanning dashboard

0 commit comments

Comments
 (0)