Commit bfb7d0d
authored
fix(security): potential indexerror when parsing malformed readme (#632)
If a line starting with `*` (app entry) appears before any category header (`### •` or `## –`), `categories[-1]` will raise an `IndexError` because the `categories` list will be empty. A malformed or tampered README.md could cause the CI script to crash with an unhandled exception.
Affected files: ensure_sorted.py
Signed-off-by: Trần Bách <45133811+barttran2k@users.noreply.github.com>1 parent 67d3746 commit bfb7d0d
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| |||
0 commit comments