Commit fe386b2
committed
fix(github): sanitize issue comment and sub-issue bodies on read paths
Issue and PR title/body responses are passed through sanitize.Sanitize
(invisible-glyph, BiDi, HTML-tag and code-fence-metadata stripping), but
the two remaining body-bearing read paths were not:
- convertToMinimalIssueComment returned comment bodies verbatim, so
every comment read delivered raw attacker-controlled content.
- GetSubIssues marshalled sub-issues (title+body) verbatim.
A hostile comment could therefore carry hidden prompt-injection content
(invisible Unicode tag block, BiDi overrides) straight into the model
context, bypassing the control applied on every sibling path.
Apply the same sanitize.Sanitize call in both places.1 parent e7f7bb8 commit fe386b2
2 files changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
946 | 946 | | |
947 | 947 | | |
948 | 948 | | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
949 | 958 | | |
950 | 959 | | |
951 | 960 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
820 | 820 | | |
821 | 821 | | |
822 | 822 | | |
823 | | - | |
824 | | - | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
825 | 827 | | |
826 | 828 | | |
827 | 829 | | |
| |||
0 commit comments