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.
.png)
2. Add a GitHub Actions workflow
In the repository’s .github/workflows folder, select + and create main.yaml.
.png)
Paste the SAST workflow example into the file.
- To change the language of SAST, Secret, and IaC results, add
LANG: EN(English) orLANG: JP(Japanese) toenv. An unset or unsupported value defaults to Korean. - To scan for secrets too, add a separate workflow such as
secret.yamlwithMODE: secret. - For a self-hosted runner, set
runs-onto its labels.
Select Commit changes to save the workflow.
.png)
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.
.png)
Create a branch
- Run
cd repositoryto enter the cloned directory, replacingrepositorywith its actual name. - Run
git checkout -b pr-testto create thepr-testbranch. - 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"
- Commit the changes and push the
pr-testbranch.
text
git add .
git commit -m "add tests"
git push origin pr-test
- Return to the repository, open
Pull requests, and selectNew pull request.
.png)
- Choose the base branch and set the compare branch to
pr-test. SelectCreate pull request, enter a title and description, then selectCreate pull requestagain to submit.
.png)
- When the workflow finishes, look for the XEIZE findings in the pull request comments.
.png)