Skip to content

Commit 0b05caf

Browse files
xanitizer-analysis.yml
1 parent 4faf87e commit 0b05caf

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
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+
# This workflow downloads and installs the latest version of Xanitizer, builds your project, runs a Xanitizer security analysis on it,
7+
# and then archives the findings list reports and uploads the findings into the GitHub code scanning alert section of your repository.
8+
#
9+
# Documentation for the `RIGS-IT/xanitizer-action` is located here: https://github.com/RIGS-IT/xanitizer-action
10+
#
11+
# To use this basic workflow, you will need to complete the following setup steps:
12+
#
13+
# 1. The underlying Xanitizer, used in this workflow, needs a separate license file.
14+
# Licenses are free of charge for open source projects and for educational usage.
15+
# To get more information about the Xanitizer licenses and how to obtain a license file,
16+
# please consult https://www.xanitizer.com/xanitizer-pricing/.
17+
#
18+
# 2. The content of the license file has to be stored as a GitHub secret (e.g. XANITIZER_LICENSE) on this repository.
19+
# Please consult https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets for details.
20+
#
21+
# 3. Reference the GitHub secret in the step using the `RIGS-IT/xanitizer-action` GitHub action.
22+
# Example:
23+
# - name: Xanitizer Security Analysis
24+
# uses: RIGS-IT/xanitizer-action@v1
25+
# with:
26+
# license: ${{ secrets.XANITIZER_LICENSE }}
27+
#
28+
# 4. As a static application security testing (SAST) tool,
29+
# Xanitizer requires that all dependencies of the artifacts being analyzed can be resolved successfully.
30+
# So you have to install all used libraries and build your project before running the security analysis,
31+
# e.g. via `mvn compile` for Java or `npm install` for JavaScript
32+
33+
name: "Xanitizer Security Analysis"
34+
35+
on:
36+
push:
37+
branches: [ develop ]
38+
pull_request:
39+
# The branches below must be a subset of the branches above
40+
branches: [ develop ]
41+
schedule:
42+
- cron: '40 13 * * 5'
43+
workflow_dispatch:
44+
45+
jobs:
46+
xanitizer-security-analysis:
47+
# Xanitizer runs on ubuntu-latest and windows-latest.
48+
runs-on: ubuntu-latest
49+
50+
steps:
51+
# Check out the repository
52+
- name: Checkout
53+
uses: actions/checkout@v2
54+
55+
# Set up the correct Java version for your project
56+
# Please comment out, if your project does not contain Java source code.
57+
- name: Set up JDK 11
58+
uses: actions/setup-java@v1
59+
with:
60+
java-version: 11
61+
62+
# Compile the code for Java projects and get all libraries, e.g. via Maven
63+
# Please adapt, if your project uses another build system to compile Java source code.
64+
# Please comment out, if your project does not contain Java source code.
65+
- name: Compile Java code
66+
run: mvn -B compile
67+
68+
# Install all dependent libraries for JavaScript/TypeScript projects, e.g. via npm
69+
# Please adapt to run `npm install` in the correct directories.
70+
# Please adapt, if your project uses another package manager for getting JavaScript libraries.
71+
# Please comment out, if your project does not use a package manager for getting JavaScript libraries.
72+
- name: Install JavaScript libraries
73+
run: npm install
74+
75+
# Run the security analysis with default settings
76+
- name: Xanitizer Security Analysis
77+
uses: RIGS-IT/xanitizer-action@87d13138fb113b727cbe040c744a15a2b4fe5316
78+
with:
79+
license: ${{ secrets.XANITIZER_LICENSE }}
80+
81+
# Archiving the findings list reports
82+
- uses: actions/upload-artifact@v2
83+
with:
84+
name: Xanitizer-Reports
85+
path: |
86+
*-Findings-List.pdf
87+
*-Findings-List.sarif
88+
89+
# Uploads the findings into the GitHub code scanning alert section using the upload-sarif action
90+
- uses: github/codeql-action/upload-sarif@v1
91+
with:
92+
sarif_file: Xanitizer-Findings-List.sarif

0 commit comments

Comments
 (0)