Repository navigation
Main - #8355
Open
aws-sanjaychauhan wants to merge 962 commits into
Open
Main#8355aws-sanjaychauhan wants to merge 962 commits into
aws-sanjaychauhan wants to merge 962 commits into
Conversation
… entry overhead toward the cap
…sort extracted values in replay
…ery#8102) * fix(js/tsgen): map non-struct external types to any tsgen treated every type from another package as a struct and queued it to have its fields scraped into a TypeScript interface. The kind was checked only at scrape time, as a fatal error, so an interface, func, or named basic type in an exported signature or field aborted the whole run. make jsupdate-tsgen panicked on net.Conn, which the dcerpc, gptransport, mssql, net, and oracle libraries return, and never wrote the remaining definitions or index.ts. Check the kind when the type is first seen instead. Structs are still scraped; other types have no fields to describe and become any, as external parameter types already do. Names that do not resolve are still reported. Fixes: projectdiscovery#8099 Signed-off-by: Dwi Siswanto <git@dw1.io> * fix(js): exclude gptransport and smbsession from codegen gptransport and smbsession are shared Go adapters for the smb, dcerpc, and file protocol code, not JavaScript modules: nothing registers them with the runtime, and index.ts does not export them. Without the .nuclei-jsgen-ignore marker that goexec already carries, tsgen and bindgen treat them as modules, so a full make jsupdate-tsgen run writes gptransport.ts and smbsession.ts and adds both to index.ts. Refs: projectdiscovery#8099 Signed-off-by: Dwi Siswanto <git@dw1.io> * fix returns --------- Signed-off-by: Dwi Siswanto <git@dw1.io> Co-authored-by: Mzack9999 <mzack9999@protonmail.com>
…eplay add -store-events and -replay over stored events of any protocol
…hared-responses send identical requests once per scan
# Conflicts: # internal/runner/runner.go # pkg/types/types.go
…un-plan add -run-plan to run a plan file and resume it
…jectdiscovery#7543) The stats ticker only starts on progress.Init, which runs when scan execution begins. The httpx input-probing phase runs before that, so with a large target list -stats printed nothing until probing finished. With tens of thousands of hosts that is hours without any statistics update. InitProbe now starts the ticker before probing begins and reports probed/total hosts at the -stats-interval cadence. All fields are registered before the ticker starts, so the later Init call only updates the estimated request total and never registers fields while the metrics server serves them. Once probing finishes, the regular scan statistics resume unchanged. Closes projectdiscovery#7543 Co-authored-by: generaltony007 <144252170+GeneralTony007@users.noreply.github.com>
\-eh\ only removes entries from the hmap store. In stream mode Iterate reads hostMapStream, and filekv has no per-entry delete, so excluded targets were still returned by -plan and by the executor. Filter them during iteration, matching both the supplied and the normalized deduplication key. Refs projectdiscovery#8131
Bumps the go_modules group with 1 update in the / directory: [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go). Updates `go.opentelemetry.io/otel/sdk` from 1.45.0 to 1.47.0 - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](open-telemetry/opentelemetry-go@v1.45.0...v1.47.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel/sdk dependency-version: 1.47.0 dependency-type: indirect dependency-group: go_modules ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ok, keep widened lines
…ections to every target there
…teer-plan follow appends to a running plan and its cancel log
…uto-tech add -auto-tech to skip templates bound to products the tech templates did not detect
projectdiscovery#8112) Signed-off-by: anant <170962632+antcybersec@users.noreply.github.com> Co-authored-by: anant <170962632+antcybersec@users.noreply.github.com>
Evaluate parsed each {{expr}} with govaluate up to three times per call:
once or twice in isExpression and again in evaluateExpression. Parsing
was about 70% of evaluation time.
Cache successful parses, and whether a source parses without helper
functions, in bounded maps with lock-free reads. Only template-authored
sources up to 1 KiB are cached; a source with inlined values (such as a
response body) is parsed without caching so it cannot pin memory.
Failed parses are not cached because helpers can be registered later.
Signed-off-by: anant <170962632+antcybersec@users.noreply.github.com> Co-authored-by: anant <170962632+antcybersec@users.noreply.github.com>
…s by value (projectdiscovery#8307) readChunk dropped the bytes of any file under 1024 bytes because io.ReadFull reports a short read, so mime-type matching never saw them. matchAnyMimeTypes also passed a mime type to filetype.Is, which expects an extension, so the mime-type allow and deny entries never matched even for larger files. Fixes projectdiscovery#8306 Signed-off-by: KVR Vishnu <46535652+VISHNU0906@users.noreply.github.com>
…ctdiscovery#8242) Since projectdiscovery#8093 every parse runs the ECDSA signature check, so a process that loads the same templates several times (for example SDK engines that share a parser) verifies every unchanged template again on each load. Remember which verifier accepted a template in an in-memory LRU keyed by the verification digest, which covers the template bytes and its imported files. Nothing is read from index.gob or any other file, a changed template is verified again, and a verdict only counts while its verifier is still one of the default verifiers. Failed verifications are not cached. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…tdiscovery#8240) The shared response store kept the *http.Response the base transport returned. Its closed Body still reaches the connection that served it, through the body reader over the connection's bufio.Reader, and its Request reaches it through the trace hooks connTrackingTransport installs. So every entry kept a connection reachable until it was evicted or the scan ended. Against a server that closes the connection after each response, each entry held a closed connection's TLS state and buffers of its own, none of it counted toward the store's byte cap. The entry now keeps a copy without Body and Request. copyFor sets both on every response it hands out, so callers get the same responses. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(output): apply -rss to -ms failure events Signed-off-by: anant <170962632+antcybersec@users.noreply.github.com> * fix(output): preserve UTF-8 rune boundary and enforce size after redaction Signed-off-by: anant <170962632+antcybersec@users.noreply.github.com> --------- Signed-off-by: anant <170962632+antcybersec@users.noreply.github.com> Co-authored-by: anant <170962632+antcybersec@users.noreply.github.com>
…ng (projectdiscovery#8325) * fix(raw): keep an unsafe request line with no path instead of panicking readRawRequest indexed parts[1] after the missing-field check, which is skipped for unsafe requests, so a request line of just "GET" panicked with index out of range. Treat the path as empty, the same as the supported "GET HTTP/1.1" form, and keep the raw bytes as written. Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com> * test(raw): cover an unsafe request line with no path Add a test that an unsafe request line with only a method does not panic, keeps an empty path and the raw bytes, and that a safe request still errors. Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com> --------- Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>
…ectdiscovery#8323) * fix(fuzz): return an error for non-string entries in a fuzz map The map form of a fuzz rule asserted string keys and values without checking, so a value like `q: 1` panicked. Return an error that names the entry instead. Refs projectdiscovery#8322 Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com> * test(fuzz): cover non-string entries in a fuzz map Covers int, bool, list and non-string-key entries, and checks that quoted values still load. Refs projectdiscovery#8322 Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com> --------- Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>
…redStringMap (projectdiscovery#8321) * fix(utils): return an error for non-string YAML keys in InsertionOrderedStringMap A mapping key such as `1:` decodes to a non-string value, and the unchecked type assertion in UnmarshalYAML panicked. Return an error that names the key instead, so `1` and "1" are never merged. Refs projectdiscovery#8320 Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com> * test(utils): cover non-string YAML keys in InsertionOrderedStringMap Covers non-string keys (int, bool, float), and checks that a quoted "1" key still loads. Refs projectdiscovery#8320 Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com> --------- Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>
…scovery#8302) * fix(js/ssh): bracket IPv6 hosts when joining host and port connect() and connectSSHInfoMode() built the dial address with fmt.Sprintf("%s:%d", ...), so an IPv6 host such as 2001:db8::1 became "2001:db8::1:22" and the dial failed with "too many colons in address". Use net.JoinHostPort, which brackets IPv6 literals and leaves IPv4 addresses and hostnames unchanged. Add TestConnectIPv6, which connects to an SSH server on [::1] through both Connect and ConnectSSHInfoMode. * Update pkg/js/libs/ssh/ssh.go Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix(js/ssh): strip IPv6 brackets before dialing in connect connect() passed opts.Host straight to net.JoinHostPort, so a bracketed host such as [::1] was dialed as [[::1]]:22 and failed with "missing port in address". The previous fmt.Sprintf form handled it. Strip one surrounding bracket pair first, as connectSSHInfoMode already does. Extend TestConnectIPv6 to run Connect and ConnectSSHInfoMode with both the bare and the bracketed IPv6 loopback address. --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…discovery#8250) The parsed query shadowed the raw one, so a jq parse error was reported as "could not parse json: <nil>". Report the raw query and wrap the gojq error for both parse and compile failures.
…y#8248) * fix(jira): close response bodies go-jira leaves open go-jira does not close the response of a transition it does not decode, and it returns the response unread when issue creation or a raw request fails. Close those bodies so the connections can be reused. * fix(jira): bound the response body drain * skip drain --------- Co-authored-by: review <review@example.invalid>
…ery#8215) * fix(index): save through a temp file of the save's own Save wrote its snapshot to the fixed path cacheFile + ".tmp" under the Index's own mutex, so two indexes over one cache directory (two SDK engines in one process, or two nuclei processes of one user) truncated and renamed the same file: one save failed on its rename with "no such file or directory", and the file left in place could hold bytes of both snapshots. Each save now creates its temp file with os.CreateTemp beside the cache file and renames it into place. Fixes projectdiscovery#8212 * test(index): compare the saved cache with one index's whole snapshot The concurrent-save test checked only the saved file's entry count, which a file mixing both indexes' entries could also meet. It now compares the decoded data, keys and metadata, with what each index of the last round set, and passes only where it equals one of them.
…8252) sendTCP read the 4-byte length prefix with a single Read, which can return fewer bytes when the prefix arrives in more than one segment. The message length was then decoded from a partly filled buffer. Use io.ReadFull, as the body read already does.
…ry#8232) * feat(code): pass -proxy to code protocol subprocesses Code templates run external interpreters that never saw the proxy chosen with -proxy, so their traffic went direct unless -proxy-internal was also set. Export the alive proxy as HTTP_PROXY, HTTPS_PROXY and ALL_PROXY (and lowercase forms) to the subprocess, after template variables so -proxy takes precedence. The values are kept out of the result event so proxy credentials do not reach the output. The pre-condition JS runtime now also receives the HTTP proxy, matching the javascript protocol. * add test --------- Co-authored-by: review <review@example.invalid>
…ojectdiscovery#8235) * feat(ssl): honor http -proxy and skip openssl mode behind a proxy The ssl protocol dials through the shared fastdialer, which only knows about SOCKS5 proxies, so with an http -proxy TLS handshakes went straight to the target. Add a second fastdialer that tunnels through the http proxy with CONNECT, created only when an http proxy is in use, and let ssl opt in to it through networkclientpool. The shared dialer stays unchanged since the http client already talks to the proxy itself. scan_mode openssl runs s_client, which connects directly regardless of -proxy, so fall back to auto whenever a proxy is set. * harden proxy --------- Co-authored-by: review <review@example.invalid>
…discovery#8316) ClusterExecuter.ExecuteWithResults logged matched events to a private ScanContext instead of the caller's, so the caller's OnResult callback never fired. A workflow step drives its subtemplates through that callback (pkg/core/workflow_execute.go): when a step's templates cluster (e.g. a step selected by tags that matches several clusterable templates), the step was marked unmatched and every subtemplate and workflow matcher of that step silently never ran, even though the clustered templates matched. Log events on the caller's context, like a single template's executer does, and return its results.
…tdiscovery#8305) TmplClusterKey hashed redirects and protocol-redirects but not host-redirects, although host-redirects changes the redirect flow of the request's client. A cluster sends its first member's request for every member, so a host-redirects template clustered behind a plain request to the same path never followed the redirect and its matchers ran on the 3xx response. In nuclei-templates this silently drops 28 host-redirects templates (maxkb-panel, discuz-panel, traccar-panel, ...) that share the GET {{BaseURL}} cluster in a default scan. Add HostRedirects to the cluster key, next to Redirects and ProtocolRedirects. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…text (projectdiscovery#8119) * fix(js/ssh): cancel info handshakes with caller context * fix(js/ssh): preserve bracketed IPv6 hosts and reuse test context helper * skip ipv6 * fix lint --------- Co-authored-by: review <review@example.invalid> Co-authored-by: Mzack9999 <mzack9999@protonmail.com>
* serve interactsh locally in unit tests * drop the overwritten server url * close the interactsh client before its server
…#8352) Bumps the modules group with 14 updates: | Package | From | To | | --- | --- | --- | | [github.com/projectdiscovery/clistats](https://github.com/projectdiscovery/clistats) | `0.1.10` | `0.1.11` | | [github.com/projectdiscovery/dsl](https://github.com/projectdiscovery/dsl) | `0.9.4` | `0.9.5` | | [github.com/projectdiscovery/fastdialer](https://github.com/projectdiscovery/fastdialer) | `0.6.3` | `0.6.5` | | [github.com/projectdiscovery/goflags](https://github.com/projectdiscovery/goflags) | `0.2.1` | `0.2.3` | | [github.com/projectdiscovery/gologger](https://github.com/projectdiscovery/gologger) | `1.1.76` | `1.1.77` | | [github.com/projectdiscovery/hmap](https://github.com/projectdiscovery/hmap) | `0.0.105` | `0.0.106` | | [github.com/projectdiscovery/networkpolicy](https://github.com/projectdiscovery/networkpolicy) | `0.1.59` | `0.1.60` | | [github.com/projectdiscovery/ratelimit](https://github.com/projectdiscovery/ratelimit) | `0.0.95` | `0.1.1` | | [github.com/projectdiscovery/rawhttp](https://github.com/projectdiscovery/rawhttp) | `0.3.1` | `0.3.3` | | [github.com/projectdiscovery/retryabledns](https://github.com/projectdiscovery/retryabledns) | `1.0.119` | `1.0.121` | | [github.com/projectdiscovery/retryablehttp-go](https://github.com/projectdiscovery/retryablehttp-go) | `1.3.35` | `1.3.37` | | [github.com/projectdiscovery/rod](https://github.com/projectdiscovery/rod) | `0.116.3-0.20261113214723-dd0abeca2a24` | `0.117.0` | | [github.com/projectdiscovery/utils](https://github.com/projectdiscovery/utils) | `0.11.16` | `0.11.17` | | [github.com/projectdiscovery/wappalyzergo](https://github.com/projectdiscovery/wappalyzergo) | `0.3.10` | `0.3.11` | Updates `github.com/projectdiscovery/clistats` from 0.1.10 to 0.1.11 - [Release notes](https://github.com/projectdiscovery/clistats/releases) - [Commits](projectdiscovery/clistats@v0.1.10...v0.1.11) Updates `github.com/projectdiscovery/dsl` from 0.9.4 to 0.9.5 - [Release notes](https://github.com/projectdiscovery/dsl/releases) - [Commits](projectdiscovery/dsl@v0.9.4...v0.9.5) Updates `github.com/projectdiscovery/fastdialer` from 0.6.3 to 0.6.5 - [Release notes](https://github.com/projectdiscovery/fastdialer/releases) - [Commits](projectdiscovery/fastdialer@v0.6.3...v0.6.5) Updates `github.com/projectdiscovery/goflags` from 0.2.1 to 0.2.3 - [Release notes](https://github.com/projectdiscovery/goflags/releases) - [Commits](projectdiscovery/goflags@v0.2.1...v0.2.3) Updates `github.com/projectdiscovery/gologger` from 1.1.76 to 1.1.77 - [Release notes](https://github.com/projectdiscovery/gologger/releases) - [Commits](projectdiscovery/gologger@v1.1.76...v1.1.77) Updates `github.com/projectdiscovery/hmap` from 0.0.105 to 0.0.106 - [Release notes](https://github.com/projectdiscovery/hmap/releases) - [Commits](projectdiscovery/hmap@v0.0.105...v0.0.106) Updates `github.com/projectdiscovery/networkpolicy` from 0.1.59 to 0.1.60 - [Release notes](https://github.com/projectdiscovery/networkpolicy/releases) - [Commits](projectdiscovery/networkpolicy@v0.1.59...v0.1.60) Updates `github.com/projectdiscovery/ratelimit` from 0.0.95 to 0.1.1 - [Release notes](https://github.com/projectdiscovery/ratelimit/releases) - [Commits](projectdiscovery/ratelimit@v0.0.95...v0.1.1) Updates `github.com/projectdiscovery/rawhttp` from 0.3.1 to 0.3.3 - [Release notes](https://github.com/projectdiscovery/rawhttp/releases) - [Commits](projectdiscovery/rawhttp@v0.3.1...v0.3.3) Updates `github.com/projectdiscovery/retryabledns` from 1.0.119 to 1.0.121 - [Release notes](https://github.com/projectdiscovery/retryabledns/releases) - [Commits](projectdiscovery/retryabledns@v1.0.119...v1.0.121) Updates `github.com/projectdiscovery/retryablehttp-go` from 1.3.35 to 1.3.37 - [Release notes](https://github.com/projectdiscovery/retryablehttp-go/releases) - [Commits](projectdiscovery/retryablehttp-go@v1.3.35...v1.3.37) Updates `github.com/projectdiscovery/rod` from 0.116.3-0.20261113214723-dd0abeca2a24 to 0.117.0 - [Release notes](https://github.com/projectdiscovery/rod/releases) - [Commits](https://github.com/projectdiscovery/rod/commits/v0.117.0) Updates `github.com/projectdiscovery/utils` from 0.11.16 to 0.11.17 - [Release notes](https://github.com/projectdiscovery/utils/releases) - [Changelog](https://github.com/projectdiscovery/utils/blob/main/CHANGELOG.md) - [Commits](projectdiscovery/utils@v0.11.16...v0.11.17) Updates `github.com/projectdiscovery/wappalyzergo` from 0.3.10 to 0.3.11 - [Release notes](https://github.com/projectdiscovery/wappalyzergo/releases) - [Commits](projectdiscovery/wappalyzergo@v0.3.10...v0.3.11) --- updated-dependencies: - dependency-name: github.com/projectdiscovery/clistats dependency-version: 0.1.11 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: modules - dependency-name: github.com/projectdiscovery/dsl dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: modules - dependency-name: github.com/projectdiscovery/fastdialer dependency-version: 0.6.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: modules - dependency-name: github.com/projectdiscovery/goflags dependency-version: 0.2.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: modules - dependency-name: github.com/projectdiscovery/gologger dependency-version: 1.1.77 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: modules - dependency-name: github.com/projectdiscovery/hmap dependency-version: 0.0.106 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: modules - dependency-name: github.com/projectdiscovery/networkpolicy dependency-version: 0.1.60 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: modules - dependency-name: github.com/projectdiscovery/ratelimit dependency-version: 0.1.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: modules - dependency-name: github.com/projectdiscovery/rawhttp dependency-version: 0.3.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: modules - dependency-name: github.com/projectdiscovery/retryabledns dependency-version: 1.0.121 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: modules - dependency-name: github.com/projectdiscovery/retryablehttp-go dependency-version: 1.3.37 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: modules - dependency-name: github.com/projectdiscovery/rod dependency-version: 0.117.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: modules - dependency-name: github.com/projectdiscovery/utils dependency-version: 0.11.17 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: modules - dependency-name: github.com/projectdiscovery/wappalyzergo dependency-version: 0.3.11 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: modules ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ry#8354) Bumps [projectdiscovery/actions/goreleaser](https://github.com/projectdiscovery/actions) from 1.29.5 to 1.30.0. - [Commits](projectdiscovery/actions@3037fcd...47b4561) --- updated-dependencies: - dependency-name: projectdiscovery/actions/goreleaser dependency-version: 1.30.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Proof
Checklist