TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Finding potential software vulnerabilities from Git commit messages

46 pointsby adulauover 5 years ago

2 comments

nograpesover 5 years ago
In case anyone else was curious, the regular expression used is:<p>vulnpatterns = re.compile(&quot;(?i)(denial of service |\bXX E\b|remote code execution|\bopen redirect|OSVDB|\bvuln|\bCVE\b |\bXSS\b|\bReDoS\b|\bNVD\b|malicious|x−frame−options|attack|cross site |exploit|malicious|directory traversal |\bRCE\b|\bdos\b|\bXSRF \b|\bXSS\b|clickjack|session.fixation|hijack|\badvisory|\binsecure |security |\bcross−origin\b|unauthori[z|s]ed |infinite loop)&quot;)
评论 #21438241 未加载
pedro1976over 5 years ago
This reminds me of a paper from google, where they try to determine how risky a change to a file is, according to its commit history. Given you use semantic commit messages, you can just look on the number of fix() commits and infer a risk level. Later, depending on the calculated risk, you may run a different set of tests.