Detailed guide

A step-by-step guide to integrating GitHub Actions

1. Add XEIZE_TOKEN

Add XEIZE_TOKEN as an Actions secret.

To share the token across repositories, create an organization-level secret and grant the target repositories access.

GitHub Actions secret settings

2. Add a GitHub Actions workflow

In the repository’s .github/workflows folder, select + and create main.yaml.

Creating a workflow file

Paste the SAST workflow example into the file.

  • To change the language of SAST, Secret, and IaC results, add LANG: EN (English) or LANG: JP (Japanese) to env. An unset or unsupported value defaults to Korean.
  • To scan for secrets too, add a separate workflow such as secret.yaml with MODE: secret.
  • For a self-hosted runner, set runs-on to its labels.

Select Commit changes to save the workflow.

Saving the workflow

3. Verify with a PR

Clone the repository

Copy the repository’s clone URL. In your terminal, run git clone REPOSITORY_URL, replacing REPOSITORY_URL with the copied URL.

Repository clone URL

Create a branch

  1. Run cd repository to enter the cloned directory, replacing repository with its actual name.
  2. Run git checkout -b pr-test to create the pr-test branch.
  3. Create the following intentionally vulnerable files in that directory.

vuln_crypto.py

python
# Unsafe Crypto Algorithm + Hardcoded key
from Crypto.Cipher import DES
ENCRYPTION_KEY = b"weak_key"
cipher = DES.new(ENCRYPTION_KEY, DES.MODE_ECB)

vuln_exec.py

python
# Unsafe Flask RCE
from flask import Flask, request

app = Flask(__name__)

@app.route('/exec')
def unsafe_exec():
    code = request.args.get('code')
    eval(code)
    return "Dangerous Code executed"
  1. Commit the changes and push the pr-test branch.
text
git add . 
git commit -m "add tests"
git push origin pr-test
  1. Return to the repository, open Pull requests, and select New pull request.
Opening a pull request
  1. Choose the base branch and set the compare branch to pr-test. Select Create pull request, enter a title and description, then select Create pull request again to submit.
Selecting the test branch
  1. When the workflow finishes, look for the XEIZE findings in the pull request comments.
XEIZE comments on the pull request