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

move runner outside of internal to pkg #1942

Closed
wants to merge 1 commit into from

Conversation

gsilvapt
Copy link

@gsilvapt gsilvapt commented May 5, 2022

Proposed changes

Hi team,

I'm working on a project where we are trying to build a wrapper for the nuclei runner, facilitating the option and flags logic, but we cannot proceed right now because the runner lives in internal/ and we cannot import it.
This change moves the runner out of that directory into pkg/, compliant with go's recommended package structure, so we (and others) can use the runner directly in third-party tools.

Checklist

  • Pull request is created against the dev branch
  • All checks passed (lint, unit/integration/regression tests etc.) with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

By exposing the runner others can build bundled binaries reusing
nuclei's runner if they wish so.
@anykno
Copy link
Contributor

anykno commented Jun 30, 2022

similar situation we are facing, still working on ???

@gsilvapt
Copy link
Author

gsilvapt commented Jun 30, 2022

similar situation we are facing, still working on ???

Hello 👋 the errors I'm getting with the Windows builds are strange and I never had the chance to pick this up again.

Since now there are conflicts, I'll try fixing them (should be applying the changes in the new location) and hope that fixes the windows builds. If not, I'll try to dedicate some time to that too to see if I can find anything I can do to fix it.

@Ice3man543
Copy link
Member

@gsilvapt it is not expected for the runner to be part of the public nuclei interface since it is subject to changes and no stable public API.

Instead, for programs wishing to use nuclei in an embedded manner, they should use pkg/ packages instead of internal/runner.

Example below - https://github.com/projectdiscovery/nuclei/blob/master/DESIGN.md#using-nuclei-from-go-code

Closing the issue as not planned. Let me know if you have any questions!

@Ice3man543 Ice3man543 closed this Jul 18, 2022
@ehsandeep ehsandeep removed the request for review from Ice3man543 July 18, 2022 09:05
@gsilvapt
Copy link
Author

Thanks for getting back to me and the docs, @Ice3man543.

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 this pull request may close these issues.

None yet

3 participants