49 Commits

Author SHA1 Message Date
Nakul Bharti
8ea5061f5e
jira: hotfix for Cloud to use /rest/api/3/search/jql (#6489)
* jira: hotfix for Cloud to use /rest/api/3/search/jql in FindExistingIssue; add live test verifying v3 endpoint

* jira: fix Cloud v3 search response handling (no total); set Self from base

* fix lint error

* tests(jira): apply De Morgan to satisfy staticcheck QF1001
2025-09-22 22:44:10 +05:30
Nakul Bharti
c4fa2c74c1
cache, goroutine and unbounded workers management (#6420)
* Enhance matcher compilation with caching for regex and DSL expressions to improve performance. Update template parsing to conditionally retain raw templates based on size constraints.

* Implement caching for regex and DSL expressions in extractors and matchers to enhance performance. Introduce a buffer pool in raw requests to reduce memory allocations. Update template cache management for improved efficiency.

* feat: improve concurrency to be bound

* refactor: replace fmt.Sprintf with fmt.Fprintf for improved performance in header handling

* feat: add regex matching tests and benchmarks for performance evaluation

* feat: add prefix check in regex extraction to optimize matching process

* feat: implement regex caching mechanism to enhance performance in extractors and matchers, along with tests and benchmarks for validation

* feat: add unit tests for template execution in the core engine, enhancing test coverage and reliability

* feat: enhance error handling in template execution and improve regex caching logic for better performance

* Implement caching for regex and DSL expressions in the cache package, replacing previous sync.Map usage. Add unit tests for cache functionality, including eviction by capacity and retrieval of cached items. Update extractors and matchers to utilize the new cache system for improved performance and memory efficiency.

* Add tests for SetCapacities in cache package to ensure cache behavior on capacity changes

- Implemented TestSetCapacities_NoRebuildOnZero to verify that setting capacities to zero does not clear existing caches.
- Added TestSetCapacities_BeforeFirstUse to confirm that initial cache settings are respected and not overridden by subsequent capacity changes.

* Refactor matchers and update load test generator to use io package

- Removed maxRegexScanBytes constant from match.go.
- Replaced ioutil with io package in load_test.go for NopCloser usage.
- Restored TestValidate_AllowsInlineMultiline in load_test.go to ensure inline validation functionality.

* Add cancellation support in template execution and enhance test coverage

- Updated executeTemplateWithTargets to respect context cancellation.
- Introduced fakeTargetProvider and slowExecuter for testing.
- Added Test_executeTemplateWithTargets_RespectsCancellation to validate cancellation behavior during template execution.
2025-09-15 23:48:02 +05:30
Nakul Bharti
d4f1a815ed
fix: update go jira deps (#6475)
* fix: handle jira deprecated endpoint

* refactor: update Jira issue search result structure to include 'Self' field

* Revert "refactor: update Jira issue search result structure to include 'Self' field"

This reverts commit b0953419d33dff3fb61f1bcdcddab0ae759379b8.

* Revert "fix: handle jira deprecated endpoint"

This reverts commit 1fc05076cdb31906f403d80455b2e1609a66e2ae.

* chore(deps): bump github.com/andygrunwald/go-jira to v1.16.1 and tidy

* fix(jira): migrate Issue.Search to SearchV2JQL with explicit Fields
2025-09-15 18:23:08 +05:30
Ice3man
f460bf926d feat: added additional text/template helpers 2025-09-10 17:32:43 +05:30
Ice3man
218a2f69a5 feat: added new text/template syntax to jira custom fields 2025-09-10 16:51:20 +05:30
mkrs2404
9c64a1cb9b
Reporting validation (#6456)
* add custom validator for reporting issues

* use httpx dev branch

* remove yaml marshal/unmarshal for validator callback
2025-09-05 19:53:26 +05:30
Tarun Koyalwar
19247ae74b
Path-Based Fuzzing SQL fix (#6400)
* setup claude

* migrate to using errkit

* fix unused imports + lint errors

* update settings.json

* fix url encoding issue

* fix lint error

* fix the path fuzzing component

* fix lint error
2025-08-25 13:36:58 +05:30
Sandeep Singh
b4644af80a
Lint + test fixes after utils dep update (#6393)
* fix: remove undefined errorutil.ShowStackTrace

* feat: add make lint support and integrate with test

* refactor: migrate errorutil to errkit across codebase

- Replace deprecated errorutil with modern errkit
- Convert error declarations from var to func for better compatibility
- Fix all SA1019 deprecation warnings
- Maintain error chain support and stack traces

* fix: improve DNS test reliability using Google DNS

- Configure test to use Google DNS (8.8.8.8) for stability
- Fix nil pointer issue in DNS client initialization
- Keep production defaults unchanged

* fixing logic

* removing unwanted branches in makefile

---------

Co-authored-by: Mzack9999 <mzack9999@protonmail.com>
2025-08-20 05:28:23 +05:30
Dwi Siswanto
9fcacd0f86
ci(tests): migrate to golangci-lint v2 (#6380)
* chore: satisfy lints

Signed-off-by: Dwi Siswanto <git@dw1.io>

* ci(tests): migrate to golangci-lint v2

Signed-off-by: Dwi Siswanto <git@dw1.io>

---------

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-08-16 13:20:09 +07:00
PDTeamX
b0fe565a8b Merge branch 'main' into dev 2025-08-02 02:06:03 -07:00
Ice3man
06707ea76f
bugfix: preserve original transport for linear http client (#6357) 2025-07-30 21:38:07 +05:30
HD Moore
f26996cb89
Remove singletons from Nuclei engine (continuation of #6210) (#6296)
* introducing execution id

* wip

* .

* adding separate execution context id

* lint

* vet

* fixing pg dialers

* test ignore

* fixing loader FD limit

* test

* fd fix

* wip: remove CloseProcesses() from dev merge

* wip: fix merge issue

* protocolstate: stop memguarding on last dialer delete

* avoid data race in dialers.RawHTTPClient

* use shared logger and avoid race conditions

* use shared logger and avoid race conditions

* go mod

* patch executionId into compiled template cache

* clean up comment in Parse

* go mod update

* bump echarts

* address merge issues

* fix use of gologger

* switch cmd/nuclei to options.Logger

* address merge issues with go.mod

* go vet: address copy of lock with new Copy function

* fixing tests

* disable speed control

* fix nil ExecuterOptions

* removing deprecated code

* fixing result print

* default logger

* cli default logger

* filter warning from results

* fix performance test

* hardcoding path

* disable upload

* refactor(runner): uses `Warning` instead of `Print` for `pdcpUploadErrMsg`

Signed-off-by: Dwi Siswanto <git@dw1.io>

* Revert "disable upload"

This reverts commit 114fbe6663361bf41cf8b2645fd2d57083d53682.

* Revert "hardcoding path"

This reverts commit cf12ca800e0a0e974bd9fd4826a24e51547f7c00.

---------

Signed-off-by: Dwi Siswanto <git@dw1.io>
Co-authored-by: Mzack9999 <mzack9999@protonmail.com>
Co-authored-by: Dwi Siswanto <git@dw1.io>
Co-authored-by: Dwi Siswanto <25837540+dwisiswant0@users.noreply.github.com>
2025-07-10 01:17:26 +05:30
Dwi Siswanto
87ed0b2bb9
build: bump all direct modules (#6290)
* chore: fix non-constant fmt string in call

Signed-off-by: Dwi Siswanto <git@dw1.io>

* build: bump all direct modules

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore(hosterrorscache): update import path

Signed-off-by: Dwi Siswanto <git@dw1.io>

* fix(charts): break changes

Signed-off-by: Dwi Siswanto <git@dw1.io>

* build: pinned `github.com/zmap/zcrypto` to v0.0.0-20240512203510-0fef58d9a9db

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore: golangci-lint auto fixes

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore: satisfy lints

Signed-off-by: Dwi Siswanto <git@dw1.io>

* build: migrate `github.com/xanzy/go-gitlab` => `gitlab.com/gitlab-org/api/client-go`

Signed-off-by: Dwi Siswanto <git@dw1.io>

* feat(json): update build constraints

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore: dont panicking on close err

Signed-off-by: Dwi Siswanto <git@dw1.io>

---------

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-07-01 00:40:44 +07:00
Ice3man
b47ce6c372 feat: added bearer support to jira reporting for self hosted + misc 2025-04-03 16:52:57 +05:30
Ice3man
d10b7f7382
feat: escape code blocks for markdown formatting (#6089) 2025-03-07 14:45:39 +05:30
Ice3man
d56524933f
feat: fix reporting close functionality + misc (#6066) 2025-03-06 22:49:21 +05:30
Dwi Siswanto
622c5503fa
perf(*): replace encoding/json w/ sonic or go-json (fallback) (#6019)
* perf(*): replace `encoding/json` w/ sonic

Signed-off-by: Dwi Siswanto <git@dw1.io>

* feat(utils): add `json` pkg (sonic wrapper)

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore(*): use `sonic` wrapper instead

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore(*): replace `sonic.ConfigStd` -> `json` (wrapper)

Signed-off-by: Dwi Siswanto <git@dw1.io>

* test(model): adjust expected marshal'd JSON

Signed-off-by: Dwi Siswanto <git@dw1.io>

* feat(json): dynamic backend; `sonic` -> `go-json` (fallback)

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore(json): merge config - as its not usable

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore(json): rm go version constraints

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore: go mod tidy

Signed-off-by: Dwi Siswanto <git@dw1.io>

---------

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-02-11 03:01:37 +05:30
Dogan Can Bakir
53ff9c54ea
make markdown filename shorter (#5899) 2024-12-13 04:25:27 +05:30
Shubham Rasal
be1f634eae
Add Alive Proxy into Options (#5903)
* Move proxy variable from global to options

- Provides ability to pass diff proxy in single nuclei instance using sdk

* add type check (resolve comments)
2024-12-13 04:23:27 +05:30
Richard Brown
557b4fba38
removed trailing comma from the jsonl exporter (#5861)
* removed trailing comma from the jsonl exporter

* adding the O_TRUNC flag when opening the file to explicitly indicate that the file should be truncated if it exists.
2024-12-01 18:45:22 +05:30
Ice3man
b046f7686f
feat: Added time based delay analyzer to fuzzing implementation (#5781)
* feat: added fuzzing output enhancements

* changes as requested

* misc

* feat: added dfp flag to display fuzz points + misc additions

* feat: added support for fuzzing nested path segments

* feat: added parts to fuzzing requests

* feat: added tracking for parameter occurence frequency in fuzzing

* added cli flag for fuzz frequency

* fixed broken tests

* fixed path based sqli integration test

* feat: added configurable fuzzing aggression level for payloads

* fixed failing test

* feat: added analyzers implementation for fuzzing

* feat: misc changes to analyzer

* feat: misc additions of units + tests fix

* misc changes to implementation
2024-11-19 11:51:32 +05:30
Keith Chason
ba6a050d48
Batch JSONL output and add trailing commas (#5705) 2024-11-15 15:45:44 +05:30
Ice3man
6cb670d260
feat: fixed jira tracker issue with find request (#5798) 2024-11-07 02:56:04 +05:30
Keith Chason
3f0de96726
MongoDB Reporting (#5688)
* Initial setup of Mongo reporting

* Fix slice pop logic

* Switch to config-file logic

* Parse database name from connection string

* Switch to url.Parse for connection string parsing

* Address return/logging feedback
2024-10-13 21:44:33 +05:30
Ice3man
2ac9aaf871
bugfix: fixed misc issues with linear integration (#5630) 2024-09-13 23:45:27 +05:30
Ice3man
59e69b561d
feat: added linear issue tracker support to nuclei (#5601)
* feat: added linear issue tracker support to nuclei

* misc

* feat: fixed unmarshal issues

* added linear config

---------

Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
2024-09-12 15:34:50 +05:30
Roy Reznik
87c8cd8e01 Upgrade gitlab 2024-08-21 11:44:01 +01:00
Ice3man
80b3cc0627
feat: jira accept issue-type and project ids (#5537)
* feat: jira accept issue-type and project ids

* remove validation for project name

---------

Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
2024-08-19 06:20:12 +05:30
Tarun Koyalwar
1c76398aea
lint error fixes (#5531)
* lint error fixes

* chore: satisfy non-constant format str in call lint (govet)

Signed-off-by: Dwi Siswanto <git@dw1.io>

---------

Signed-off-by: Dwi Siswanto <git@dw1.io>
Co-authored-by: Dwi Siswanto <git@dw1.io>
2024-08-16 20:31:23 +05:30
Ice3man
f8842b1f04
fix: fixed individual per tracker reporting filters (#5297)
* fix: fixed individual per tracker reporting filters

* added test case
2024-06-16 19:14:43 +05:30
Dogan Can Bakir
9f1faa0a29
fix jira nil deref err (#5283) 2024-06-16 03:30:21 +05:30
Mzack9999
9adfc531c7 uniforming sizes with utils 2024-05-15 15:34:59 +02:00
Ice3man
6067b78bcf
feat: added MarshalYAML to severities array + issue tracker options fix (#5166)
* feat: added MarshalYAML to severities array

* fix issue with creation of reports
2024-05-10 21:59:03 +05:30
guangwu
431d3fa2d9
fix: close res body (#5025) 2024-04-16 14:53:49 +05:30
David Fisher
143f179e7b
Remove prefix v from Sarif exporters (#4976)
because: In config.Version there is already
a `v`` prefix, such as `v3.2.2``.

Prior to this commit the versions were being
tagged as `vv3.2.2`

this commit: Removes the 'v' prefix from the
Sarif exporter in the ToolDetails for both
FullName and SemanticVersion.
2024-04-03 17:19:27 +05:30
mzack
e523d3872c Merge branch 'dev' into maint-runner-cache 2024-03-14 23:46:50 +01:00
mzack
4aff6d7189 merging caches + removing import cycle via type any 2024-03-13 02:27:15 +01:00
mzack
d93454eee3 Merge branch 'dev' into maint-memory 2024-03-11 20:49:21 +01:00
Ice3man
a66b56fc79 change position of sdk text 2024-03-11 22:39:32 +05:30
mzack
3f295226ad Merge branch 'dev' into maint-memory 2024-03-11 15:03:14 +01:00
Ice3man
fd024a3e8d
feat: issue tracker URLs in JSON + misc fixes (#4855)
* feat: issue tracker URLs in JSON + misc fixes

* misc changes

* feat: status update support for issues

* feat: report metadata generation hook support

* feat: added CLI summary of tickets created

* misc changes
2024-03-10 22:02:42 +05:30
mzack
52beea3bcd Merge branch 'dev' into maint-memory 2024-03-05 01:26:06 +01:00
Leon Jacobs
3ab0ae6c6f
Implement more granular, issue tracker level filtering (#4780)
* (feat) include gitea in default config

* (feat) implement tracker level filtering in #4779
2024-03-02 18:25:13 +05:30
mzack
4d29bff759 using disk storage for large kv 2024-03-01 02:11:18 +01:00
Leon Jacobs
0bd447834c
(feat) add Gitea reporting platform support (#4522)
* (feat) add Gitea reporting platform support

* (fix) remove debugging code

* (chore) fix typo

* (chore) update syntax with recent changes

* (fix) use Index to update issue comments

* (feat) add gitea config example

* added missing option

---------

Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
2024-02-19 03:34:37 +05:30
Dogan Can Bakir
5f4dcfb6be
use projectdiscovery/useragent (#4708)
* use projectdiscovery/useragent

* minor
2024-02-01 03:12:38 +05:30
Dogan Can Bakir
e102caec78
omit raw from integrations (#4612)
* omit raw from integrations

* fix lint
2024-01-27 04:06:25 +05:30
Razin Idzuddin
80560720fd
update JQL to include project name (#4416) 2023-11-26 15:13:57 +05:30
Tarun Koyalwar
dc44105baf
nuclei v3 : misc updates (#4247)
* use parsed options while signing

* update project layout to v3

* fix .gitignore

* remove example template

* misc updates

* bump tlsx version

* hide template sig warning with env

* js: retain value while using log

* fix nil pointer derefernce

* misc doc update

---------

Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
2023-10-17 17:44:13 +05:30