Skip to content

Commit e96b00a

Browse files
committed
feat: support template urls
Closes #72
1 parent 79e0c00 commit e96b00a

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ inputs:
1414
required: false
1515

1616
templates:
17-
description: "Templates input file/files to check across hosts"
17+
description: "Templates input file(s)/URL to check across hosts"
1818
required: false
1919

2020
workflows:

src/index.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,15 @@ async function run() {
5252
// Setting up params
5353
if (target) params.push(`-target=${target}`);
5454
if (urls) params.push(`-list=${urls}`);
55-
if (templates) params.push(`-t=${templates}`);
55+
if (templates) {
56+
try {
57+
new URL(templates)
58+
params.push(`-turl=${templates}`);
59+
}
60+
catch(_) {
61+
params.push(`-t=${templates}`);
62+
}
63+
}
5664
if (workflows) params.push(`-w=${workflows}`);
5765
params.push(`-se=${sarifExport ? sarifExport : 'nuclei.sarif'}`);
5866
if (markdownExport) params.push(`-me=${markdownExport}`);

0 commit comments

Comments
 (0)