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

[Feature Request] Support Template URLs #72

Closed
pbnj-dragon opened this issue Jan 13, 2024 · 2 comments · Fixed by #73
Closed

[Feature Request] Support Template URLs #72

pbnj-dragon opened this issue Jan 13, 2024 · 2 comments · Fixed by #73

Comments

@pbnj-dragon
Copy link
Contributor

pbnj-dragon commented Jan 13, 2024

Supporting template URLs should relatively simple to introduce.

Example:

      - name: Nuclei - Vulnerability Scan
        uses: projectdiscovery/nuclei-action@main
        with:
          target: https://example.com
          templates: https://raw.githubusercontent.com/foo/bar/main/custom-templates.yml

In index.js, something like this perhaps:

if (templates) {
  try {
    // URL() constructor will throw if a string is not URL, per https://www.rfc-editor.org/rfc/rfc3986
    new URL(templates);
    params.push(`-turl=${templates}`);
  } catch () {
    params.push(`-t=${templates}`);
  }
}

If you are OK with this, I can submit a PR.

@olearycrew
Copy link
Contributor

@pbnj-dragon If you want to try and make this work, I think a PR would be great.

pbnj-dragon added a commit to pbnj-dragon/nuclei-action that referenced this issue Jan 15, 2024
@pbnj-dragon
Copy link
Contributor Author

@olearycrew - Done. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants