Skip to content

Commit e3e7ef6

Browse files
Create xanitizer-analysis.yml
1 parent c9525f2 commit e3e7ef6

File tree

1 file changed

+86
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)