@@ -9,42 +9,62 @@ inputs:
9
9
templates :
10
10
description : " Templates input file/files to check across hosts"
11
11
required : false
12
- default : " nuclei-templates"
13
12
output :
14
13
description : " File to save output result"
15
14
required : false
16
15
default : " nuclei.log"
16
+ include-rr :
17
+ description : " Write requests/responses for matches in JSON output"
18
+ required : false
19
+ default : false
17
20
nuclei-ignore :
18
21
description : " define templates that will be blocked from execution"
19
22
required : false
20
- default : " .nuclei-ignore"
21
23
user-agent :
22
24
description : " Set a User-Agent header"
23
25
required : false
24
- default : " Nuclei - Open-source project (github.com/projectdiscovery/nuclei)"
25
-
26
+ github-report :
27
+ description : " Active Nuclei Reporting Module for Github"
28
+ required : false
29
+ default : false
30
+ report-token :
31
+ description : " Github token for create issues"
32
+ required : false
33
+
26
34
runs :
27
35
using : " composite"
28
36
steps :
29
37
- run : |
30
38
[ ! -x /home/runner/go/bin/nuclei ] && GO111MODULE=on go get -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei
31
39
echo "/home/runner/go/bin/" >> $GITHUB_PATH
32
40
shell: bash
33
-
34
41
- run : |
42
+ [ ! -z ${{ inputs.nuclei-ignore }} ] && cp ${{ inputs.nuclei-ignore }} /nuclei-templates/.nuclei-ignore
43
+ [ ! -z "${{ inputs.user-agent }}" ] && echo 'useragent=-H "User-Agent: ${{ inputs.user-agent }}"' >> $GITHUB_ENV
44
+ ${{ inputs.include-rr }} && echo "includerr=-irr" >> $GITHUB_ENV
45
+
46
+ ${{ inputs.github-report }} \
47
+ && touch ~/nuclei-report-config.yaml \
48
+ && echo -e "github:" >> ~/nuclei-report-config.yaml \
49
+ && echo -e " username: \"$GITHUB_ACTOR\"" >> ~/nuclei-report-config.yaml \
50
+ && echo -e " owner: \"${GITHUB_REPOSITORY%%/*}\"" >> ~/nuclei-report-config.yaml \
51
+ && echo -e " token: \"${{ inputs.report-token }}\"" >> ~/nuclei-report-config.yaml \
52
+ && echo -e " project-name: \"${GITHUB_REPOSITORY#*/}\"" >> ~/nuclei-report-config.yaml \
53
+ && echo -e " issue-label: \"Nuclei Reporting\"" >> ~/nuclei-report-config.yaml \
54
+ && echo "reportconfig=-rc ~/nuclei-report-config.yaml" >> $GITHUB_ENV
55
+
35
56
nuclei \
36
57
-update-templates \
37
- -update-directory ./ \
38
- \
39
-
40
- [ -e ${{ inputs.nuclei-ignore }} ] && cp ${{ inputs.nuclei-ignore }} ${{ inputs.templates }}/.nuclei-ignore
41
-
58
+ -update-directory ./nuclei-templates
59
+ shell: bash
60
+ - run : |
61
+
42
62
nuclei \
43
63
-l ${{ inputs.urls }} \
44
- -t ${{ inputs.templates }} \
64
+ -t ./nuclei-templates/${{ inputs.templates }} \
65
+ ${{ env.useragent }} \
45
66
-o ${{ inputs.output }} \
46
- -H "User-Agent: ${{ inputs.user-agent }}" \
47
67
-json \
48
- -include-rr \
49
- \
68
+ ${{ env.reportconfig }} \
69
+ ${{ env.includerr }}
50
70
shell: bash
0 commit comments