Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support template urls #73

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ inputs:
required: false

templates:
description: "Templates input file/files to check across hosts"
description: "Templates input file(s)/URL to check across hosts"
required: false

workflows:
Expand Down
10 changes: 9 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,15 @@ async function run() {
// Setting up params
if (target) params.push(`-target=${target}`);
if (urls) params.push(`-list=${urls}`);
if (templates) params.push(`-t=${templates}`);
if (templates) {
try {
new URL(templates)
params.push(`-turl=${templates}`);
}
catch(_) {
params.push(`-t=${templates}`);
}
}
if (workflows) params.push(`-w=${workflows}`);
params.push(`-se=${sarifExport ? sarifExport : 'nuclei.sarif'}`);
if (markdownExport) params.push(`-me=${markdownExport}`);
Expand Down