From 80dab797d2504312d3c45aae316f4710765aa0ea Mon Sep 17 00:00:00 2001 From: Noriko Kono <55174696+norikokono@users.noreply.github.com> Date: Sun, 29 Mar 2026 06:00:02 +0000 Subject: [PATCH 1/3] GSoC 2026: Add Module B/D prototypes - Commit fetcher and Review UI - Add fetch_commits.py: Pre-code experiment for harvesting OWASP repository commits - Add review_prototype.html: HITL review UI prototype with keyboard shortcuts (y/n) - Implements fast review interface optimized for <3 second workflow per item - Part of GSoC Module B (Noise/Relevance Filter) and Module D (HITL) work --- fetch_commits.py | 52 +++++++++++++++++++++++++++++++++++++++++++ review_prototype.html | 24 ++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 fetch_commits.py create mode 100644 review_prototype.html diff --git a/fetch_commits.py b/fetch_commits.py new file mode 100644 index 000000000..a7ed95464 --- /dev/null +++ b/fetch_commits.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python3 +import requests +import json +import random + +# List of OWASP repos +repos = [ + "OWASP/OWASP-Top-10", + "OWASP/ASVS", + "OWASP/wstg", + "OWASP/CheatSheetSeries", + "OWASP/owasp-masvs", + "OWASP/owasp-mstg", + "OWASP/owasp-api-security", + "OWASP/owasp-testing-guide-v4", + "OWASP/owasp-testing-guide-v5", + "OWASP/owasp-zap", + "OWASP/owasp-mstg", + "OWASP/owasp-api-security", + "OWASP/owasp-testing-guide-v4", + "OWASP/owasp-testing-guide-v5", + "OWASP/owasp-zap", + "OWASP/owasp-mstg", + "OWASP/owasp-api-security", + "OWASP/owasp-testing-guide-v4", + "OWASP/owasp-testing-guide-v5", + "OWASP/owasp-zap" +] + +commits = [] + +for repo in repos: + try: + url = f"https://api.github.com/repos/{repo}/commits?per_page=10" + response = requests.get(url) + if response.status_code == 200: + data = response.json() + for commit in data: + message = commit['commit']['message'] + commits.append(message) + if len(commits) >= 100: + break + if len(commits) >= 100: + break + except: + pass + +# Save to file +with open('commits.json', 'w') as f: + json.dump(commits[:100], f, indent=2) + +print(f"Collected {len(commits[:100])} commits") diff --git a/review_prototype.html b/review_prototype.html new file mode 100644 index 000000000..c84bde742 --- /dev/null +++ b/review_prototype.html @@ -0,0 +1,24 @@ + + +
+Sample content to review
+ + + + + From 9d33576b31d6341973e8db5765c6dc03547bb7dc Mon Sep 17 00:00:00 2001 From: Noriko Kono <55174696+norikokono@users.noreply.github.com> Date: Sun, 29 Mar 2026 07:05:20 +0000 Subject: [PATCH 2/3] fix(fetcher): remove duplicate OWASP repos in source list --- fetch_commits.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/fetch_commits.py b/fetch_commits.py index a7ed95464..1d249d668 100644 --- a/fetch_commits.py +++ b/fetch_commits.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 import requests import json -import random # List of OWASP repos repos = [ @@ -14,19 +13,12 @@ "OWASP/owasp-api-security", "OWASP/owasp-testing-guide-v4", "OWASP/owasp-testing-guide-v5", - "OWASP/owasp-zap", - "OWASP/owasp-mstg", - "OWASP/owasp-api-security", - "OWASP/owasp-testing-guide-v4", - "OWASP/owasp-testing-guide-v5", - "OWASP/owasp-zap", - "OWASP/owasp-mstg", - "OWASP/owasp-api-security", - "OWASP/owasp-testing-guide-v4", - "OWASP/owasp-testing-guide-v5", "OWASP/owasp-zap" ] +# Preserve order while preventing accidental duplicates. +repos = list(dict.fromkeys(repos)) + commits = [] for repo in repos: From 38a70fc8eda9ed9aed13255a86cc884623eb91e7 Mon Sep 17 00:00:00 2001 From: Noriko Kono <55174696+norikokono@users.noreply.github.com> Date: Sun, 29 Mar 2026 07:06:02 +0000 Subject: [PATCH 3/3] chore(fetcher): replace bare except with explicit Exception --- fetch_commits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetch_commits.py b/fetch_commits.py index 1d249d668..e2c0ee76f 100644 --- a/fetch_commits.py +++ b/fetch_commits.py @@ -34,7 +34,7 @@ break if len(commits) >= 100: break - except: + except Exception: pass # Save to file