[Feature Request] Support Template URLs #72

Closed
opened 2024-01-12 19:05:36 -05:00 by pbnj-dragon · 2 comments
pbnj-dragon commented 2024-01-12 19:05:36 -05:00 (Migrated from github.com)

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.

Supporting template URLs should relatively simple to introduce. Example: ```yaml - 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: ```js 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 commented 2024-01-15 12:00:24 -05:00 (Migrated from github.com)

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

@pbnj-dragon If you want to try and make this work, I think a PR would be great.
pbnj-dragon commented 2024-01-15 18:23:09 -05:00 (Migrated from github.com)

@olearycrew - Done. Thank you.

@olearycrew - Done. Thank you.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
projectdiscovery/nuclei-action#72
No description provided.