jscope 0.5.0__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 (115) hide show
  1. {jscope-0.5.0 → jscope-0.6.0}/PKG-INFO +38 -17
  2. {jscope-0.5.0 → jscope-0.6.0}/README.md +37 -16
  3. jscope-0.6.0/jscope/__init__.py +1 -0
  4. {jscope-0.5.0 → jscope-0.6.0}/jscope/cli.py +255 -85
  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.5.0 → jscope-0.6.0}/jscope.egg-info/PKG-INFO +38 -17
  9. {jscope-0.5.0 → jscope-0.6.0}/jscope.egg-info/SOURCES.txt +4 -1
  10. {jscope-0.5.0 → jscope-0.6.0}/tests/test_cli_entry.py +5 -7
  11. jscope-0.6.0/tests/test_investigation_ux.py +317 -0
  12. jscope-0.5.0/jscope/__init__.py +0 -1
  13. jscope-0.5.0/jscope/wizard.py +0 -107
  14. {jscope-0.5.0 → jscope-0.6.0}/LICENSE +0 -0
  15. {jscope-0.5.0 → jscope-0.6.0}/jscope/__main__.py +0 -0
  16. {jscope-0.5.0 → jscope-0.6.0}/jscope/ai/__init__.py +0 -0
  17. {jscope-0.5.0 → jscope-0.6.0}/jscope/ai/explain.py +0 -0
  18. {jscope-0.5.0 → jscope-0.6.0}/jscope/ai/providers.py +0 -0
  19. {jscope-0.5.0 → jscope-0.6.0}/jscope/analyzers/__init__.py +0 -0
  20. {jscope-0.5.0 → jscope-0.6.0}/jscope/analyzers/auth_analyzer.py +0 -0
  21. {jscope-0.5.0 → jscope-0.6.0}/jscope/analyzers/authorization_analyzer.py +0 -0
  22. {jscope-0.5.0 → jscope-0.6.0}/jscope/analyzers/base.py +0 -0
  23. {jscope-0.5.0 → jscope-0.6.0}/jscope/analyzers/common.py +0 -0
  24. {jscope-0.5.0 → jscope-0.6.0}/jscope/analyzers/dataflow_analyzer.py +0 -0
  25. {jscope-0.5.0 → jscope-0.6.0}/jscope/analyzers/endpoint_analyzer.py +0 -0
  26. {jscope-0.5.0 → jscope-0.6.0}/jscope/analyzers/framework_detector.py +0 -0
  27. {jscope-0.5.0 → jscope-0.6.0}/jscope/analyzers/graphql_analyzer.py +0 -0
  28. {jscope-0.5.0 → jscope-0.6.0}/jscope/analyzers/graphql_schema_analyzer.py +0 -0
  29. {jscope-0.5.0 → jscope-0.6.0}/jscope/analyzers/html_analyzer.py +0 -0
  30. {jscope-0.5.0 → jscope-0.6.0}/jscope/analyzers/manager.py +0 -0
  31. {jscope-0.5.0 → jscope-0.6.0}/jscope/analyzers/openapi_analyzer.py +0 -0
  32. {jscope-0.5.0 → jscope-0.6.0}/jscope/analyzers/router_analyzer.py +0 -0
  33. {jscope-0.5.0 → jscope-0.6.0}/jscope/analyzers/secret_analyzer.py +0 -0
  34. {jscope-0.5.0 → jscope-0.6.0}/jscope/analyzers/service_worker_analyzer.py +0 -0
  35. {jscope-0.5.0 → jscope-0.6.0}/jscope/analyzers/source_map_analyzer.py +0 -0
  36. {jscope-0.5.0 → jscope-0.6.0}/jscope/analyzers/storage_analyzer.py +0 -0
  37. {jscope-0.5.0 → jscope-0.6.0}/jscope/analyzers/wasm_analyzer.py +0 -0
  38. {jscope-0.5.0 → jscope-0.6.0}/jscope/assessment_engine.py +0 -0
  39. {jscope-0.5.0 → jscope-0.6.0}/jscope/assessment_reporting.py +0 -0
  40. {jscope-0.5.0 → jscope-0.6.0}/jscope/benchmark/__init__.py +0 -0
  41. {jscope-0.5.0 → jscope-0.6.0}/jscope/benchmark/fixtures.py +0 -0
  42. {jscope-0.5.0 → jscope-0.6.0}/jscope/benchmark/runner.py +0 -0
  43. {jscope-0.5.0 → jscope-0.6.0}/jscope/config.py +0 -0
  44. {jscope-0.5.0 → jscope-0.6.0}/jscope/core/__init__.py +0 -0
  45. {jscope-0.5.0 → jscope-0.6.0}/jscope/core/artifacts.py +0 -0
  46. {jscope-0.5.0 → jscope-0.6.0}/jscope/core/cache.py +0 -0
  47. {jscope-0.5.0 → jscope-0.6.0}/jscope/core/classification.py +0 -0
  48. {jscope-0.5.0 → jscope-0.6.0}/jscope/core/evidence.py +0 -0
  49. {jscope-0.5.0 → jscope-0.6.0}/jscope/core/graph.py +0 -0
  50. {jscope-0.5.0 → jscope-0.6.0}/jscope/core/redact.py +0 -0
  51. {jscope-0.5.0 → jscope-0.6.0}/jscope/crawler/__init__.py +0 -0
  52. {jscope-0.5.0 → jscope-0.6.0}/jscope/crawler/crawler.py +0 -0
  53. {jscope-0.5.0 → jscope-0.6.0}/jscope/dataflow/__init__.py +0 -0
  54. {jscope-0.5.0 → jscope-0.6.0}/jscope/dataflow/engine.py +0 -0
  55. {jscope-0.5.0 → jscope-0.6.0}/jscope/dataflow/modules.py +0 -0
  56. {jscope-0.5.0 → jscope-0.6.0}/jscope/dataflow/rules.py +0 -0
  57. {jscope-0.5.0 → jscope-0.6.0}/jscope/downloader/__init__.py +0 -0
  58. {jscope-0.5.0 → jscope-0.6.0}/jscope/downloader/downloader.py +0 -0
  59. {jscope-0.5.0 → jscope-0.6.0}/jscope/parsing/__init__.py +0 -0
  60. {jscope-0.5.0 → jscope-0.6.0}/jscope/parsing/ast_engine.py +0 -0
  61. {jscope-0.5.0 → jscope-0.6.0}/jscope/parsing/graphql_schema.py +0 -0
  62. {jscope-0.5.0 → jscope-0.6.0}/jscope/parsing/html.py +0 -0
  63. {jscope-0.5.0 → jscope-0.6.0}/jscope/parsing/queries.py +0 -0
  64. {jscope-0.5.0 → jscope-0.6.0}/jscope/parsing/wasm.py +0 -0
  65. {jscope-0.5.0 → jscope-0.6.0}/jscope/passive_discovery.py +0 -0
  66. {jscope-0.5.0 → jscope-0.6.0}/jscope/pipeline.py +0 -0
  67. {jscope-0.5.0 → jscope-0.6.0}/jscope/plugin/__init__.py +0 -0
  68. {jscope-0.5.0 → jscope-0.6.0}/jscope/plugin/_worker.py +0 -0
  69. {jscope-0.5.0 → jscope-0.6.0}/jscope/plugin/loader.py +0 -0
  70. {jscope-0.5.0 → jscope-0.6.0}/jscope/plugin/sandbox.py +0 -0
  71. {jscope-0.5.0 → jscope-0.6.0}/jscope/reporting/__init__.py +0 -0
  72. {jscope-0.5.0 → jscope-0.6.0}/jscope/reporting/formats.py +0 -0
  73. {jscope-0.5.0 → jscope-0.6.0}/jscope/reporting/human.py +0 -0
  74. {jscope-0.5.0 → jscope-0.6.0}/jscope/reporting/json_report.py +0 -0
  75. {jscope-0.5.0 → jscope-0.6.0}/jscope/reporting/priority.py +0 -0
  76. {jscope-0.5.0 → jscope-0.6.0}/jscope/runtime/__init__.py +0 -0
  77. {jscope-0.5.0 → jscope-0.6.0}/jscope/runtime/observe.py +0 -0
  78. {jscope-0.5.0 → jscope-0.6.0}/jscope/runtime/prober.py +0 -0
  79. {jscope-0.5.0 → jscope-0.6.0}/jscope/runtime/scope.py +0 -0
  80. {jscope-0.5.0 → jscope-0.6.0}/jscope/security_transport.py +0 -0
  81. {jscope-0.5.0 → jscope-0.6.0}/jscope/terminal.py +0 -0
  82. {jscope-0.5.0 → jscope-0.6.0}/jscope/verify/__init__.py +0 -0
  83. {jscope-0.5.0 → jscope-0.6.0}/jscope/verify/engine.py +0 -0
  84. {jscope-0.5.0 → jscope-0.6.0}/jscope/workspace/__init__.py +0 -0
  85. {jscope-0.5.0 → jscope-0.6.0}/jscope/workspace/assessment.py +0 -0
  86. {jscope-0.5.0 → jscope-0.6.0}/jscope/workspace/common.py +0 -0
  87. {jscope-0.5.0 → jscope-0.6.0}/jscope/workspace/diff.py +0 -0
  88. {jscope-0.5.0 → jscope-0.6.0}/jscope/workspace/store.py +0 -0
  89. {jscope-0.5.0 → jscope-0.6.0}/jscope.egg-info/dependency_links.txt +0 -0
  90. {jscope-0.5.0 → jscope-0.6.0}/jscope.egg-info/entry_points.txt +0 -0
  91. {jscope-0.5.0 → jscope-0.6.0}/jscope.egg-info/requires.txt +0 -0
  92. {jscope-0.5.0 → jscope-0.6.0}/jscope.egg-info/top_level.txt +0 -0
  93. {jscope-0.5.0 → jscope-0.6.0}/pyproject.toml +0 -0
  94. {jscope-0.5.0 → jscope-0.6.0}/setup.cfg +0 -0
  95. {jscope-0.5.0 → jscope-0.6.0}/tests/test_analyzers.py +0 -0
  96. {jscope-0.5.0 → jscope-0.6.0}/tests/test_assessment_scope.py +0 -0
  97. {jscope-0.5.0 → jscope-0.6.0}/tests/test_ast_engine.py +0 -0
  98. {jscope-0.5.0 → jscope-0.6.0}/tests/test_benchmark.py +0 -0
  99. {jscope-0.5.0 → jscope-0.6.0}/tests/test_dataflow.py +0 -0
  100. {jscope-0.5.0 → jscope-0.6.0}/tests/test_engine_hardening_and_plugins.py +0 -0
  101. {jscope-0.5.0 → jscope-0.6.0}/tests/test_evidence_engine.py +0 -0
  102. {jscope-0.5.0 → jscope-0.6.0}/tests/test_graph_correlation.py +0 -0
  103. {jscope-0.5.0 → jscope-0.6.0}/tests/test_incremental.py +0 -0
  104. {jscope-0.5.0 → jscope-0.6.0}/tests/test_live_local.py +0 -0
  105. {jscope-0.5.0 → jscope-0.6.0}/tests/test_observe.py +0 -0
  106. {jscope-0.5.0 → jscope-0.6.0}/tests/test_path_independence.py +0 -0
  107. {jscope-0.5.0 → jscope-0.6.0}/tests/test_phase2_analyzers.py +0 -0
  108. {jscope-0.5.0 → jscope-0.6.0}/tests/test_phase2_scope_transport.py +0 -0
  109. {jscope-0.5.0 → jscope-0.6.0}/tests/test_phase3.py +0 -0
  110. {jscope-0.5.0 → jscope-0.6.0}/tests/test_phase4.py +0 -0
  111. {jscope-0.5.0 → jscope-0.6.0}/tests/test_phases345_hardening.py +0 -0
  112. {jscope-0.5.0 → jscope-0.6.0}/tests/test_plugin_isolation.py +0 -0
  113. {jscope-0.5.0 → jscope-0.6.0}/tests/test_router.py +0 -0
  114. {jscope-0.5.0 → jscope-0.6.0}/tests/test_scope.py +0 -0
  115. {jscope-0.5.0 → jscope-0.6.0}/tests/test_verify.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jscope
3
- Version: 0.5.0
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
@@ -95,29 +95,50 @@ Try it yourself on the bundled fixture (`tests/sample_react`).
95
95
 
96
96
  ```bash
97
97
  python -m pip install --upgrade jscope
98
- jscope # opens the guided terminal wizard
98
+ jscope https://app.example.com # or ./path/to/project: analyze, remember, and tell you what to do next
99
99
  ```
100
100
 
101
- JScope starts with a hawk identity banner and a guided mode selector. **Auto mode** walks through target, assessment profile, review and execution. **Manual mode** lets you run existing JScope commands from an interactive prompt. The original direct CLI remains available:
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
- ```bash
104
- jscope --help
105
- jscope doctor
106
- jscope analyze ./path/to/project --verbose
107
- jscope https://app.example.com
103
+ ## One investigation, no re-typing
104
+
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
108
126
  ```
109
127
 
110
- Python 3.10+. For YAML OpenAPI specs: `python -m pip install "jscope[yaml]"`. For development, clone the repository and install `python -m pip install -e ".[dev]"`. See [docs/RELEASING.md](docs/RELEASING.md) for GitHub and PyPI publishing.
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.
111
130
 
112
- ## Quick start
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.
113
136
 
114
- ```bash
115
- jscope analyze ./path/to/js-project --verbose # ranking, route map, evidence appendix
116
- jscope explain JS-0004 --findings-file f.json # full evidence chain for one finding
117
- jscope graph ./project # route -> component -> API -> guard map
118
- jscope https://app.example.com # crawl + download + analyze (authorized targets only)
119
- jscope report f.json --format html -o report.html # re-render: human | json | markdown | html | sarif
120
- ```
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`.
121
142
 
122
143
  Remote commands (`go`, `scan`, `crawl`, `download`) are bound to the target host, rate-limited, and **refuse loopback/private
123
144
  addresses by default**. For controlled local testing pass `--allow-private`.
@@ -56,29 +56,50 @@ Try it yourself on the bundled fixture (`tests/sample_react`).
56
56
 
57
57
  ```bash
58
58
  python -m pip install --upgrade jscope
59
- jscope # opens the guided terminal wizard
59
+ jscope https://app.example.com # or ./path/to/project: analyze, remember, and tell you what to do next
60
60
  ```
61
61
 
62
- JScope starts with a hawk identity banner and a guided mode selector. **Auto mode** walks through target, assessment profile, review and execution. **Manual mode** lets you run existing JScope commands from an interactive prompt. The original direct CLI remains available:
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
- ```bash
65
- jscope --help
66
- jscope doctor
67
- jscope analyze ./path/to/project --verbose
68
- jscope https://app.example.com
64
+ ## One investigation, no re-typing
65
+
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
69
87
  ```
70
88
 
71
- Python 3.10+. For YAML OpenAPI specs: `python -m pip install "jscope[yaml]"`. For development, clone the repository and install `python -m pip install -e ".[dev]"`. See [docs/RELEASING.md](docs/RELEASING.md) for GitHub and PyPI publishing.
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.
72
91
 
73
- ## Quick start
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.
74
97
 
75
- ```bash
76
- jscope analyze ./path/to/js-project --verbose # ranking, route map, evidence appendix
77
- jscope explain JS-0004 --findings-file f.json # full evidence chain for one finding
78
- jscope graph ./project # route -> component -> API -> guard map
79
- jscope https://app.example.com # crawl + download + analyze (authorized targets only)
80
- jscope report f.json --format html -o report.html # re-render: human | json | markdown | html | sarif
81
- ```
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`.
82
103
 
83
104
  Remote commands (`go`, `scan`, `crawl`, `download`) are bound to the target host, rate-limited, and **refuse loopback/private
84
105
  addresses by default**. For controlled local testing pass `--allow-private`.
@@ -0,0 +1 @@
1
+ __version__ = "0.6.0"