
فحص الثغرات باستخدام Nuclei
تُسهّل Nuclei Action التنسيق بين Nuclei وGitHub Action. ادمج جميع قوالب Nuclei الخاصة بك في سير عمل أمني مستمر قوي واجعلها جزءًا من دورة حياة تطوير البرمجيات الآمنة لديك.
Nuclei Action
v3.0.0+ على Node.js v24 ويعتمد واجهة سطر أوامر (CLI) في المقام الأول، حيث يقبل المُدخلات مثل version وinstall-only وargs وغيرها، ويُخرج المُخرجات إلى stdout وstderr فقط.v2.0.0+ وv2.x على مُدخلات خاصة بالإجراء مثل target وurls وtemplates وworkflows وflags ومفاتيح التصدير/التقارير المختلفة؛ وإصدارات v2.x قديمة وغير مدعومة بعد 1 مارس 2026. راجع MIGRATION.md قبل الترقية.v1+ على Node.js v16 ويستخدم مُدخلات مثل target وurls وtemplates وworkflows وoutput وjson وinclude-rr وconfig وreport-config وgithub-report وgithub-token وsarif-export وmarkdown-export وflags.[!IMPORTANT]
- يجب عدم تعيين
configوconfig-pathمعًا.argsتتجاوز دائمًاconfigأوconfig-path.
[!NOTE] عند تمكين تسجيل التصحيح (debug logging)، يضيف هذا الإجراء تلقائيًا العلامتين
-debugو-verboseإلى Nuclei.
| الاسم | الوصف |
|---|---|
stdout | المخرجات القياسية من تشغيل Nuclei |
stderr | الخطأ القياسي من تشغيل Nuclei |
هذا الإجراء هو إجراء node24.
- uses: projectdiscovery/nuclei-action@v3
with:
version:
# Setup with specific version ("latest" or in format "vX.Y.Z").
#
# Required: true
# Default: latest
install-only:
# Install Nuclei without running scans.
#
# Required: false
# Default: false
args:
# Arguments to pass to Nuclei.
#
# Required: false
# Default: ""
config:
# Nuclei configuration file content.
#
# Required: false
# Default: ""
config-path:
# Path to Nuclei configuration file.
#
# Required: false
# Default: ""
cache:
# Enable caching of Nuclei caches, configs, templates, and browser.
#
# Required: false
# Default: true
token:
# GitHub Token. It is used to fetch Nuclei releases from GitHub.
#
# Required: true
# Default: ${{ github.token }}
الإعداد الافتراضي (أحدث إصدار من Nuclei)
- uses: projectdiscovery/nuclei-action@v3
with:
args: -u http://scanme.sh
الإعداد بإصدار محدد
- uses: projectdiscovery/nuclei-action@v3
with:
version: v3.6.0
args: -u http://scanme.sh
الإعداد أو تثبيت Nuclei بدون تشغيل عمليات الفحص
- uses: projectdiscovery/nuclei-action@v3
with:
version: v3.6.0
install-only: true
- run: nuclei -version
أو التثبيت فقط وبدون تخزين مؤقت:
- uses: projectdiscovery/nuclei-action@v3
with:
version: v3.6.0
install-only: true
cache: false
- run: nuclei -version
الإعداد مع إعدادات Nuclei
- uses: projectdiscovery/nuclei-action@v3
with:
version: latest
config: |
target:
- http://scanme.sh
sarif-export: results.sarif
أو تمريرها عبر المتغيرات:
- uses: projectdiscovery/nuclei-action@v3
with:
version: latest
config: ${{ vars.NUCLEI_CONFIG }}
أو عبر ملف إعدادات يديره المستودع:
- uses: projectdiscovery/nuclei-action@v3
with:
version: latest
config-path: path/to/nuclei.yaml
الإعداد مع فحص كود GitHub (GitHub code scanning)
- uses: projectdiscovery/nuclei-action@v3
with:
version: latest
config: |
target:
- http://scanme.sh
sarif-export: results.sarif
- uses: github/codeql-action/upload-sarif@v3
if: success()
with:
sarif_file: results.sarif
category: nuclei-results
الإعداد مع التقارير
- uses: projectdiscovery/nuclei-action@v3
with:
args: -u http://scanme.sh
config: |
report-config: issue-tracker-config.yaml
env:
GITHUB_BASE_URL: https://localhost:8443/github
GITHUB_USERNAME: test-username
GITHUB_OWNER: test-owner
GITHUB_TOKEN: ${{ secrets.GITHUB_PAT }}
GITHUB_PROJECT_NAME: test-project
github:
# base-url is the optional self-hosted GitHub application url
base-url: $GITHUB_BASE_URL # read from environment variable
# username is the username of the GitHub user
username: $GITHUB_USERNAME # read from environment variable
# owner is the owner name of the repository for issues
owner: $GITHUB_OWNER # read from environment variable
# token is the token for GitHub account
token: $GITHUB_TOKEN # read from environment variable
# project-name is the name of the repository
project-name: $GITHUB_PROJECT_NAME # read from environment variable
# issue-label is the label of the created issue type
issue-label: bug
# allow-list sets a tracker level filter to only create issues for templates with
# these severity labels or tags (does not affect exporters. set those globally)
allow-list:
severity: high, critical
tags: network
# deny-list sets a tracker level filter to never create issues for templates with
# these severity labels or tags (does not affect exporters. set those globally)
deny-list:
severity: low
# duplicate-issue-check flag to enable duplicate tracking issue check.
duplicate-issue-check: false
راجع https://github.com/projectdiscovery/nuclei/blob/dev/cmd/nuclei/issue-tracker-config.yaml.
نرحب بمساهماتكم! يرجى الاطلاع على دليل المساهمة لدينا للحصول على تفاصيل حول كيفية البدء.
MIT. راجع LICENSE لمزيد من التفاصيل.
| الاسم | الوصف | مطلوب | الافتراضي |
|---|
version | الإعداد بإصدار محدد ("latest" أو بصيغة "vX.Y.Z"). | true | latest |
install-only | تثبيت Nuclei بدون تشغيل عمليات الفحص. | false | false |
args | الوسائط التي سيتم تمريرها إلى Nuclei. | false | "" |
config | محتوى ملف إعدادات Nuclei. | false | "" |
config-path | المسار إلى ملف إعدادات Nuclei. | false | "" |
cache | تمكين التخزين المؤقت لذاكرة Nuclei المؤقتة والإعدادات والقوالب والمتصفح. | false | true |
token | رمز GitHub (GitHub Token). يُستخدم لجلب إصدارات Nuclei من GitHub. | true | ${{ github.token }} |