TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/morwn/github-threat-detector/llms.txt
Use this file to discover all available pages before exploring further.
analyze command loads all heuristic analyzer modules, queries the events already stored in PostgreSQL by collect, and writes structured findings rows for every anomaly detected. You can scope a run to specific repositories or to a focused subset of rules — useful both for triage and for scheduled pipelines where only certain rule families need to fire.
Usage
Options
Comma-separated list of repositories (
owner/repo) to analyze. When omitted, every repository present in the database is analyzed.
Use this flag to limit scope during an incident investigation or when testing a single rule against a known-good repository.Comma-separated list of rule IDs to run. When omitted, all 17 rules execute.
Rule IDs are listed in the reference table below. Passing an unrecognized ID is silently ignored — the filtered list simply contains no match.
Examples
Run all rules across all collected repositories:Rule Reference
All 17 built-in rules are listed below. Each row shows the rule ID you pass to--rules, the source module that implements it, and its default severity.
| Rule ID | Analyzer Module | Severity |
|---|---|---|
workflow-file-change | analyzers/malicious_ci.py | high |
pr-target-abuse | analyzers/malicious_ci.py | critical |
workflow-run-from-fork | analyzers/malicious_ci.py | critical |
release-actor-anomaly | analyzers/release_tamper.py | critical |
rapid-releases | analyzers/release_tamper.py | high |
new-actor-ci-change | analyzers/social_eng.py | high |
member-added-suspicious | analyzers/social_eng.py | medium |
repo-made-public | analyzers/social_eng.py | high |
force-push-default | analyzers/push_anomaly.py | high |
rapid-sequential-pushes | analyzers/push_anomaly.py | medium |
delete-branch-protection | analyzers/push_anomaly.py | high |
fork-spike | analyzers/fork_bomb.py | medium |
issue-prompt-injection | analyzers/ai_workflow_abuse.py | critical |
issue-rapid-close | analyzers/ai_workflow_abuse.py | high |
ai-workflow-unsafe-input | analyzers/ai_workflow_abuse.py | critical |
commit-date-gap | analyzers/commit_tamper.py | critical |
null-committer-email | analyzers/commit_tamper.py | critical |
Notes
analyzecallsapply_schema()automatically on startup, so it is always safe to run even ifinit-dbhas not been called manually.- Rules that depend on data collected with optional
collectflags will produce no findings if that data is absent. For example,ai-workflow-unsafe-inputrequires--workflow-filesto have been passed tocollect, andcommit-date-gaprequires--commits. - Each analyzer’s
run()method is exception-safe: if an individual rule errors for a given repository (e.g., missing data), it prints a warning and continues rather than aborting the entire run. - Findings are deduplicated by the database layer, so running
analyzemultiple times on the same data is safe.