Skip to content

Commit 834ba94

Browse files
committed
Initial commit
0 parents  commit 834ba94

File tree

3 files changed

+118
-0
lines changed

3 files changed

+118
-0
lines changed

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 ProjectDiscovery, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<h1 align="left">
2+
<img src="https://github.com/projectdiscovery/nuclei/blob/master/static/nuclei-logo.png" alt="nuclei" width="200px"></a>
3+
<br>
4+
</h1>
5+
6+
[Nuclei Action](https://github.com/projectdiscovery/nuclei-action) makes it easy to orchestrate [Nuclei](https://github.com/projectdiscovery/nuclei) with [GitHub Action](https://github.com/features/actions).
7+
Integrate all of your [Nuclei Templates](https://github.com/projectdiscovery/nuclei-templates) into powerful continuous security workflows and make it part of your secure software development life cycle.
8+
9+
10+
11+
Usage
12+
-----
13+
14+
*.github/workflows/nuclei.yml*
15+
```
16+
on:
17+
workflow_dispatch:
18+
schedule:
19+
- cron: "0 10 * * *"
20+
21+
jobs:
22+
worker:
23+
runs-on: ubuntu-20.04
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
- uses: projectdiscovery/nuclei-action@main
28+
with:
29+
urls: "urls.txt"
30+
output: "nuclei.log"
31+
32+
- uses: actions/upload-artifact@v2
33+
with:
34+
name: nuclei.log
35+
path: nuclei.log
36+
```
37+
38+
Inputs
39+
------
40+
41+
| Key | Description | Required |
42+
| :---: | :---: | :---: |
43+
| `urls` | List of urls to run templates | true
44+
| `templates` | Templates input file/files to check across hosts | false
45+
| `output` | File to save output result | false
46+
| `nuclei-ignore` | Define templates that will be blocked from execution | false
47+
| `user-agent` | Set a User-Agent header | false

action.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: "Nuclei Action"
2+
description: "Nuclei is a fast and customisable vulnerability scanner based on simple YAML based DSL"
3+
4+
inputs:
5+
urls:
6+
description: "List of urls to run templates"
7+
required: true
8+
default: "urls.txt"
9+
templates:
10+
description: "Templates input file/files to check across hosts"
11+
required: false
12+
default: "nuclei-templates"
13+
output:
14+
description: "File to save output result"
15+
required: false
16+
default: "nuclei.log"
17+
nuclei-ignore:
18+
description: "define templates that will be blocked from execution"
19+
required: false
20+
default: ".nuclei-ignore"
21+
user-agent:
22+
description: "Set a User-Agent header"
23+
required: false
24+
default: "Nuclei - Open-source project (github.com/projectdiscovery/nuclei)"
25+
26+
runs:
27+
using: "composite"
28+
steps:
29+
- run: |
30+
GO111MODULE=on go get -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei
31+
echo "/home/runner/go/bin/" >> $GITHUB_PATH
32+
shell: bash
33+
34+
- run: |
35+
nuclei \
36+
-update-templates \
37+
-update-directory ./ \
38+
\
39+
40+
test -e ${{ inputs.nuclei-ignore }} && cp ${{ inputs.nuclei-ignore }} ${{ inputs.templates }}/.nuclei-ignore
41+
42+
nuclei \
43+
-l ${{ inputs.urls }} \
44+
-t ${{ inputs.templates }} \
45+
-o ${{ inputs.output }} \
46+
-H "User-Agent: ${{ inputs.user-agent }}" \
47+
-json \
48+
-include-rr \
49+
\
50+
shell: bash

0 commit comments

Comments
 (0)