Skip to content

utils: Improve email parsing when generating release notes - #7537

Merged
echoix merged 1 commit into
OSGeo:mainfrom
echoix-org:alert-autofix-153
Jun 12, 2026
Merged

echoix merged 1 commit into
OSGeo:mainfrom
echoix-org:alert-autofix-153

Conversation

@echoix

@echoix echoix commented Jun 11, 2026 •

Copy link
Copy Markdown
Member

I've reread the suggestion, and seems to work the same, and it would fix what is detected here


Potential fix for https://github.com/OSGeo/grass/security/code-scanning/473

Use structured validation for the email instead of a plain suffix check.
Best fix: parse author_email into local-part and domain (split once on @), require the domain to be exactly users.noreply.github.com, and only then extract the GitHub username from the local-part (id+login or login). If parsing/validation fails, fall back to the existing non-noreply mapping path.

In utils/generate_release_notes.py, replace the endswith("users.noreply.github.com") branch in notes_from_git_log with exact domain validation logic. No new imports or dependencies are required.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…ng sanitization

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@github-actions github-actions Bot added the Python Related code is in Python label Jun 11, 2026
@echoix
echoix merged commit e009a0a into OSGeo:main Jun 12, 2026
27 of 30 checks passed
@github-actions github-actions Bot added this to the 8.6.0 milestone Jun 12, 2026
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Jul 7, 2026
Potential fix for code scanning alert no. 153: Incomplete URL substring sanitization

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@echoix
echoix deleted the alert-autofix-153 branch September 12, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Python Related code is in Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants