jscope 0.4.3__tar.gz → 0.6.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 (114) hide show
  1. {jscope-0.4.3 → jscope-0.6.0}/PKG-INFO +46 -16
  2. {jscope-0.4.3 → jscope-0.6.0}/README.md +42 -12
  3. jscope-0.6.0/jscope/__init__.py +1 -0
  4. {jscope-0.4.3 → jscope-0.6.0}/jscope/cli.py +266 -89
  5. jscope-0.6.0/jscope/investigate.py +238 -0
  6. jscope-0.6.0/jscope/session.py +129 -0
  7. jscope-0.6.0/jscope/shell.py +138 -0
  8. {jscope-0.4.3 → jscope-0.6.0}/jscope/terminal.py +26 -4
  9. {jscope-0.4.3 → jscope-0.6.0}/jscope.egg-info/PKG-INFO +46 -16
  10. {jscope-0.4.3 → jscope-0.6.0}/jscope.egg-info/SOURCES.txt +5 -0
  11. {jscope-0.4.3 → jscope-0.6.0}/pyproject.toml +3 -3
  12. {jscope-0.4.3 → jscope-0.6.0}/tests/test_cli_entry.py +20 -2
  13. jscope-0.6.0/tests/test_investigation_ux.py +317 -0
  14. jscope-0.4.3/jscope/__init__.py +0 -1
  15. {jscope-0.4.3 → jscope-0.6.0}/LICENSE +0 -0
  16. {jscope-0.4.3 → jscope-0.6.0}/jscope/__main__.py +0 -0
  17. {jscope-0.4.3 → jscope-0.6.0}/jscope/ai/__init__.py +0 -0
  18. {jscope-0.4.3 → jscope-0.6.0}/jscope/ai/explain.py +0 -0
  19. {jscope-0.4.3 → jscope-0.6.0}/jscope/ai/providers.py +0 -0
  20. {jscope-0.4.3 → jscope-0.6.0}/jscope/analyzers/__init__.py +0 -0
  21. {jscope-0.4.3 → jscope-0.6.0}/jscope/analyzers/auth_analyzer.py +0 -0
  22. {jscope-0.4.3 → jscope-0.6.0}/jscope/analyzers/authorization_analyzer.py +0 -0
  23. {jscope-0.4.3 → jscope-0.6.0}/jscope/analyzers/base.py +0 -0
  24. {jscope-0.4.3 → jscope-0.6.0}/jscope/analyzers/common.py +0 -0
  25. {jscope-0.4.3 → jscope-0.6.0}/jscope/analyzers/dataflow_analyzer.py +0 -0
  26. {jscope-0.4.3 → jscope-0.6.0}/jscope/analyzers/endpoint_analyzer.py +0 -0
  27. {jscope-0.4.3 → jscope-0.6.0}/jscope/analyzers/framework_detector.py +0 -0
  28. {jscope-0.4.3 → jscope-0.6.0}/jscope/analyzers/graphql_analyzer.py +0 -0
  29. {jscope-0.4.3 → jscope-0.6.0}/jscope/analyzers/graphql_schema_analyzer.py +0 -0
  30. {jscope-0.4.3 → jscope-0.6.0}/jscope/analyzers/html_analyzer.py +0 -0
  31. {jscope-0.4.3 → jscope-0.6.0}/jscope/analyzers/manager.py +0 -0
  32. {jscope-0.4.3 → jscope-0.6.0}/jscope/analyzers/openapi_analyzer.py +0 -0
  33. {jscope-0.4.3 → jscope-0.6.0}/jscope/analyzers/router_analyzer.py +0 -0
  34. {jscope-0.4.3 → jscope-0.6.0}/jscope/analyzers/secret_analyzer.py +0 -0
  35. {jscope-0.4.3 → jscope-0.6.0}/jscope/analyzers/service_worker_analyzer.py +0 -0
  36. {jscope-0.4.3 → jscope-0.6.0}/jscope/analyzers/source_map_analyzer.py +0 -0
  37. {jscope-0.4.3 → jscope-0.6.0}/jscope/analyzers/storage_analyzer.py +0 -0
  38. {jscope-0.4.3 → jscope-0.6.0}/jscope/analyzers/wasm_analyzer.py +0 -0
  39. {jscope-0.4.3 → jscope-0.6.0}/jscope/assessment_engine.py +0 -0
  40. {jscope-0.4.3 → jscope-0.6.0}/jscope/assessment_reporting.py +0 -0
  41. {jscope-0.4.3 → jscope-0.6.0}/jscope/benchmark/__init__.py +0 -0
  42. {jscope-0.4.3 → jscope-0.6.0}/jscope/benchmark/fixtures.py +0 -0
  43. {jscope-0.4.3 → jscope-0.6.0}/jscope/benchmark/runner.py +0 -0
  44. {jscope-0.4.3 → jscope-0.6.0}/jscope/config.py +0 -0
  45. {jscope-0.4.3 → jscope-0.6.0}/jscope/core/__init__.py +0 -0
  46. {jscope-0.4.3 → jscope-0.6.0}/jscope/core/artifacts.py +0 -0
  47. {jscope-0.4.3 → jscope-0.6.0}/jscope/core/cache.py +0 -0
  48. {jscope-0.4.3 → jscope-0.6.0}/jscope/core/classification.py +0 -0
  49. {jscope-0.4.3 → jscope-0.6.0}/jscope/core/evidence.py +0 -0
  50. {jscope-0.4.3 → jscope-0.6.0}/jscope/core/graph.py +0 -0
  51. {jscope-0.4.3 → jscope-0.6.0}/jscope/core/redact.py +0 -0
  52. {jscope-0.4.3 → jscope-0.6.0}/jscope/crawler/__init__.py +0 -0
  53. {jscope-0.4.3 → jscope-0.6.0}/jscope/crawler/crawler.py +0 -0
  54. {jscope-0.4.3 → jscope-0.6.0}/jscope/dataflow/__init__.py +0 -0
  55. {jscope-0.4.3 → jscope-0.6.0}/jscope/dataflow/engine.py +0 -0
  56. {jscope-0.4.3 → jscope-0.6.0}/jscope/dataflow/modules.py +0 -0
  57. {jscope-0.4.3 → jscope-0.6.0}/jscope/dataflow/rules.py +0 -0
  58. {jscope-0.4.3 → jscope-0.6.0}/jscope/downloader/__init__.py +0 -0
  59. {jscope-0.4.3 → jscope-0.6.0}/jscope/downloader/downloader.py +0 -0
  60. {jscope-0.4.3 → jscope-0.6.0}/jscope/parsing/__init__.py +0 -0
  61. {jscope-0.4.3 → jscope-0.6.0}/jscope/parsing/ast_engine.py +0 -0
  62. {jscope-0.4.3 → jscope-0.6.0}/jscope/parsing/graphql_schema.py +0 -0
  63. {jscope-0.4.3 → jscope-0.6.0}/jscope/parsing/html.py +0 -0
  64. {jscope-0.4.3 → jscope-0.6.0}/jscope/parsing/queries.py +0 -0
  65. {jscope-0.4.3 → jscope-0.6.0}/jscope/parsing/wasm.py +0 -0
  66. {jscope-0.4.3 → jscope-0.6.0}/jscope/passive_discovery.py +0 -0
  67. {jscope-0.4.3 → jscope-0.6.0}/jscope/pipeline.py +0 -0
  68. {jscope-0.4.3 → jscope-0.6.0}/jscope/plugin/__init__.py +0 -0
  69. {jscope-0.4.3 → jscope-0.6.0}/jscope/plugin/_worker.py +0 -0
  70. {jscope-0.4.3 → jscope-0.6.0}/jscope/plugin/loader.py +0 -0
  71. {jscope-0.4.3 → jscope-0.6.0}/jscope/plugin/sandbox.py +0 -0
  72. {jscope-0.4.3 → jscope-0.6.0}/jscope/reporting/__init__.py +0 -0
  73. {jscope-0.4.3 → jscope-0.6.0}/jscope/reporting/formats.py +0 -0
  74. {jscope-0.4.3 → jscope-0.6.0}/jscope/reporting/human.py +0 -0
  75. {jscope-0.4.3 → jscope-0.6.0}/jscope/reporting/json_report.py +0 -0
  76. {jscope-0.4.3 → jscope-0.6.0}/jscope/reporting/priority.py +0 -0
  77. {jscope-0.4.3 → jscope-0.6.0}/jscope/runtime/__init__.py +0 -0
  78. {jscope-0.4.3 → jscope-0.6.0}/jscope/runtime/observe.py +0 -0
  79. {jscope-0.4.3 → jscope-0.6.0}/jscope/runtime/prober.py +0 -0
  80. {jscope-0.4.3 → jscope-0.6.0}/jscope/runtime/scope.py +0 -0
  81. {jscope-0.4.3 → jscope-0.6.0}/jscope/security_transport.py +0 -0
  82. {jscope-0.4.3 → jscope-0.6.0}/jscope/verify/__init__.py +0 -0
  83. {jscope-0.4.3 → jscope-0.6.0}/jscope/verify/engine.py +0 -0
  84. {jscope-0.4.3 → jscope-0.6.0}/jscope/workspace/__init__.py +0 -0
  85. {jscope-0.4.3 → jscope-0.6.0}/jscope/workspace/assessment.py +0 -0
  86. {jscope-0.4.3 → jscope-0.6.0}/jscope/workspace/common.py +0 -0
  87. {jscope-0.4.3 → jscope-0.6.0}/jscope/workspace/diff.py +0 -0
  88. {jscope-0.4.3 → jscope-0.6.0}/jscope/workspace/store.py +0 -0
  89. {jscope-0.4.3 → jscope-0.6.0}/jscope.egg-info/dependency_links.txt +0 -0
  90. {jscope-0.4.3 → jscope-0.6.0}/jscope.egg-info/entry_points.txt +0 -0
  91. {jscope-0.4.3 → jscope-0.6.0}/jscope.egg-info/requires.txt +0 -0
  92. {jscope-0.4.3 → jscope-0.6.0}/jscope.egg-info/top_level.txt +0 -0
  93. {jscope-0.4.3 → jscope-0.6.0}/setup.cfg +0 -0
  94. {jscope-0.4.3 → jscope-0.6.0}/tests/test_analyzers.py +0 -0
  95. {jscope-0.4.3 → jscope-0.6.0}/tests/test_assessment_scope.py +0 -0
  96. {jscope-0.4.3 → jscope-0.6.0}/tests/test_ast_engine.py +0 -0
  97. {jscope-0.4.3 → jscope-0.6.0}/tests/test_benchmark.py +0 -0
  98. {jscope-0.4.3 → jscope-0.6.0}/tests/test_dataflow.py +0 -0
  99. {jscope-0.4.3 → jscope-0.6.0}/tests/test_engine_hardening_and_plugins.py +0 -0
  100. {jscope-0.4.3 → jscope-0.6.0}/tests/test_evidence_engine.py +0 -0
  101. {jscope-0.4.3 → jscope-0.6.0}/tests/test_graph_correlation.py +0 -0
  102. {jscope-0.4.3 → jscope-0.6.0}/tests/test_incremental.py +0 -0
  103. {jscope-0.4.3 → jscope-0.6.0}/tests/test_live_local.py +0 -0
  104. {jscope-0.4.3 → jscope-0.6.0}/tests/test_observe.py +0 -0
  105. {jscope-0.4.3 → jscope-0.6.0}/tests/test_path_independence.py +0 -0
  106. {jscope-0.4.3 → jscope-0.6.0}/tests/test_phase2_analyzers.py +0 -0
  107. {jscope-0.4.3 → jscope-0.6.0}/tests/test_phase2_scope_transport.py +0 -0
  108. {jscope-0.4.3 → jscope-0.6.0}/tests/test_phase3.py +0 -0
  109. {jscope-0.4.3 → jscope-0.6.0}/tests/test_phase4.py +0 -0
  110. {jscope-0.4.3 → jscope-0.6.0}/tests/test_phases345_hardening.py +0 -0
  111. {jscope-0.4.3 → jscope-0.6.0}/tests/test_plugin_isolation.py +0 -0
  112. {jscope-0.4.3 → jscope-0.6.0}/tests/test_router.py +0 -0
  113. {jscope-0.4.3 → jscope-0.6.0}/tests/test_scope.py +0 -0
  114. {jscope-0.4.3 → jscope-0.6.0}/tests/test_verify.py +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jscope
3
- Version: 0.4.3
3
+ Version: 0.6.0
4
4
  Summary: Evidence-based JavaScript intelligence for bug bounty hunters and web app pentesters
5
5
  Author: Muhammed Ali
6
6
  License-Expression: MIT
7
- Project-URL: Homepage, https://github.com/Lime27-Star/JScope
8
- Project-URL: Issues, https://github.com/Lime27-Star/JScope/issues
9
- Project-URL: Changelog, https://github.com/Lime27-Star/JScope/blob/main/CHANGELOG.md
7
+ Project-URL: Homepage, https://github.com/LIME1Star/Jscope
8
+ Project-URL: Issues, https://github.com/LIME1Star/Jscope/issues
9
+ Project-URL: Changelog, https://github.com/LIME1Star/Jscope/blob/main/CHANGELOG.md
10
10
  Keywords: security,bug-bounty,pentest,javascript,static-analysis,appsec,recon
11
11
  Classifier: Development Status :: 4 - Beta
12
12
  Classifier: Environment :: Console
@@ -50,7 +50,7 @@ Dynamic: license-file
50
50
  </p>
51
51
 
52
52
  <p align="center">
53
- <a href="https://github.com/Lime27-Star/JScope/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/Lime27-Star/JScope/actions/workflows/ci.yml/badge.svg"></a>
53
+ <a href="https://github.com/LIME1Star/Jscope/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/LIME1Star/Jscope/actions/workflows/ci.yml/badge.svg"></a>
54
54
  <img alt="Python 3.10+" src="https://img.shields.io/badge/python-3.10%2B-blue">
55
55
  <img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-green">
56
56
  </p>
@@ -94,22 +94,52 @@ Try it yourself on the bundled fixture (`tests/sample_react`).
94
94
  ## Install
95
95
 
96
96
  ```bash
97
- pip install git+https://github.com/Lime27-Star/JScope.git
98
- jscope doctor # checks your install
97
+ python -m pip install --upgrade jscope
98
+ jscope https://app.example.com # or ./path/to/project: analyze, remember, and tell you what to do next
99
99
  ```
100
100
 
101
- Python 3.10+. For YAML OpenAPI specs: `pip install "jscope[yaml] @ git+https://github.com/Lime27-Star/JScope.git"`.
101
+ Python 3.10+. YAML OpenAPI specs: `pip install "jscope[yaml]"`. Development: `pip install -e ".[dev]"`; see [docs/RELEASING.md](docs/RELEASING.md).
102
102
 
103
- ## Quick start
103
+ ## One investigation, no re-typing
104
104
 
105
- ```bash
106
- jscope analyze ./path/to/js-project --verbose # ranking, route map, evidence appendix
107
- jscope explain JS-0004 --findings-file f.json # full evidence chain for one finding
108
- jscope graph ./project # route -> component -> API -> guard map
109
- jscope https://app.example.com # crawl + download + analyze (authorized targets only)
110
- jscope report f.json --format html -o report.html # re-render: human | json | markdown | html | sarif
105
+ JScope remembers the current target, its scope host, and the latest findings in `.jscope/session.json`. After the first
106
+ command you stop passing paths, files and URLs:
107
+
108
+ ```text
109
+ $ jscope https://app.example.com
110
+ target : https://app.example.com
111
+ host : app.example.com (resolves to 93.184.216.34)
112
+ 12 finding(s): CONFIRMED=1, HIGH=3, MEDIUM=5, LOW=3
113
+ next: jscope findings | jscope show 1 | jscope graph | jscope report --format html
114
+
115
+ $ jscope findings --min-confidence HIGH
116
+ # PRI CONFIDENCE STATE CATEGORY SUBJECT
117
+ 1 68 CONFIRMED static endpoint /api/admin/reports/export
118
+ 2 58 HIGH static endpoint /api/admin/users
119
+
120
+ $ jscope show 1 # rank, id (JS-0004) or unique text all work
121
+ $ jscope show 1 --source # + source lines around each evidence location
122
+ $ jscope graph --unprotected # routes with no guard
123
+ $ jscope confirm --dry-run # request plan, nothing sent (in the shell: plan, then one question)
124
+ $ jscope verify --finding-id 1 --authorize-active-tests
125
+ $ jscope status # target, scope, evidence state
111
126
  ```
112
127
 
128
+ `jscope` with no arguments in a terminal opens a shell over the same commands: type a URL or path to start, a number to
129
+ open that finding, or any command. The shell asks one kind of question only: before runtime traffic.
130
+
131
+ **What stays explicit.** Scope is the target's own host and nothing else (an explicit `--base-url` still requires
132
+ `--allow-host`). Active requests require `--authorize-active-tests` (the shell asks instead). Loopback/private
133
+ destinations need `--allow-private`. Non-interactive remote runs need `-y`. Runtime results are written back to the
134
+ findings file; the static original is kept once as `findings.static.json`. `STATE` separates static observations from
135
+ probable/confirmed behavior.
136
+
137
+ **Scripting.** Every command also works without a session, with explicit files (`jscope show JS-0004 --findings-file f.json`).
138
+ `--json` is available on `status`, `findings` and `show`. Exit codes: 0 ok, 1 error, 2 not found / ambiguous / partial,
139
+ 3 workspace regression. 0.5 commands, flags and output files are unchanged. Details: [docs/REDESIGN_0.6.md](docs/REDESIGN_0.6.md).
140
+
141
+ Other direct commands: `jscope analyze`, `report`, `ws-scan --fail-on-regression` (CI baseline diffing), `observe`, `ai`.
142
+
113
143
  Remote commands (`go`, `scan`, `crawl`, `download`) are bound to the target host, rate-limited, and **refuse loopback/private
114
144
  addresses by default**. For controlled local testing pass `--allow-private`.
115
145
 
@@ -165,7 +195,7 @@ JScope is a **beta development tool, not a production scanner.** Be aware of the
165
195
  ## Development
166
196
 
167
197
  ```bash
168
- git clone https://github.com/Lime27-Star/JScope && cd JScope
198
+ git clone https://github.com/LIME1Star/Jscope && cd JScope
169
199
  python -m venv .venv && . .venv/bin/activate
170
200
  pip install -e ".[dev]"
171
201
  pytest
@@ -11,7 +11,7 @@
11
11
  </p>
12
12
 
13
13
  <p align="center">
14
- <a href="https://github.com/Lime27-Star/JScope/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/Lime27-Star/JScope/actions/workflows/ci.yml/badge.svg"></a>
14
+ <a href="https://github.com/LIME1Star/Jscope/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/LIME1Star/Jscope/actions/workflows/ci.yml/badge.svg"></a>
15
15
  <img alt="Python 3.10+" src="https://img.shields.io/badge/python-3.10%2B-blue">
16
16
  <img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-green">
17
17
  </p>
@@ -55,22 +55,52 @@ Try it yourself on the bundled fixture (`tests/sample_react`).
55
55
  ## Install
56
56
 
57
57
  ```bash
58
- pip install git+https://github.com/Lime27-Star/JScope.git
59
- jscope doctor # checks your install
58
+ python -m pip install --upgrade jscope
59
+ jscope https://app.example.com # or ./path/to/project: analyze, remember, and tell you what to do next
60
60
  ```
61
61
 
62
- Python 3.10+. For YAML OpenAPI specs: `pip install "jscope[yaml] @ git+https://github.com/Lime27-Star/JScope.git"`.
62
+ Python 3.10+. YAML OpenAPI specs: `pip install "jscope[yaml]"`. Development: `pip install -e ".[dev]"`; see [docs/RELEASING.md](docs/RELEASING.md).
63
63
 
64
- ## Quick start
64
+ ## One investigation, no re-typing
65
65
 
66
- ```bash
67
- jscope analyze ./path/to/js-project --verbose # ranking, route map, evidence appendix
68
- jscope explain JS-0004 --findings-file f.json # full evidence chain for one finding
69
- jscope graph ./project # route -> component -> API -> guard map
70
- jscope https://app.example.com # crawl + download + analyze (authorized targets only)
71
- jscope report f.json --format html -o report.html # re-render: human | json | markdown | html | sarif
66
+ JScope remembers the current target, its scope host, and the latest findings in `.jscope/session.json`. After the first
67
+ command you stop passing paths, files and URLs:
68
+
69
+ ```text
70
+ $ jscope https://app.example.com
71
+ target : https://app.example.com
72
+ host : app.example.com (resolves to 93.184.216.34)
73
+ 12 finding(s): CONFIRMED=1, HIGH=3, MEDIUM=5, LOW=3
74
+ next: jscope findings | jscope show 1 | jscope graph | jscope report --format html
75
+
76
+ $ jscope findings --min-confidence HIGH
77
+ # PRI CONFIDENCE STATE CATEGORY SUBJECT
78
+ 1 68 CONFIRMED static endpoint /api/admin/reports/export
79
+ 2 58 HIGH static endpoint /api/admin/users
80
+
81
+ $ jscope show 1 # rank, id (JS-0004) or unique text all work
82
+ $ jscope show 1 --source # + source lines around each evidence location
83
+ $ jscope graph --unprotected # routes with no guard
84
+ $ jscope confirm --dry-run # request plan, nothing sent (in the shell: plan, then one question)
85
+ $ jscope verify --finding-id 1 --authorize-active-tests
86
+ $ jscope status # target, scope, evidence state
72
87
  ```
73
88
 
89
+ `jscope` with no arguments in a terminal opens a shell over the same commands: type a URL or path to start, a number to
90
+ open that finding, or any command. The shell asks one kind of question only: before runtime traffic.
91
+
92
+ **What stays explicit.** Scope is the target's own host and nothing else (an explicit `--base-url` still requires
93
+ `--allow-host`). Active requests require `--authorize-active-tests` (the shell asks instead). Loopback/private
94
+ destinations need `--allow-private`. Non-interactive remote runs need `-y`. Runtime results are written back to the
95
+ findings file; the static original is kept once as `findings.static.json`. `STATE` separates static observations from
96
+ probable/confirmed behavior.
97
+
98
+ **Scripting.** Every command also works without a session, with explicit files (`jscope show JS-0004 --findings-file f.json`).
99
+ `--json` is available on `status`, `findings` and `show`. Exit codes: 0 ok, 1 error, 2 not found / ambiguous / partial,
100
+ 3 workspace regression. 0.5 commands, flags and output files are unchanged. Details: [docs/REDESIGN_0.6.md](docs/REDESIGN_0.6.md).
101
+
102
+ Other direct commands: `jscope analyze`, `report`, `ws-scan --fail-on-regression` (CI baseline diffing), `observe`, `ai`.
103
+
74
104
  Remote commands (`go`, `scan`, `crawl`, `download`) are bound to the target host, rate-limited, and **refuse loopback/private
75
105
  addresses by default**. For controlled local testing pass `--allow-private`.
76
106
 
@@ -126,7 +156,7 @@ JScope is a **beta development tool, not a production scanner.** Be aware of the
126
156
  ## Development
127
157
 
128
158
  ```bash
129
- git clone https://github.com/Lime27-Star/JScope && cd JScope
159
+ git clone https://github.com/LIME1Star/Jscope && cd JScope
130
160
  python -m venv .venv && . .venv/bin/activate
131
161
  pip install -e ".[dev]"
132
162
  pytest
@@ -0,0 +1 @@
1
+ __version__ = "0.6.0"