fix: pr-title job has prompt injection
All checks were successful
CI / Check PR Title (pull_request) Successful in 19s
CI / Go Lint (pull_request) Successful in 37s
CI / Makefile Lint (pull_request) Successful in 35s
CI / Markdown Lint (pull_request) Successful in 22s
CI / Unit Tests (pull_request) Successful in 34s
CI / Fuzz Tests (pull_request) Successful in 1m6s
CI / Mutation Tests (pull_request) Successful in 1m18s

- Also, only run on PR template.
This commit is contained in:
2026-04-03 16:40:44 +02:00
parent c834f004a2
commit 39c2f044bc

View File

@@ -9,9 +9,11 @@ jobs:
check-pr-title: check-pr-title:
name: Check PR Title name: Check PR Title
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
env:
TITLE: ${{ gitea.event.pull_request.title }}
steps: steps:
- run: | - run: |
TITLE="${{ gitea.event.pull_request.title }}"
if ! echo "$TITLE" | grep -qE '^(WIP: )?(feat|fix|docs|chore|ci|test|refactor|perf|build|style|revert)(\(.+\))?(!)?: .+'; then if ! echo "$TITLE" | grep -qE '^(WIP: )?(feat|fix|docs|chore|ci|test|refactor|perf|build|style|revert)(\(.+\))?(!)?: .+'; then
echo "::error::Pull Request title must follow conventional commits" echo "::error::Pull Request title must follow conventional commits"
exit 1 exit 1