recon-orchestrator 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. recon_orchestrator-1.0.0/LICENSE +202 -0
  2. recon_orchestrator-1.0.0/PKG-INFO +490 -0
  3. recon_orchestrator-1.0.0/README.md +467 -0
  4. recon_orchestrator-1.0.0/pyproject.toml +63 -0
  5. recon_orchestrator-1.0.0/recon/__init__.py +3 -0
  6. recon_orchestrator-1.0.0/recon/__main__.py +6 -0
  7. recon_orchestrator-1.0.0/recon/analyst/__init__.py +13 -0
  8. recon_orchestrator-1.0.0/recon/analyst/anthropic.py +26 -0
  9. recon_orchestrator-1.0.0/recon/analyst/base.py +58 -0
  10. recon_orchestrator-1.0.0/recon/analyst/openai_compatible.py +24 -0
  11. recon_orchestrator-1.0.0/recon/cli.py +411 -0
  12. recon_orchestrator-1.0.0/recon/config.py +105 -0
  13. recon_orchestrator-1.0.0/recon/context.py +44 -0
  14. recon_orchestrator-1.0.0/recon/diff.py +92 -0
  15. recon_orchestrator-1.0.0/recon/dockerutil.py +69 -0
  16. recon_orchestrator-1.0.0/recon/engine.py +115 -0
  17. recon_orchestrator-1.0.0/recon/findings.py +97 -0
  18. recon_orchestrator-1.0.0/recon/i18n.py +161 -0
  19. recon_orchestrator-1.0.0/recon/integrations/__init__.py +0 -0
  20. recon_orchestrator-1.0.0/recon/integrations/github.py +118 -0
  21. recon_orchestrator-1.0.0/recon/modules/__init__.py +67 -0
  22. recon_orchestrator-1.0.0/recon/modules/authz.py +105 -0
  23. recon_orchestrator-1.0.0/recon/modules/content.py +95 -0
  24. recon_orchestrator-1.0.0/recon/modules/cors.py +46 -0
  25. recon_orchestrator-1.0.0/recon/modules/dns.py +147 -0
  26. recon_orchestrator-1.0.0/recon/modules/headers.py +91 -0
  27. recon_orchestrator-1.0.0/recon/modules/mail.py +140 -0
  28. recon_orchestrator-1.0.0/recon/modules/openapi.py +124 -0
  29. recon_orchestrator-1.0.0/recon/modules/ports.py +114 -0
  30. recon_orchestrator-1.0.0/recon/modules/tls.py +82 -0
  31. recon_orchestrator-1.0.0/recon/modules/web.py +82 -0
  32. recon_orchestrator-1.0.0/recon/ratelimit.py +37 -0
  33. recon_orchestrator-1.0.0/recon/report.py +166 -0
  34. recon_orchestrator-1.0.0/recon/report_html.py +148 -0
  35. recon_orchestrator-1.0.0/recon/runner.py +116 -0
  36. recon_orchestrator-1.0.0/recon/scope.py +99 -0
  37. recon_orchestrator-1.0.0/recon_orchestrator.egg-info/PKG-INFO +490 -0
  38. recon_orchestrator-1.0.0/recon_orchestrator.egg-info/SOURCES.txt +60 -0
  39. recon_orchestrator-1.0.0/recon_orchestrator.egg-info/dependency_links.txt +1 -0
  40. recon_orchestrator-1.0.0/recon_orchestrator.egg-info/entry_points.txt +2 -0
  41. recon_orchestrator-1.0.0/recon_orchestrator.egg-info/requires.txt +12 -0
  42. recon_orchestrator-1.0.0/recon_orchestrator.egg-info/top_level.txt +1 -0
  43. recon_orchestrator-1.0.0/setup.cfg +4 -0
  44. recon_orchestrator-1.0.0/tests/test_analyst.py +47 -0
  45. recon_orchestrator-1.0.0/tests/test_authz.py +40 -0
  46. recon_orchestrator-1.0.0/tests/test_config.py +56 -0
  47. recon_orchestrator-1.0.0/tests/test_diff.py +78 -0
  48. recon_orchestrator-1.0.0/tests/test_dns.py +74 -0
  49. recon_orchestrator-1.0.0/tests/test_engine.py +47 -0
  50. recon_orchestrator-1.0.0/tests/test_findings.py +51 -0
  51. recon_orchestrator-1.0.0/tests/test_github.py +87 -0
  52. recon_orchestrator-1.0.0/tests/test_headers.py +40 -0
  53. recon_orchestrator-1.0.0/tests/test_i18n.py +39 -0
  54. recon_orchestrator-1.0.0/tests/test_mail.py +45 -0
  55. recon_orchestrator-1.0.0/tests/test_openapi.py +60 -0
  56. recon_orchestrator-1.0.0/tests/test_parallel.py +56 -0
  57. recon_orchestrator-1.0.0/tests/test_parsers.py +110 -0
  58. recon_orchestrator-1.0.0/tests/test_polish.py +47 -0
  59. recon_orchestrator-1.0.0/tests/test_report.py +93 -0
  60. recon_orchestrator-1.0.0/tests/test_report_html.py +56 -0
  61. recon_orchestrator-1.0.0/tests/test_runner.py +39 -0
  62. recon_orchestrator-1.0.0/tests/test_scope.py +52 -0
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,490 @@
1
+ Metadata-Version: 2.4
2
+ Name: recon-orchestrator
3
+ Version: 1.0.0
4
+ Summary: Authorized security-scan tool orchestrator (nmap/nuclei/testssl + built-in checks) with Markdown/JSON/SARIF reports.
5
+ License-Expression: Apache-2.0
6
+ Keywords: security,pentesting,recon,nuclei,nmap,sarif,appsec
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Topic :: Security
9
+ Requires-Python: >=3.9
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: requests>=2.28
13
+ Requires-Dist: pyyaml>=6.0
14
+ Provides-Extra: dns
15
+ Requires-Dist: dnspython>=2.4; extra == "dns"
16
+ Provides-Extra: dev
17
+ Requires-Dist: pytest>=7; extra == "dev"
18
+ Requires-Dist: ruff>=0.6; extra == "dev"
19
+ Requires-Dist: mypy>=1.8; extra == "dev"
20
+ Requires-Dist: types-requests; extra == "dev"
21
+ Requires-Dist: dnspython>=2.4; extra == "dev"
22
+ Dynamic: license-file
23
+
24
+ # recon-orchestrator
25
+
26
+ [![ci](https://github.com/m0Corut/recon-orchestrator/actions/workflows/ci.yml/badge.svg)](https://github.com/m0Corut/recon-orchestrator/actions/workflows/ci.yml)
27
+ ![license](https://img.shields.io/badge/license-Apache--2.0-blue)
28
+ ![python](https://img.shields.io/badge/python-3.9%2B-blue)
29
+
30
+ **[English](#english)** | **[Türkçe](#türkçe)**
31
+
32
+ ---
33
+
34
+ ## English
35
+
36
+ A lightweight **tool orchestrator** for authorized security testing. One
37
+ command runs well-known open-source security tools (nmap, nuclei, testssl.sh)
38
+ plus built-in Python checks (security headers, CORS, content discovery, DNS/
39
+ email security, authenticated access control, OpenAPI coverage, mail/SMTP)
40
+ against a target, merges the results, and produces **Markdown + JSON + SARIF +
41
+ HTML** reports.
42
+
43
+ > No dependency on an expensive LLM — works entirely with free tools. An
44
+ > optional "analyst" summarization layer exists but is strictly opt-in.
45
+
46
+ ### ⚠️ Legal notice
47
+
48
+ This tool sends **real requests** to the target. Use it only on systems you
49
+ **own** or have **written authorization** to test. Unauthorized scanning is a
50
+ crime in most jurisdictions; responsibility is entirely yours. The tool
51
+ requires the `--authorized` flag before it will run.
52
+
53
+ ### Requirements
54
+
55
+ - Python 3.9+
56
+ - `requests`, `pyyaml` (installed automatically)
57
+ - Optional `[dns]` extra (`pip install ".[dns]"`) for the `dns` and `mail` modules
58
+ - Docker — only needed for the `ports`, `tls`, `web` modules (images are pulled
59
+ automatically on first run). Without Docker those modules are skipped; the
60
+ pure-Python modules still run. Or use `--runner native` / the bundled
61
+ [Docker image](#docker-image-tools-included) which ships the tools as native
62
+ binaries.
63
+
64
+ ### Sample output
65
+
66
+ ![recon-orchestrator demo](docs/demo.svg)
67
+
68
+ See [examples/sample-report.md](examples/sample-report.md) for the report format.
69
+
70
+ ### Install
71
+
72
+ ```bash
73
+ git clone https://github.com/m0Corut/recon-orchestrator
74
+ cd recon-orchestrator
75
+ pip install -r requirements.txt
76
+ # or as a package (with the DNS/mail extra):
77
+ pip install ".[dns]"
78
+ ```
79
+
80
+ ### Docker image (tools included)
81
+
82
+ A single image bundling nmap, nuclei and testssl.sh as native binaries — no
83
+ local install needed:
84
+
85
+ ```bash
86
+ docker run --rm -v "$PWD:/work" ghcr.io/m0corut/recon-orchestrator \
87
+ https://example.com --authorized
88
+ ```
89
+
90
+ ### Usage
91
+
92
+ ```bash
93
+ # All modules (including Docker-based ones)
94
+ python -m recon https://example.com --authorized
95
+
96
+ # Fast, Docker-free checks only
97
+ python -m recon example.com -m headers,cors,content,dns --authorized
98
+
99
+ # Lower the rate (be gentle on production), use your own wordlist
100
+ python -m recon https://example.com --authorized --rate 10 --wordlist paths.txt
101
+
102
+ # CI: exit code 2 if any finding is high+
103
+ python -m recon https://example.com --authorized --fail-on high
104
+
105
+ # Report language (default English; Turkish available):
106
+ python -m recon https://example.com --authorized --lang tr
107
+
108
+ # Scope: only the target host by default; allow extra hosts:
109
+ python -m recon https://example.com --authorized --scope "api.example.com,*.cdn.example.com"
110
+
111
+ # CI: fail only on a NEW finding (the previous run is the baseline automatically):
112
+ python -m recon https://example.com --authorized --fail-on-new high
113
+
114
+ # Compare two reports directly:
115
+ python -m recon diff ./previous/report.json ./latest/report.json
116
+
117
+ # YAML config: generate a template, edit it, run it:
118
+ python -m recon init
119
+ python -m recon --config recon.yaml --authorized
120
+
121
+ # Pick report formats, concurrency, and the tool runner:
122
+ python -m recon https://example.com --authorized --format html,json --jobs 3 --runner native
123
+
124
+ # Authenticated (read-only) access-control check:
125
+ python -m recon https://example.com --authorized -m authz \
126
+ --auth-header-env SESSION_COOKIE --auth-page /account --auth-page /admin
127
+
128
+ # OpenAPI/Swagger-driven endpoint coverage:
129
+ python -m recon https://api.example.com --authorized -m openapi --spec ./openapi.json
130
+
131
+ # Optional: open a GitHub issue per new finding, and an optional LLM summary:
132
+ python -m recon https://example.com --authorized --fail-on-new high \
133
+ --github-issues myorg/myrepo --analyst anthropic
134
+ ```
135
+
136
+ **Parallelism:** modules run in parallel by default (the slowest tools —
137
+ nuclei/testssl/nmap — now overlap). Use `--jobs N` to cap concurrency or
138
+ `--serial` to force sequential execution. Active HTTP modules share one
139
+ aggregate rate budget (`--rate`, total requests/sec), so parallelism never
140
+ increases load on the target.
141
+
142
+ **Config file:** `recon init` writes a `recon.yaml` where you define targets,
143
+ scope, modules, language, `fail_on`/`fail_on_new`, and per-module options
144
+ (nuclei tags, port count, wordlist, etc.). CLI flags override the config file.
145
+ `targets` can list multiple hosts — each is scanned in turn.
146
+
147
+ **Run diff:** every run automatically uses the most recent previous run for the
148
+ same host as a baseline and reports new/resolved findings (disable with
149
+ `--no-auto-baseline`). `--fail-on-new <severity>` only fails the build when a
150
+ **new** finding reaches that severity — so CI doesn't stay red forever on a
151
+ pre-existing issue.
152
+
153
+ **Scope safety:** by default the tool only ever requests the target host.
154
+ HTTP modules check every request *and* every redirect against the scope
155
+ allowlist, so a redirect probe cannot bounce onto a third-party host.
156
+ `--allow-private` is required for internal/loopback addresses.
157
+
158
+ **Tool runner:** `--runner auto|docker|native` controls how external tools
159
+ run. `auto` prefers natively installed binaries and falls back to Docker.
160
+
161
+ Reports default to English; `--lang tr` produces Turkish. The `rule_id` and
162
+ SARIF identity are language-independent — only human-readable text is
163
+ translated.
164
+
165
+ Each run writes `report.md`, `report.json`, `findings.sarif`, `report.html`
166
+ under `recon_runs/<host>_<timestamp>/`.
167
+
168
+ ### Modules
169
+
170
+ | Module | Docker? | What it does |
171
+ |--------|---------|---------------|
172
+ | `headers` | No | Security headers + cookie flags + tech disclosure |
173
+ | `cors` | No | Reflected-Origin CORS misconfiguration |
174
+ | `content` | No | Path/file discovery (catch-all filtered) |
175
+ | `dns` | No (needs `[dns]`) | SPF / DMARC / DKIM / CAA / MX email security |
176
+ | `ports` | Yes (nmap) | Open ports/services + risky-service warnings |
177
+ | `tls` | Yes (testssl) | Old protocols / weak ciphers |
178
+ | `web` | Yes (nuclei) | Known-issue/tech detection via community templates |
179
+ | `authz` | No | Authenticated, read-only access-control checks (opt-in, needs credentials) |
180
+ | `openapi` | No | OpenAPI/Swagger-driven endpoint coverage (read-only) |
181
+ | `mail` | No (needs `[dns]`) | SMTP STARTTLS / MTA-STS / TLS-RPT (scope-respecting) |
182
+
183
+ ### Architecture
184
+
185
+ ```
186
+ recon/
187
+ ├── cli.py # argparse + config merge + report writing
188
+ ├── engine.py # run_scan(): module scheduling, parallelism, dedup
189
+ ├── context.py # ScanContext (typed options shared with modules)
190
+ ├── scope.py # allowlist + scoped_get() (redirect-safe HTTP)
191
+ ├── ratelimit.py # shared aggregate rate limiter
192
+ ├── runner.py # DockerRunner / NativeRunner abstraction
193
+ ├── diff.py # fingerprint-based run-to-run diff
194
+ ├── config.py # YAML config loading/validation
195
+ ├── findings.py # Finding / ScanResult, rule_id + fingerprint
196
+ ├── i18n.py # EN/TR message catalogue
197
+ ├── report.py / report_html.py # Markdown / JSON / SARIF / HTML renderers
198
+ ├── analyst/ # optional LLM summarization (opt-in, no SDKs)
199
+ ├── integrations/github.py # optional GitHub issue creation
200
+ └── modules/ # each exposes NAME, NEEDS_DOCKER, run(target, ctx)
201
+ ```
202
+
203
+ Adding a module: create `recon/modules/<name>.py` with `NAME`,
204
+ `NEEDS_DOCKER`, and `run(target, ctx) -> list[Finding]`; register it in
205
+ `recon/modules/__init__.py`; author English text with a stable `rule_id` and
206
+ add Turkish translations to `recon/i18n.py`; extract tool-output parsing into a
207
+ pure function and add fixture-based tests.
208
+
209
+ ### CI (GitHub Actions)
210
+
211
+ Reusable **composite action** for a one-step scan + SARIF upload:
212
+
213
+ ```yaml
214
+ - uses: m0Corut/recon-orchestrator@main
215
+ with:
216
+ target: https://staging.example.com
217
+ modules: "headers,cors,content,dns"
218
+ fail-on-new: "high"
219
+ lang: "en"
220
+ ```
221
+
222
+ `.github/workflows/scan.yml` is a weekly-scheduled + manually triggerable
223
+ example workflow using this action.
224
+
225
+ ### Helper commands
226
+
227
+ ```bash
228
+ python -m recon modules # list modules and descriptions
229
+ python -m recon doctor # check Docker/native tools and optional packages
230
+ python -m recon init # write a recon.yaml template
231
+ python -m recon diff a.json b.json # compare two reports
232
+ ```
233
+
234
+ ### Stability / versioning
235
+
236
+ From version 1.0, CLI flags and the `report.json` schema
237
+ ([docs/report.schema.json](docs/report.schema.json)) are stable; breaking
238
+ changes ship with a new major version and are noted in the CHANGELOG.
239
+
240
+ ### Development
241
+
242
+ ```bash
243
+ pip install -e ".[dev]"
244
+ ruff check recon/ tests/
245
+ mypy recon/
246
+ pytest -q
247
+ pre-commit install # optional
248
+ ```
249
+
250
+ Every push/PR runs lint + mypy + pytest on Python 3.9–3.13 via `ci.yml`. See
251
+ [CONTRIBUTING.md](CONTRIBUTING.md) for details.
252
+
253
+ ### License
254
+
255
+ Apache-2.0 — see [LICENSE](LICENSE).
256
+
257
+ ### Acknowledgements
258
+
259
+ [nmap](https://nmap.org), [nuclei](https://github.com/projectdiscovery/nuclei),
260
+ [testssl.sh](https://github.com/drwetter/testssl.sh). This project orchestrates
261
+ these tools; it does not replace them.
262
+
263
+ ---
264
+
265
+ ## Türkçe
266
+
267
+ Yetkili güvenlik testleri için hafif bir **araç orkestratörü**. Tek bir komutla
268
+ tanınmış açık kaynak güvenlik araçlarını (nmap, nuclei, testssl.sh) ve yerleşik
269
+ Python kontrollerini (güvenlik başlıkları, CORS, içerik keşfi, DNS/e-posta
270
+ güvenliği, giriş sonrası erişim kontrolü, OpenAPI kapsamı, mail/SMTP) bir
271
+ hedefe karşı çalıştırır; sonuçları tek biçimde toplayıp **Markdown + JSON +
272
+ SARIF + HTML** rapor üretir.
273
+
274
+ > Pahalı bir LLM'e bağımlılığı **yoktur**; tamamen ücretsiz araçlarla çalışır.
275
+ > İsteğe bağlı bir "analist" özet katmanı vardır, kesinlikle opt-in'dir.
276
+
277
+ ### ⚠️ Yasal uyarı
278
+
279
+ Bu araç hedefe **gerçek istekler gönderir**. Yalnızca **sahibi olduğunuz** veya
280
+ **yazılı izniniz olan** sistemlerde kullanın. Yetkisiz tarama çoğu ülkede suçtur.
281
+ Sorumluluk tamamen size aittir. Araç, bunu onaylamanız için `--authorized`
282
+ bayrağını zorunlu kılar.
283
+
284
+ ### Gereksinimler
285
+
286
+ - Python 3.9+
287
+ - `requests`, `pyyaml` (otomatik kurulur)
288
+ - `dns` ve `mail` modülleri için opsiyonel `[dns]` extra (`pip install ".[dns]"`)
289
+ - Docker — yalnızca `ports`, `tls`, `web` modülleri için (imajlar ilk
290
+ çalıştırmada otomatik çekilir). Docker yoksa bu modüller atlanır, Python
291
+ tabanlı modüller yine çalışır. Alternatif: `--runner native` veya araçları
292
+ native binary olarak içeren [Docker imajı](#docker-imajı-araçlar-dahil).
293
+
294
+ ### Örnek çıktı
295
+
296
+ ![recon-orchestrator demo](docs/demo.svg)
297
+
298
+ Rapor biçimi için bkz. [examples/sample-report.md](examples/sample-report.md).
299
+
300
+ ### Kurulum
301
+
302
+ ```bash
303
+ git clone https://github.com/m0Corut/recon-orchestrator
304
+ cd recon-orchestrator
305
+ pip install -r requirements.txt
306
+ # veya paket olarak (DNS/mail extra'sıyla):
307
+ pip install ".[dns]"
308
+ ```
309
+
310
+ ### Docker imajı (araçlar dahil)
311
+
312
+ nmap, nuclei ve testssl.sh'ı native binary olarak içeren tek imaj — yerel
313
+ kuruluma gerek yok:
314
+
315
+ ```bash
316
+ docker run --rm -v "$PWD:/work" ghcr.io/m0corut/recon-orchestrator \
317
+ https://ornek.com --authorized
318
+ ```
319
+
320
+ ### Kullanım
321
+
322
+ ```bash
323
+ # Tüm modüller (Docker gerektirenler dahil)
324
+ python -m recon https://ornek.com --authorized
325
+
326
+ # Sadece Docker'sız hızlı kontroller
327
+ python -m recon ornek.com -m headers,cors,content,dns --authorized
328
+
329
+ # Rate limit düşür (production'da nazik ol), kendi wordlist'in
330
+ python -m recon https://ornek.com --authorized --rate 10 --wordlist paths.txt
331
+
332
+ # CI için: high+ bulgu varsa çıkış kodu 2
333
+ python -m recon https://ornek.com --authorized --fail-on high
334
+
335
+ # Rapor dili (varsayılan İngilizce; Türkçe için):
336
+ python -m recon https://ornek.com --authorized --lang tr
337
+
338
+ # Kapsam: varsayılan sadece hedef host; ek host'lara izin ver:
339
+ python -m recon https://ornek.com --authorized --scope "api.ornek.com,*.cdn.ornek.com"
340
+
341
+ # CI'da sadece YENİ bulguda patlat (önceki çalıştırma otomatik baz alınır):
342
+ python -m recon https://ornek.com --authorized --fail-on-new high
343
+
344
+ # İki raporu doğrudan karşılaştır:
345
+ python -m recon diff ./onceki/report.json ./yeni/report.json
346
+
347
+ # YAML yapılandırma: örnek oluştur, düzenle, çalıştır:
348
+ python -m recon init
349
+ python -m recon --config recon.yaml --authorized
350
+
351
+ # Rapor biçimi, eşzamanlılık ve araç çalıştırıcı seçimi:
352
+ python -m recon https://ornek.com --authorized --format html,json --jobs 3 --runner native
353
+
354
+ # Giriş sonrası (salt-okunur) erişim kontrolü:
355
+ python -m recon https://ornek.com --authorized -m authz \
356
+ --auth-header-env SESSION_COOKIE --auth-page /account --auth-page /admin
357
+
358
+ # OpenAPI/Swagger şema-güdümlü endpoint kapsamı:
359
+ python -m recon https://api.ornek.com --authorized -m openapi --spec ./openapi.json
360
+
361
+ # Opsiyonel: yeni bulguda GitHub issue aç, LLM özeti al:
362
+ python -m recon https://ornek.com --authorized --fail-on-new high \
363
+ --github-issues benim/reponum --analyst anthropic
364
+ ```
365
+
366
+ **Paralellik:** Modüller varsayılan olarak paralel çalışır (en uzun süreyi alan
367
+ nuclei/testssl/nmap artık örtüşür). `--jobs N` ile eşzamanlılık sınırlanır,
368
+ `--serial` ile sıraya alınır. Aktif HTTP modülleri ortak bir hız bütçesini
369
+ (`--rate`, toplam istek/sn) paylaşır, böylece paralellik hedefi yormaz.
370
+
371
+ **Yapılandırma dosyası:** `recon init` ile oluşturduğun `recon.yaml`'da hedefler,
372
+ kapsam, modüller, dil, `fail_on`/`fail_on_new` ve modül ayarları (nuclei etiketleri,
373
+ port sayısı, wordlist vb.) tanımlanır. CLI bayrakları config'i ezer. `targets` birden
374
+ çok hedef içerebilir — hepsi sırayla taranır.
375
+
376
+ **Run diff:** Her çalıştırma, aynı host için en son önceki çalıştırmayı otomatik
377
+ baz alır ve yeni/çözülen bulguları raporlar (`--no-auto-baseline` ile kapatılır).
378
+ `--fail-on-new <önem>` yalnızca **yeni** bulgu bu seviyedeyse çıkış kodu 2 verir —
379
+ böylece CI, önceden var olan bir eksikte sürekli kırmızı olmaz.
380
+
381
+ **Kapsam güvenliği:** Araç varsayılan olarak yalnızca hedef host'a istek atar.
382
+ HTTP modülleri her isteği ve her yönlendirmeyi kapsam allowlist'ine karşı
383
+ kontrol eder, böylece bir yönlendirme probe'u 3. taraf bir host'a sıçrayamaz.
384
+ İç/özel adresler için `--allow-private` gerekir.
385
+
386
+ **Araç çalıştırıcı:** `--runner auto|docker|native`, dış araçların nasıl
387
+ çalışacağını seçer. `auto`, native kurulu binary'leri önceler, yoksa Docker'a
388
+ düşer.
389
+
390
+ Raporlar varsayılan olarak İngilizce üretilir; `--lang tr` ile Türkçe alınır.
391
+ Bulgu kimliği (`rule_id`) ve SARIF dilden bağımsızdır, sadece insan-okur metin
392
+ çevrilir.
393
+
394
+ Her çalıştırma `recon_runs/<host>_<zaman>/` altına `report.md`, `report.json`,
395
+ `findings.sarif`, `report.html` yazar.
396
+
397
+ ### Modüller
398
+
399
+ | Modül | Docker? | Ne yapar |
400
+ |-------|---------|----------|
401
+ | `headers` | Hayır | Güvenlik başlıkları + cookie bayrakları + teknoloji ifşası |
402
+ | `cors` | Hayır | Kötü Origin yansıması (CORS yanlış yapılandırması) |
403
+ | `content` | Hayır | Dizin/dosya keşfi (catch-all filtreli) |
404
+ | `dns` | Hayır (`[dns]` gerekir) | SPF / DMARC / DKIM / CAA / MX e-posta güvenliği |
405
+ | `ports` | Evet (nmap) | Açık port/servis + riskli servis uyarıları |
406
+ | `tls` | Evet (testssl) | Eski protokol / zayıf şifreleyici |
407
+ | `web` | Evet (nuclei) | Topluluk şablonlarıyla açık/teknoloji tespiti |
408
+ | `authz` | Hayır | Giriş sonrası, salt-okunur erişim kontrolü (opt-in, kimlik bilgisi gerekir) |
409
+ | `openapi` | Hayır | OpenAPI/Swagger şema-güdümlü endpoint kapsamı (salt-okunur) |
410
+ | `mail` | Hayır (`[dns]` gerekir) | SMTP STARTTLS / MTA-STS / TLS-RPT (kapsam korumalı) |
411
+
412
+ ### Mimari
413
+
414
+ ```
415
+ recon/
416
+ ├── cli.py # argparse + config birleştirme + rapor yazımı
417
+ ├── engine.py # run_scan(): modül zamanlama, paralellik, dedup
418
+ ├── context.py # ScanContext (modüllerle paylaşılan tipli ayarlar)
419
+ ├── scope.py # allowlist + scoped_get() (redirect-güvenli HTTP)
420
+ ├── ratelimit.py # ortak toplam hız sınırlayıcı
421
+ ├── runner.py # DockerRunner / NativeRunner soyutlaması
422
+ ├── diff.py # fingerprint tabanlı run-to-run diff
423
+ ├── config.py # YAML config yükleme/doğrulama
424
+ ├── findings.py # Finding / ScanResult, rule_id + fingerprint
425
+ ├── i18n.py # EN/TR mesaj kataloğu
426
+ ├── report.py / report_html.py # Markdown / JSON / SARIF / HTML üreticiler
427
+ ├── analyst/ # opsiyonel LLM özeti (opt-in, SDK'sız)
428
+ ├── integrations/github.py # opsiyonel GitHub issue oluşturma
429
+ └── modules/ # her biri NAME, NEEDS_DOCKER, run(target, ctx) verir
430
+ ```
431
+
432
+ Yeni modül eklemek: `recon/modules/<ad>.py` oluştur (`NAME`, `NEEDS_DOCKER`,
433
+ `run(target, ctx) -> list[Finding]`), `recon/modules/__init__.py`'ye kaydet,
434
+ metni İngilizce yaz ve kararlı bir `rule_id` ver, Türkçe çevirisini
435
+ `recon/i18n.py`'ye ekle; araç çıktısı ayrıştırmasını saf fonksiyona çıkar ve
436
+ fixture tabanlı test ekle.
437
+
438
+ ### CI (GitHub Actions)
439
+
440
+ Yeniden kullanılabilir **composite action** ile tek adımda tarama + SARIF upload:
441
+
442
+ ```yaml
443
+ - uses: m0Corut/recon-orchestrator@main
444
+ with:
445
+ target: https://staging.ornek.com
446
+ modules: "headers,cors,content,dns"
447
+ fail-on-new: "high"
448
+ lang: "en"
449
+ ```
450
+
451
+ `.github/workflows/scan.yml` haftalık zamanlı + elle tetiklenebilir örnek bir
452
+ workflow'dur (bu action'ı kullanır).
453
+
454
+ ### Yardımcı komutlar
455
+
456
+ ```bash
457
+ python -m recon modules # modülleri ve açıklamalarını listeler
458
+ python -m recon doctor # Docker/native araç ve opsiyonel paket kontrolü
459
+ python -m recon init # örnek recon.yaml yazar
460
+ python -m recon diff a.json b.json # iki raporu karşılaştırır
461
+ ```
462
+
463
+ ### Kararlılık / sürümleme
464
+
465
+ Sürüm 1.0'dan itibaren CLI bayrakları ve `report.json` şeması
466
+ ([docs/report.schema.json](docs/report.schema.json)) kararlıdır; kırıcı
467
+ değişiklikler yeni bir ana sürümle gelir ve CHANGELOG'da belirtilir.
468
+
469
+ ### Geliştirme
470
+
471
+ ```bash
472
+ pip install -e ".[dev]"
473
+ ruff check recon/ tests/
474
+ mypy recon/
475
+ pytest -q
476
+ pre-commit install # opsiyonel
477
+ ```
478
+
479
+ Her push/PR `ci.yml` ile lint + mypy + pytest'i (Python 3.9–3.13) çalıştırır.
480
+ Ayrıntılar için [CONTRIBUTING.md](CONTRIBUTING.md).
481
+
482
+ ### Lisans
483
+
484
+ Apache-2.0 — bkz. [LICENSE](LICENSE).
485
+
486
+ ### Teşekkür
487
+
488
+ [nmap](https://nmap.org), [nuclei](https://github.com/projectdiscovery/nuclei),
489
+ [testssl.sh](https://github.com/drwetter/testssl.sh) ekiplerine. Bu proje bu
490
+ araçları yönetir, yerlerine geçmez.