id: github-actions-workflow-security-gate
namespace: company.team
description: |
GitHub Actions Workflow Security Gate. Before a change to a repository's CI is merged, scans every GitHub Actions
workflow and composite action at two exact commits with zizmor, offline, and blocks only the security findings
that the candidate commit introduces. Existing findings are reported without blocking, and an incomplete scan is
never reported as clean.
inputs:
- id: repo_url
type: STRING
displayName: GitHub repository
description: Public GitHub repository, https://github.com/<owner>/<repo>. No
other host, scheme, port or credentials.
defaults: https://github.com/AyushVUpadhye/kestra-github-actions-security-gate-demo
validator: '^https://github\.com/[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?/[A-Za-z0-9_][A-Za-z0-9._-]{0,99}$'
- id: base_commit
type: STRING
displayName: Base commit SHA
description: Full 40-character SHA the change is compared against, usually the
pull request's base. Branch and tag names are not accepted.
defaults: e28ccb0d2447f900e47cbf53899e006dc3f60b05
validator: '^[0-9a-f]{40}$'
- id: candidate_commit
type: STRING
displayName: Candidate commit SHA
description: Full 40-character SHA of the change, usually the pull request's
head. Branch and tag names are not accepted.
defaults: cc9759b83b995deebb768e6eadf8b1609f478f0e
validator: '^[0-9a-f]{40}$'
- id: min_severity
type: SELECT
displayName: Minimum severity
description: New findings at or above this severity (and the minimum confidence)
block the change.
values:
- informational
- low
- medium
- high
defaults: medium
- id: min_confidence
type: SELECT
displayName: Minimum confidence
description: New findings at or above this confidence (and the minimum severity)
block the change.
values:
- low
- medium
- high
defaults: medium
- id: pr_number
type: INT
displayName: Pull request number
description: Optional. When set, the verdict is posted on this pull request of
the same repository, and kept up to date on later runs.
required: false
min: 1
tasks:
- id: gate
type: io.kestra.plugin.core.flow.WorkingDirectory
description: One workspace for the pinned scanner and the two checkouts.
inputFiles:
requirements.txt: |
zizmor==1.30.1 --hash=sha256:eee12266b793cb87ad4a7e3af2e72404f8a63e3de5eb099b80bf7b1cfd232a8e --hash=sha256:92906f448365672ebb657fb50d36f997290a3aaba8cac723214741ea9054845d
gate.py: |
import hashlib
import json
import os
import re
import subprocess
import sys
import time
ZIZMOR = "/opt/gate/bin/zizmor"
FLAGS = ["--offline", "--no-config", "--no-ignores", "--strict-collection", "--persona=pedantic",
"--format", "json-v1", "--no-progress", "--color", "never"]
SIDES = ("base", "candidate")
SEVERITY = {"informational": 0, "low": 1, "medium": 2, "high": 3}
CONFIDENCE = {"low": 1, "medium": 2, "high": 3}
MAX_FILES = 200
MAX_BYTES = 1024 * 1024
FILE_SECONDS = 60
TOTAL_SECONDS = 480
SCHEMA = "kestra-github-actions-workflow-security-gate/1.0"
UNPARSEABLE = ("failed to parse input", "failed to validate", "failed to load", "is not valid YAML")
def short(text, limit=200):
text = " ".join(str(text or "").split())
return text if len(text) <= limit else text[:limit - 3] + "..."
def inputs(root):
"""Workflow files and action manifests, regular files only. Symbolic links were already removed on the worker."""
found = []
workflows = os.path.join(root, ".github", "workflows")
if os.path.isdir(workflows) and not os.path.islink(workflows):
for name in os.listdir(workflows):
path = os.path.join(workflows, name)
if name.endswith((".yml", ".yaml")) and os.path.isfile(path) and not os.path.islink(path):
found.append(os.path.relpath(path, root))
for folder, dirs, names in os.walk(root, followlinks=False):
dirs[:] = [d for d in dirs if d != ".git" and not os.path.islink(os.path.join(folder, d))]
for name in names:
path = os.path.join(folder, name)
if name in ("action.yml", "action.yaml") and os.path.isfile(path) and not os.path.islink(path):
found.append(os.path.relpath(path, root))
return sorted(set(p.replace(os.sep, "/") for p in found))
def normalise(raw, root):
findings = []
for f in raw:
locations = f.get("locations") or []
# A finding without a location is never dropped silently: the caller turns this into a scanner error.
prim = next((l for l in locations if l["symbolic"].get("kind") == "Primary"), locations[0])
path = prim["symbolic"]["key"]["Local"]["verbatim_path"]
if not path.startswith(root + "/"):
raise KeyError("finding outside the scanned checkout")
path = path[len(root) + 1:]
severity = f["determinations"]["severity"].lower()
confidence = f["determinations"]["confidence"].lower()
if severity not in SEVERITY or confidence not in CONFIDENCE:
raise KeyError("unknown severity or confidence")
feature = prim.get("concrete", {}).get("feature", "")
annotation = prim["symbolic"].get("annotation", "")
ident = f["ident"]
findings.append({
"audit": ident,
"severity": severity,
"confidence": confidence,
"path": path,
"line": prim["concrete"]["location"]["start_point"]["row"] + 1,
"annotation": short(annotation, 160),
"feature": short(feature, 200),
"url": f.get("url", ""),
# Line numbers are left out, so a finding that only moved is not new. Severity and confidence are kept,
# so a change that makes an existing line more dangerous is.
"fingerprint": hashlib.sha256("\x1f".join([ident, path, feature, annotation, severity, confidence]).encode()).hexdigest()[:16],
})
return findings
def scan_side(side, work, deadline):
root = os.path.realpath(os.path.join(work, side))
files = inputs(root)
result = {"files": [], "findings": [], "limit": None, "all": files}
if len(files) > MAX_FILES:
result["limit"] = "%d workflow or action files, more than the limit of %d" % (len(files), MAX_FILES)
files = files[:MAX_FILES]
for rel in files:
path = os.path.join(root, rel)
entry = {"path": rel, "status": "ok", "detail": None, "findings": 0}
result["files"].append(entry)
size = os.path.getsize(path)
if size > MAX_BYTES:
entry.update(status="oversized", detail="%d bytes, more than the limit of %d" % (size, MAX_BYTES))
continue
remaining = deadline - time.monotonic()
if remaining <= 1:
entry.update(status="not_scanned", detail="the total scan time limit was reached")
continue
command = ["setpriv", "--reuid=65534", "--regid=65534", "--clear-groups", "env", "-i",
"PATH=/usr/bin:/bin", "HOME=/tmp", ZIZMOR] + FLAGS + [path]
try:
done = subprocess.run(command, capture_output=True, timeout=min(FILE_SECONDS, remaining), cwd="/tmp")
except subprocess.TimeoutExpired:
entry.update(status="timeout", detail="scan did not finish within %d seconds" % min(FILE_SECONDS, int(remaining)))
continue
stderr = done.stderr.decode("utf-8", "replace").replace(root + "/", "")
if done.returncode not in (0, 10, 11, 12, 13, 14):
reason = next((l.strip() for l in stderr.splitlines() if "failed to" in l or "error:" in l), "") or "exit code %d" % done.returncode
unparseable = any(marker in stderr for marker in UNPARSEABLE)
entry.update(status="unparseable" if unparseable else "scanner_error", detail=short(reason, 240))
continue
try:
raw = json.loads(done.stdout.decode("utf-8") or "[]")
except ValueError:
entry.update(status="scanner_error", detail="scanner output is not valid JSON")
continue
try:
found = normalise(raw, root)
except (KeyError, TypeError, IndexError, AttributeError):
entry.update(status="scanner_error", detail="scanner output has an unexpected structure")
continue
if done.returncode >= 11 and not found:
entry.update(status="scanner_error", detail="exit code %d reports findings but the output has none" % done.returncode)
continue
entry["findings"] = len(found)
result["findings"].extend(found)
return result
def scan(work):
deadline = time.monotonic() + TOTAL_SECONDS
started = time.monotonic()
out = {side: scan_side(side, work, deadline) for side in SIDES}
print("Scanned %d base and %d candidate file(s) in %.1fs" % (
len(out["base"]["files"]), len(out["candidate"]["files"]), time.monotonic() - started))
return out
def symlinked(work, side):
path = os.path.join(work, ".gate", side + "-symlinked-inputs")
if not os.path.isfile(path):
return []
with open(path, "rb") as f:
names = [n.decode("utf-8", "replace") for n in f.read().split(b"\0") if n]
return sorted(set(n[len(side) + 1:] if n.startswith(side + "/") else n for n in names))
def qualifies(f, min_severity, min_confidence):
return SEVERITY[f["severity"]] >= SEVERITY[min_severity] and CONFIDENCE.get(f["confidence"], 0) >= CONFIDENCE[min_confidence]
def classify(env, scanned):
min_severity, min_confidence = env["MIN_SEVERITY"], env["MIN_CONFIDENCE"]
base, cand = scanned["base"], scanned["candidate"]
links = {side: symlinked(env["WORK"], side) for side in SIDES}
base_status = {f["path"]: f["status"] for f in base["files"]}
base_all = set(base["all"])
def comparable(path):
"""Whether a candidate finding in this file can be compared with a fully scanned base version."""
if any(path == link or path.startswith(link + "/") for link in links["base"]):
return False # the base version was a symbolic link, or sat under one, and was never read
if path in base_all:
return base_status.get(path) == "ok" # missing here means it was over the file limit
return True # the file does not exist in the base, so every finding in it is new
# Base findings are counted per fingerprint, so two identical findings stay distinct from one.
remaining = {}
for f in base["findings"]:
remaining[f["fingerprint"]] = remaining.get(f["fingerprint"], 0) + 1
new, existing, unknown = [], [], []
for f in sorted(cand["findings"], key=lambda x: (x["path"], x["line"], x["audit"], x["fingerprint"])):
if remaining.get(f["fingerprint"], 0) > 0:
remaining[f["fingerprint"]] -= 1
existing.append(f)
elif not comparable(f["path"]):
unknown.append(f) # newness cannot be decided, so this never counts as new or existing
else:
new.append(f)
cand_prints = {}
for f in cand["findings"]:
cand_prints[f["fingerprint"]] = cand_prints.get(f["fingerprint"], 0) + 1
fixed = []
for f in sorted(base["findings"], key=lambda x: (x["path"], x["line"], x["audit"], x["fingerprint"])):
if cand_prints.get(f["fingerprint"], 0) > 0:
cand_prints[f["fingerprint"]] -= 1
else:
fixed.append(f)
q = lambda items: [f for f in items if qualifies(f, min_severity, min_confidence)]
new_q, existing_q, unknown_q, fixed_q = q(new), q(existing), q(unknown), q(fixed)
incomplete = []
for side in SIDES:
for f in scanned[side]["files"]:
if f["status"] != "ok":
incomplete.append({"side": side, "path": f["path"], "status": f["status"], "detail": f["detail"]})
if scanned[side]["limit"]:
incomplete.append({"side": side, "path": None, "status": "too_many_files", "detail": scanned[side]["limit"]})
for path in links[side]:
incomplete.append({"side": side, "path": path, "status": "symlink", "detail": "symbolic link, removed and not followed"})
incomplete.sort(key=lambda x: (x["side"], x["path"] or "", x["status"]))
codes = {"unparseable": "WORKFLOW_UNPARSEABLE", "scanner_error": "SCANNER_ERROR", "timeout": "SCAN_TIMEOUT",
"not_scanned": "SCAN_TIMEOUT", "oversized": "LIMIT_EXCEEDED", "too_many_files": "LIMIT_EXCEEDED",
"symlink": "UNSUPPORTED_SYMLINK"}
inconclusive = sorted({codes[i["status"]] for i in incomplete})
if new_q:
verdict, reasons = "BLOCK", ["NEW_FINDINGS"]
elif inconclusive:
verdict, reasons = "INCONCLUSIVE", inconclusive
elif existing_q:
verdict, reasons = "WARN", ["EXISTING_FINDINGS"]
else:
verdict, reasons = "PASS", ([] if cand["files"] else ["NO_WORKFLOW_FILES"])
if verdict == "BLOCK" and inconclusive:
reasons = reasons + inconclusive
slug = re.sub(r"\.git$", "", env["REPO_URL"].replace("https://github.com/", ""))
below = lambda items: len(items) - len(q(items))
report = {
"schema": SCHEMA,
"verdict": verdict,
"reasonCodes": reasons,
"repository": {"url": env["REPO_URL"], "slug": slug, "baseCommit": env["BASE_COMMIT"], "candidateCommit": env["CANDIDATE_COMMIT"]},
"policy": {"minSeverity": min_severity, "minConfidence": min_confidence, "blockOn": "new findings at or above both thresholds"},
"summary": {
"filesScanned": {side: sum(1 for f in scanned[side]["files"] if f["status"] == "ok") for side in SIDES},
"filesFound": {side: len(scanned[side]["all"]) for side in SIDES}, # every file discovered, even past the limit
"noWorkflowFiles": not cand["files"],
"newQualifying": len(new_q), "existingQualifying": len(existing_q), "fixedQualifying": len(fixed_q),
"undecidedQualifying": len(unknown_q),
"belowThreshold": {"new": below(new), "existing": below(existing)},
"complete": not incomplete,
},
"findings": {"new": new_q, "existing": existing_q, "fixed": fixed_q, "undecided": unknown_q},
"incomplete": incomplete,
"files": {side: scanned[side]["files"] for side in SIDES},
"tool": {"name": "zizmor", "version": "1.30.1", "flags": FLAGS[:6], "network": "none", "user": "nobody"},
}
return report
def code(text, limit=120):
return "`" + short(text, limit).replace("`", "'") + "`"
def render(report, execution):
s, f = report["summary"], report["findings"]
rows = [
"### GitHub Actions Workflow Security Gate: " + report["verdict"],
"",
"| | |",
"|---|---|",
"| Repository | " + code(report["repository"]["slug"]) + " |",
"| Commits | " + code(report["repository"]["baseCommit"][:12]) + " -> " + code(report["repository"]["candidateCommit"][:12]) + " |",
"| Files scanned | " + str(s["filesScanned"]["candidate"]) + " of " + str(s["filesFound"]["candidate"]) + " in the candidate |",
"| Policy | block new findings with severity >= " + report["policy"]["minSeverity"] + " and confidence >= " + report["policy"]["minConfidence"] + " |",
"| Findings | " + str(s["newQualifying"]) + " new, " + str(s["existingQualifying"]) + " existing, " + str(s["fixedQualifying"]) + " fixed |",
]
if s["noWorkflowFiles"]:
rows += ["", "No workflow files or action manifests were found in the candidate commit, so there was nothing to scan."]
def listing(title, items, cap):
if not items:
return []
out = ["", "**" + title + "** (" + str(len(items)) + ")", ""]
out += ["- " + code(x["audit"], 40) + " " + x["severity"] + "/" + x["confidence"] + " at " + code(x["path"] + ":" + str(x["line"]), 100)
+ ": " + code(x["annotation"], 100) for x in items[:cap]]
if len(items) > cap:
out.append("- ... " + str(len(items) - cap) + " more in report.json")
return out
rows += listing("New findings", f["new"], 20)
if report["incomplete"]:
rows += ["", "**Not fully analysed** (" + str(len(report["incomplete"])) + ")", ""]
rows += ["- " + i["side"] + " " + code(i["path"] or "(repository)", 100) + ": " + i["status"] + (" - " + code(i["detail"], 120) if i["detail"] else "")
for i in report["incomplete"][:20]]
rows += listing("Existing findings", f["existing"], 10)
rows += ["", "<sub>Kestra execution " + execution + ". zizmor 1.30.1 ran offline with the repository's own configuration and ignore comments disabled; repository code is never executed.</sub>"]
return "\n".join(rows)
def main():
env = os.environ
scanned = scan(env["WORK"])
report = classify(env, scanned)
with open("report.json", "w") as f:
f.write(json.dumps(report, indent=2, sort_keys=True) + "\n")
body = render(report, env["EXECUTION_ID"])
s = report["summary"]
print("Verdict " + report["verdict"] + (": " + ", ".join(report["reasonCodes"]) if report["reasonCodes"] else "")
+ " | new %d, existing %d, fixed %d, incomplete %d" % (s["newQualifying"], s["existingQualifying"], s["fixedQualifying"], len(report["incomplete"])))
print("::" + json.dumps({"outputs": {
"verdict": report["verdict"], "reasonCodes": report["reasonCodes"], "repository": report["repository"]["slug"],
"newFindings": s["newQualifying"], "existingFindings": s["existingQualifying"], "commentBody": body}}) + "::")
if __name__ == "__main__":
main()
tasks:
- id: fetch_tools
type: io.kestra.plugin.scripts.shell.Commands
description: Downloads the zizmor wheel for the worker's platform from PyPI,
checked against pinned SHA-256 hashes. Runs before anything is cloned,
so the only container with network access never sees repository
content.
timeout: PT5M
retry:
type: constant
interval: PT10S
maxAttempts: 3
taskRunner:
type: io.kestra.plugin.scripts.runner.docker.Docker
containerImage: python@sha256:05cda9777409a9c3ffddd94a4c476b79f0769a0b4857f0c7ed9226b6800b0d6f
commands:
- |
pip download --no-deps --only-binary=:all: --require-hashes --no-cache-dir --disable-pip-version-check --timeout 30 --retries 5 --index-url https://pypi.org/simple -r requirements.txt -d wheels
- id: clone_base
type: io.kestra.plugin.git.Clone
description: Checks out the exact base commit, without submodules.
timeout: PT10M
url: "{{ inputs.repo_url }}"
commit: "{{ inputs.base_commit }}"
cloneSubmodules: false
directory: base
- id: clone_candidate
type: io.kestra.plugin.git.Clone
description: Checks out the exact candidate commit, without submodules.
timeout: PT10M
url: "{{ inputs.repo_url }}"
commit: "{{ inputs.candidate_commit }}"
cloneSubmodules: false
directory: candidate
- id: verify
type: io.kestra.plugin.scripts.shell.Commands
description: Runs on the Kestra worker before the scanner container starts,
after dropping every environment variable it does not need. Checks
that each checkout is the requested commit, records workflow files and
action manifests that are symbolic links, deletes every symbolic link
so no container can follow one out of the clone, and removes the .git
folders.
taskRunner:
type: io.kestra.plugin.core.runner.Process
env:
BASE_COMMIT: "{{ inputs.base_commit }}"
CANDIDATE_COMMIT: "{{ inputs.candidate_commit }}"
commands:
- |
set -eu
# This task runs on the Kestra worker, whose environment can hold secrets. Keep only what the checks need.
for NAME in $(export -p | sed -n -e 's/^export \([A-Za-z_][A-Za-z0-9_]*\)=.*/\1/p' -e 's/^declare -x \([A-Za-z_][A-Za-z0-9_]*\)=.*/\1/p'); do
case "$NAME" in BASE_COMMIT|CANDIDATE_COMMIT|PATH|HOME|PWD) ;; *) unset "$NAME" 2>/dev/null || true ;; esac
done
mkdir -p .gate
REMOVED=0; LINKED=0
for side in base candidate; do
if [ "$side" = base ]; then WANT=$BASE_COMMIT; else WANT=$CANDIDATE_COMMIT; fi
HEAD_SHA=$(cat "$side/.git/HEAD")
if [ "$HEAD_SHA" != "$WANT" ]; then echo "$side checkout is at '$HEAD_SHA', not the requested commit $WANT."; exit 1; fi
rm -rf "$side/.git"
# Workflow inputs that are symbolic links are recorded (and reported as not analysed), never followed.
find "$side" -type l \( -path "$side/.github" -o -path "$side/.github/workflows" -o -path "$side/.github/workflows/*" -o -name action.yml -o -name action.yaml \) -print0 > ".gate/$side-symlinked-inputs"
LINKED=$((LINKED + $(tr -cd '\0' < ".gate/$side-symlinked-inputs" | wc -c)))
# Every symbolic link is deleted before any container starts, so nothing can follow one out of the clone.
N=$(find "$side" -type l | wc -l); REMOVED=$((REMOVED + N)); find "$side" -type l -delete
done
echo "Verified both checkouts are the requested commits. Symbolic links removed: $REMOVED, of which workflow inputs: $LINKED."
printf '::{"outputs":{"linksRemoved":%s,"symlinkedInputs":%s}}::\n' "$REMOVED" "$LINKED"
- id: scan
type: io.kestra.plugin.scripts.shell.Commands
description: Offline and without secrets. Installs zizmor from the hash-checked
wheel, scans each workflow file and action manifest of both commits
separately as the unprivileged nobody user with an empty environment,
compares the findings and writes report.json.
timeout: PT10M
taskRunner:
type: io.kestra.plugin.scripts.runner.docker.Docker
networkMode: none
cpu:
cpus: 2
memory:
memory: 1GB
containerImage: python@sha256:05cda9777409a9c3ffddd94a4c476b79f0769a0b4857f0c7ed9226b6800b0d6f
env:
REPO_URL: "{{ inputs.repo_url }}"
BASE_COMMIT: "{{ inputs.base_commit }}"
CANDIDATE_COMMIT: "{{ inputs.candidate_commit }}"
MIN_SEVERITY: "{{ inputs.min_severity }}"
MIN_CONFIDENCE: "{{ inputs.min_confidence }}"
EXECUTION_ID: "{{ execution.id }}"
outputFiles:
- report.json
commands:
- |
set -eu
pip install --no-index --find-links wheels --require-hashes --no-deps --target /opt/gate -r requirements.txt --quiet --disable-pip-version-check --root-user-action=ignore
WORK=$PWD python -I -B gate.py
- id: comment_on_pr
type: io.kestra.plugin.core.flow.If
description: Only touches GitHub when a pull request number was given.
condition: "{{ (inputs.pr_number ?? 0) > 0 }}"
then:
- id: pr_comment
type: io.kestra.plugin.github.issues.Comment
description: One comment per pull request. Later runs update it in place instead
of adding a new one.
oauthToken: "{{ secret('GITHUB_TOKEN') }}"
repository: "{{ outputs.scan.vars.repository }}"
issueNumber: "{{ inputs.pr_number }}"
updateTag: github-actions-workflow-security-gate
body: "{{ outputs.scan.vars.commentBody }}"
- id: verdict
type: io.kestra.plugin.core.flow.Switch
description: BLOCK fails the execution so a pipeline waiting on it stops;
INCONCLUSIVE ends in WARNING; PASS and WARN succeed.
value: "{{ outputs.scan.vars.verdict }}"
cases:
BLOCK:
- id: block
type: io.kestra.plugin.core.execution.Fail
errorMessage: "New workflow security findings: {{ outputs.scan.vars.newFindings
}} ({{ outputs.scan.vars.reasonCodes | join(', ') }})"
INCONCLUSIVE:
- id: inconclusive
type: io.kestra.plugin.core.flow.AllowFailure
description: Ends the execution in WARNING rather than FAILED, and still
publishes the flow outputs.
tasks:
- id: not_fully_scanned
type: io.kestra.plugin.core.execution.Fail
errorMessage: "The workflows could not be fully scanned: {{
outputs.scan.vars.reasonCodes | join(', ') }}"
defaults:
- id: no_new_findings
type: io.kestra.plugin.core.log.Log
message: "{{ outputs.scan.vars.verdict }}: no new findings, {{
outputs.scan.vars.existingFindings }} existing{{
(outputs.scan.vars.reasonCodes | length) > 0 ? ' (' ~
(outputs.scan.vars.reasonCodes | join(', ')) ~ ')' : '' }}"
outputs:
- id: verdict
type: STRING
description: PASS, WARN, BLOCK or INCONCLUSIVE.
value: "{{ outputs.scan.vars.verdict ?? 'ERROR' }}"
- id: reason_codes
type: JSON
description: Reason codes behind the verdict, for example ["NEW_FINDINGS"].
value: "{{ (outputs.scan.vars.reasonCodes ?? []) | toJson }}"
- id: new_findings
type: INT
description: Number of new findings at or above both thresholds.
value: "{{ outputs.scan.vars.newFindings ?? 0 }}"
- id: report
type: FILE
description: report.json, schema kestra-github-actions-workflow-security-gate/1.0.
value: "{{ outputs.scan.outputFiles['report.json'] ?? '' }}"
triggers:
- id: pull_request_webhook
type: io.kestra.plugin.core.trigger.Webhook
description: 'POST {"repo_url", "base_commit", "candidate_commit", "pr_number",
"min_severity", "min_confidence"} from CI when a pull request changes
workflows. Values go through the same validators as a manual run; an
invalid request gets HTTP 422 and no execution.'
key: "{{ secret('WORKFLOW_SECURITY_GATE_WEBHOOK_KEY') }}"
inputs:
repo_url: "{{ trigger.body.repo_url }}"
base_commit: "{{ trigger.body.base_commit }}"
candidate_commit: "{{ trigger.body.candidate_commit }}"
min_severity: "{{ trigger.body.min_severity ?? 'medium' }}"
min_confidence: "{{ trigger.body.min_confidence ?? 'medium' }}"
pr_number: "{{ trigger.body.pr_number ?? '' }}"