@@ -31,12 +31,16 @@ inputs:
31
31
required : false
32
32
default : false
33
33
34
+ user-agent :
35
+ description : " Set a Custom User-Agent header"
36
+ required : false
37
+
34
38
config :
35
39
description : " Nuclei configuration file"
36
40
required : false
37
41
38
- user-agent :
39
- description : " Set a Custom User-Agent header "
42
+ report-config :
43
+ description : " Issue reporting configuration file "
40
44
required : false
41
45
42
46
github-report :
@@ -56,27 +60,29 @@ inputs:
56
60
description : " Export nuclei results in Markdown format"
57
61
required : false
58
62
59
- nuclei- flags :
63
+ flags :
60
64
description : " Extra nuclei CLI flags to use"
61
65
required : false
62
66
63
67
runs :
64
68
using : " composite"
65
69
steps :
66
70
- run : |
67
- [ ! -x /home/runner/go/bin/nuclei ] && GO111MODULE=on go get -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@v2.3.8
71
+ [ ! -x /home/runner/go/bin/nuclei ] && GO111MODULE=on go get -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@v2.4.0
68
72
echo "/home/runner/go/bin/" >> $GITHUB_PATH
69
73
shell: bash
74
+
70
75
- run : |
71
76
[ ! -z ${{ inputs.target }} ] && echo "target=-target ${{ inputs.target}}" >> $GITHUB_ENV
72
77
[ ! -z ${{ inputs.urls }} ] && echo "urls=-list ${{ inputs.urls}}" >> $GITHUB_ENV
73
- [ ! -z ${{ inputs.templates }} ] && echo "templates=-t ${{ inputs.templates }}" >> $GITHUB_ENV || echo "templates=-t ./nuclei-templates" >> $GITHUB_ENV
78
+ [ ! -z ${{ inputs.templates }} ] && echo "templates=-t ${{ inputs.templates }}" >> $GITHUB_ENV
74
79
[ ! -z ${{ inputs.output }} ] && echo "output=-o ${{ inputs.output}}" >> $GITHUB_ENV || echo "output=-o nuclei.log" >> $GITHUB_ENV
75
80
[ ! -z ${{ inputs.sarif-export }} ] && echo "sarif-export=-se ${{ inputs.sarif-export}}" >> $GITHUB_ENV || echo "sarif-export=-se nuclei.sarif" >> $GITHUB_ENV
76
81
[ ! -z ${{ inputs.markdown-export }} ] && echo "markdown-export=-me ${{ inputs.markdown-export}}" >> $GITHUB_ENV
77
- [ ! -z ${{ inputs.config }} ] && cp ${{ inputs.config }} /.config/nuclei/config.yaml
78
- [ ! -z "${{ inputs.user-agent }}" ] && echo 'useragent=-H "${{ inputs.user-agent }}"' >> $GITHUB_ENV
79
- [ ! -z "${{ inputs.nuclei-flags }}" ] && echo 'flags="${{ inputs.nuclei-flags }}"' >> $GITHUB_ENV
82
+ [ ! -z ${{ inputs.report-config }} ] && echo "reportconfig=-rc ${{ inputs.report-config}}" >> $GITHUB_ENV
83
+ [ ! -z ${{ inputs.config }} ] && echo "config=-config ${{ inputs.config}}" >> $GITHUB_ENV
84
+ [ ! -z "${{ inputs.user-agent }}" ] && echo "useragent=-H ${{ inputs.user-agent }}" >> $GITHUB_ENV
85
+ [ ! -z "${{ inputs.flags }}" ] && echo "flags=${{ inputs.flags }}" >> $GITHUB_ENV
80
86
${{ inputs.json }} && echo "json=-json" >> $GITHUB_ENV
81
87
${{ inputs.include-rr }} && echo "includerr=-irr" >> $GITHUB_ENV
82
88
${{ inputs.github-report }} \
@@ -89,22 +95,22 @@ runs:
89
95
&& echo -e " issue-label: \"Nuclei\"" >> ~/nuclei-github-config.yaml \
90
96
&& echo "githubconfig=-rc ~/nuclei-github-config.yaml" >> $GITHUB_ENV
91
97
92
- nuclei -silent \
93
- -update-templates \
94
- -update-directory ./nuclei-templates
98
+ nuclei -silent
95
99
shell: bash
96
100
- run : |
97
-
101
+
98
102
nuclei \
99
103
${{ env.target }} \
100
104
${{ env.urls }} \
101
105
${{ env.templates }} \
102
- ${{ env.useragent }} \
103
106
${{ env.output }} \
104
107
${{ env.sarif-export }} \
105
108
${{ env.markdown-export }} \
106
109
${{ env.json }} \
107
110
${{ env.flags }} \
111
+ ${{ env.config }} \
112
+ ${{ env.reportconfig }} \
108
113
${{ env.githubconfig }} \
114
+ ${{ env.useragent }} \
109
115
${{ env.includerr }}
110
116
shell: bash
0 commit comments