Skip to content
 
 

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

newclei

A Go tool that fetches the newest open PRs from projectdiscovery/nuclei-templates, downloads the new template files and sorts them into category folders — ready to drop into your nuclei template directory.

Based on tr3ss/newclei (MIT), extended with downloading, categorization, incremental re-runs, rate-limit handling and a run manifest.

Install

go install -v github.com/mohammadsec/newclei@latest

Usage

❯ newclei -h
Usage of newclei:
  -all-files
    	- Download non-YAML files too
  -api string
    	- GitHub API base URL (default "https://api.github.com")
  -cves
    	- Only CVE templates
  -limit int
    	- Max files to download (0 = unlimited)
  -out string
    	- Output directory (default "newclei-out")
  -overwrite
    	- Re-download files that already exist
  -prs int
    	- Max PRs to scan (0 = all open PRs)
  -token string
    	- GitHub token (falls back to $GITHUB_TOKEN, then git credential store)
  -urls
    	- Only print raw file URLs (original newclei behavior)
  -workers int
    	- Parallel download workers (default 6)

Examples

# Full run: everything new from all open PRs (token auto-read from git credential store)
newclei -out ~/nuclei-templates-new

# Only CVEs from the 30 newest PRs
newclei -cves -prs 30 -out ~/new-cves

# Merge into your nuclei template dir (files keep upstream paths)
newclei -out ~/nuclei-templates

Output layout

newclei-out/
├── cves/2026/CVE-2026-6377.yaml      # CVE templates, sorted by year
├── cves/2020/CVE-2020-11991.yaml
├── http/exposed-panels/...           # non-CVE keeps upstream structure
├── http/technologies/...
├── network/detection/...
├── manifest.json                     # per-file: PR, category, result, raw URL
└── SUMMARY.md                        # run summary + category table + PR list

Notes

  • Re-running is safe: existing files are skipped (= in output); use -overwrite to refresh.
  • Handles GitHub rate limits (honors Retry-After, backs off). Token resolution order: -token flag → $GITHUB_TOKEN → git credential store (60 → 5000 req/h). A token is recommended for full runs.
  • Filenames are sanitized (no path traversal); removed files and non-YAML assets are skipped unless -all-files.

License

MIT — original tool by tr3ss.

About

A Go tool that gets the newest PRs from projectdiscovery/nuclei-templates.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages