Skip to content

Commit e2d8724

Browse files
committed
modify
1 parent 1fe3117 commit e2d8724

1 file changed

Lines changed: 13 additions & 14 deletions

File tree

.github/workflows/pr-copilot-PII-review.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,20 @@ jobs:
7575
7. Potential GDPR, CCPA, or other privacy regulation violations"
7676
7777
RULES="**Output Format Requirements**:
78-
- Output ONLY a GitHub-flavored Markdown table with exactly these columns: File | Concern | Recommendation | Severity
79-
- Every row must reference a real file path from the Changed files list
80-
- Severity must be one of: info, minor, major, critical
81-
- If no PII issues are found, return a single table row with 'All files' in the File column and 'No PII issues found' in the Concern column
82-
- Cite line numbers from the diff using the format L<line>
83-
- Do not wrap the table in backticks or add any prose before or after the table
84-
- Focus on actionable PII-related feedback specific to the diff
78+
Provide specific, actionable feedback including:
79+
1. Relevant file names and line numbers
80+
2. Clear issue descriptions
81+
3. Concrete fix recommendations
82+
4. Severity levels (info, minor, major, critical)
83+
5. Organize the review report in markdown format with clear section structure
8584
8685
**Mandatory Requirements**:
8786
1. Base your review on the actual diff content provided below
8887
2. Provide comprehensive PII analysis with specific examples where applicable
8988
3. Prioritize critical privacy concerns that could lead to data breaches"
9089
90+
REVIEW_FALLBACK="No Personally Identifiable Information (PII) exposure or privacy concerns were detected in the analyzed code changes."
91+
9192
DIFF_SECTION="**Unified diff**:\n$(cat diff.patch)"
9293
9394
export COPILOT_PROMPT="$HEADER\n\n$REVIEW_REQUIREMENTS\n\n$RULES\n\n$DIFF_SECTION"
@@ -101,29 +102,27 @@ jobs:
101102
sed -E 's/\x1B\[[0-9;]*[A-Za-z]//g' copilot_raw.txt | tr -d '\r' > raw_review.md
102103
103104
if ! grep -q '|' raw_review.md; then
104-
printf '%s\n' "$REVIEW_TABLE_FALLBACK" > raw_review.md
105+
printf '%s\n' "$REVIEW_FALLBACK" > raw_review.md
105106
fi
106107
107108
- name: Format review output
108109
run: |
109110
PR_NUMBER="${{ github.event.pull_request.number }}"
110111
111112
cat > review_result.md <<EOF
112-
🔒 **GitHub Copilot Automated PII Review**
113+
**GitHub Copilot CLI PII Review**
113114
114115
---
115116
116-
### 📋 Summary
117-
118-
This is an automated PII (Personally Identifiable Information) security review generated by GitHub Copilot CLI for pull request #${PR_NUMBER}.
117+
This is an PII security review generated by GitHub Copilot CLI for pull request #${PR_NUMBER}.
119118
120-
### 🔍 Review Feedback
119+
### Review Feedback
121120
122121
$(cat raw_review.md)
123122
124123
---
125124
126-
This is an automated PII security review. Please use human judgment when evaluating suggestions.
125+
This is an PII security review by GitHub Copilot CLI. Please use human judgment when evaluating suggestions.
127126
EOF
128127
129128
- name: Post review as PR comment

0 commit comments

Comments
 (0)