Commit e1021181dd

e1021181ddddfa0d125ef3be7f61cf52d6d071e1

parent: 014e268bda

Unsigned

Alicia Sykes <alicia@omg.lol> · 2026-10-10 17:24 UTC

Adds Exodus, Plexus and ToS;DR checks into the PR checks

Layout: unified · split

.github/CONTRIBUTING.md +3
@@ -307,6 +307,9 @@ Below is the full list of checks - it's basically the same as what is listed in
307307 - 🟡 **Security policy** - Repo should have a security policy (SECURITY.md) and/or private vulnerability reporting enabled
308308 - 🟡 **Minimum stars** - Repo should have ≥100 stars
309309 - 🟡 **Bus factor** - Flags if ≥96% of commits come from a single contributor (bots and AI excluded)
310 - 🟡 **Trackers** - Android app should not have privacy-invasive trackers
311 - 🟡 **De-Googled** - Android app should not be broken without Google Play Services
312 - 🟡 **Privacy policy** - Privacy policy should not be graded poorly (via ToS;DR)
310313 - 🟡 **Spam detection** - Flags if the author opened ≥3 PRs to other awesome-* repos, or PRs across ≥7 distinct repos, in the last 2 days
311314- **Addition Info** (fyi only, no pass/fail requirements or warnings)
312315 - 🔵 **Website check** (if has `url`) - Quickly checks for basic security requirements for website
lib/checks/check-project.py +54 −1
@@ -33,6 +33,8 @@ SPAM_AWESOME_THRESHOLD = 3
3333SPAM_DISTINCT_REPO_THRESHOLD = 7
3434SPAM_WINDOW_DAYS = 2
3535NEW_ACCOUNT_DAYS = 14
36TRACKER_LIMIT = 2
37POOR_PRIVACY_GRADES = {"D", "E"}
3638
3739SESSION = utils.make_session(user_agent=USER_AGENT)
3840API_TOKEN = os.environ.get("API_TOKEN", "")
@@ -105,6 +107,18 @@ SECURITY_POLICY_MSG = (
105107 "This repository has neither a security policy nor private"
106108 " vulnerability reporting enabled, so there's no clear way to report security issues"
107109)
110TRACKERS_MSG = (
111 "The Android app contains multiple known trackers, according to Exodus Privacy."
112 " Please confirm these are justified"
113)
114DEGOOGLED_MSG = (
115 "The Android app is reported as broken on de-Googled Android"
116 " (without Google Play Services), according to Plexus"
117)
118PRIVACY_GRADE_MSG = (
119 "The privacy policy for this service is graded as poor by ToS;DR,"
120 " indicating serious privacy concerns"
121)
108122
109123
110124def load_diff(path):
@@ -228,6 +242,44 @@ def check_security_policy(owner, repo, token):
228242 return None
229243
230244
245def check_android_app(pkg):
246 """Return findings for an Android app with multiple trackers or broken de-Googled support."""
247 findings = []
248 try:
249 app = utils.fetch_android_app(pkg, API_TOKEN, session=SESSION, timeout=TIMEOUT, label=pkg)
250 if (utils.tracker_count(app) or 0) >= TRACKER_LIMIT:
251 findings.append(TRACKERS_MSG)
252 if utils.degoogled_status(app) == "broken":
253 findings.append(DEGOOGLED_MSG)
254 except Exception as exc:
255 logger.warning("check_android_app error for %s: %s", pkg, exc)
256 return findings
257
258
259def check_privacy_grade(tosdr_id):
260 """Return PRIVACY_GRADE_MSG if the service's ToS;DR grade is poor."""
261 try:
262 policy = utils.fetch_privacy(tosdr_id, API_TOKEN, session=SESSION, timeout=TIMEOUT,
263 label=str(tosdr_id))
264 if utils.privacy_grade(policy) in POOR_PRIVACY_GRADES:
265 return PRIVACY_GRADE_MSG
266 except Exception as exc:
267 logger.warning("check_privacy_grade error for %s: %s", tosdr_id, exc)
268 return None
269
270
271def check_privacy_signals(diff):
272 """Check trackers, de-Googled support and ToS;DR grade for added services."""
273 findings = []
274 for svc in get_services(diff, "added"):
275 fields = svc.get("fields", {})
276 if fields.get("androidApp"):
277 findings.extend(check_android_app(fields["androidApp"]))
278 if fields.get("tosdrId"):
279 findings.append(check_privacy_grade(fields["tosdrId"]))
280 return [f for f in dict.fromkeys(findings) if f]
281
282
231283def check_spam_prs(pr_user, token):
232284 """Return list of spam findings based on recent PR activity."""
233285 if not pr_user:
@@ -420,7 +472,7 @@ def main():
420472 try:
421473 pr_user = os.environ.get("PR_USER", "")
422474 token = os.environ.get("GITHUB_TOKEN", "")
423 logger.info("Checking project health: links, spam, account age, duplicate URLs, repo signals")
475 logger.info("Checking project health: links, spam, account age, duplicate URLs, privacy, repo signals")
424476 logger.info("PR_USER=%s, GITHUB_TOKEN=%s", pr_user or "(empty)", "present" if token else "MISSING")
425477
426478 diff = load_diff(DIFF_PATH)
@@ -451,6 +503,7 @@ def main():
451503 if finding:
452504 findings.append(finding)
453505
506 findings.extend(check_privacy_signals(diff))
454507 findings.extend(check_repo_signals(diff, pr_user, token, pr_body))
455508 except Exception as exc:
456509 logger.error("Unhandled error in main: %s", exc, exc_info=True)