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) add Gitea reporting platform support #4522

Merged
merged 8 commits into from
Feb 18, 2024
Merged

(feat) add Gitea reporting platform support #4522

merged 8 commits into from
Feb 18, 2024

Conversation

leonjza
Copy link
Contributor

@leonjza leonjza commented Dec 20, 2023

Proposed changes

This PR adds Gitea support as a Nuclei reporting destination to automatically create tickets for new issues.

Under the hood it uses the official Gitea go-sdk. Unlike GitHub and GitLab, issue labels need to be resolved to ID's, so I had to implement a special method for that to support this feature. Happy for feedback on that given that I am not sure on the performance impact this has. In my local test environment it was acceptable.

An example run showing issues created on a Gitea instance are shown in the following screenshot.

image

An example configuration file to use with the -rc flag looks something like this:

gitea:
  base-url: https://gitea.lab.local/
  token: <the token>
  project-owner: lab
  project-name: nuclei-testing
  issue-label: nuclei

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)

@ehsandeep ehsandeep linked an issue Dec 23, 2023 that may be closed by this pull request
Copy link
Member

@dogancanbakir dogancanbakir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue creation works:
image

But duplicate-issue-check: true doesn't work. Also, let's update the example file at https://github.com/projectdiscovery/nuclei/blob/dev/cmd/nuclei/issue-tracker-config.yaml.

@leonjza
Copy link
Contributor Author

leonjza commented Feb 1, 2024

@dogancanbakir thanks for the review! I've done some work addressing the requested changes and tested the duplicate issue creation quite extensively now.

Would you mind testing again and letting me know? Below is a screenshot of three runs with duplicate-issue-check: true.

image

@leonjza leonjza requested a review from dogancanbakir February 2, 2024 06:14
@leonjza
Copy link
Contributor Author

leonjza commented Feb 5, 2024

Not sure but it looks like the CI failures seem unrelated to this change?

@ehsandeep
Copy link
Member

Not sure but it looks like the CI failures seem unrelated to this change?

it's unrelated, some issues with GitHub CI for interactsh tests.

@leonjza
Copy link
Contributor Author

leonjza commented Feb 12, 2024

Just a friendly bump on this one to see if there is anything else needed from me thats blocking landing this one?

@ehsandeep ehsandeep merged commit 0bd4478 into projectdiscovery:dev Feb 18, 2024
9 of 12 checks passed
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.

Add Gitea reporting platform support
3 participants