workflow · MervinPraison/PraisonAI@e96afb5 · GitHub
Skip to content

Commit e96afb5

Browse files
committed
workflow
1 parent ebcef4c commit e96afb5

3 files changed

Lines changed: 61 additions & 35 deletions

File tree

.github/actions/claude-code-action/action.yml

Lines changed: 38 additions & 22 deletions

.github/workflows/gemini-issue-review.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,16 @@ jobs:
4646
id: issue_data
4747
env:
4848
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
49+
# Pass user-controlled inputs via environment variables to prevent script injection (GHSL-2025-093)
50+
EVENT_NAME: ${{ github.event_name }}
51+
EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }}
52+
EVENT_COMMENT_BODY: ${{ github.event.comment.body }}
4953
run: |
5054
# Get issue number from event or context
51-
if [ "${{ github.event_name }}" = "issue_comment" ]; then
52-
ISSUE_NUMBER="${{ github.event.issue.number }}"
53-
elif [ "${{ github.event_name }}" = "issues" ]; then
54-
ISSUE_NUMBER="${{ github.event.issue.number }}"
55+
if [ "$EVENT_NAME" = "issue_comment" ]; then
56+
ISSUE_NUMBER="$EVENT_ISSUE_NUMBER"
57+
elif [ "$EVENT_NAME" = "issues" ]; then
58+
ISSUE_NUMBER="$EVENT_ISSUE_NUMBER"
5559
else
5660
echo "Unable to determine issue number"
5761
exit 1
@@ -62,8 +66,8 @@ jobs:
6266
6367
# Extract additional instructions from comment if triggered by comment
6468
ADDITIONAL_INSTRUCTIONS=""
65-
if [ "${{ github.event_name }}" = "issue_comment" ]; then
66-
COMMENT_BODY="${{ github.event.comment.body }}"
69+
if [ "$EVENT_NAME" = "issue_comment" ]; then
70+
COMMENT_BODY="$EVENT_COMMENT_BODY"
6771
ADDITIONAL_INSTRUCTIONS=$(echo "$COMMENT_BODY" | sed -n 's/.*@gemini[[:space:]]*\(.*\)/\1/p' | head -1)
6872
fi
6973

.github/workflows/gemini-pr-review.yml

Lines changed: 13 additions & 7 deletions

0 commit comments

Comments
 (0)