jscope 0.4.3__tar.gz → 0.5.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 (111) hide show
  1. {jscope-0.4.3 → jscope-0.5.0}/PKG-INFO +18 -9
  2. {jscope-0.4.3 → jscope-0.5.0}/README.md +14 -5
  3. jscope-0.5.0/jscope/__init__.py +1 -0
  4. {jscope-0.4.3 → jscope-0.5.0}/jscope/cli.py +18 -11
  5. {jscope-0.4.3 → jscope-0.5.0}/jscope/terminal.py +26 -4
  6. jscope-0.5.0/jscope/wizard.py +107 -0
  7. {jscope-0.4.3 → jscope-0.5.0}/jscope.egg-info/PKG-INFO +18 -9
  8. {jscope-0.4.3 → jscope-0.5.0}/jscope.egg-info/SOURCES.txt +2 -0
  9. {jscope-0.4.3 → jscope-0.5.0}/pyproject.toml +3 -3
  10. {jscope-0.4.3 → jscope-0.5.0}/tests/test_cli_entry.py +22 -2
  11. jscope-0.4.3/jscope/__init__.py +0 -1
  12. {jscope-0.4.3 → jscope-0.5.0}/LICENSE +0 -0
  13. {jscope-0.4.3 → jscope-0.5.0}/jscope/__main__.py +0 -0
  14. {jscope-0.4.3 → jscope-0.5.0}/jscope/ai/__init__.py +0 -0
  15. {jscope-0.4.3 → jscope-0.5.0}/jscope/ai/explain.py +0 -0
  16. {jscope-0.4.3 → jscope-0.5.0}/jscope/ai/providers.py +0 -0
  17. {jscope-0.4.3 → jscope-0.5.0}/jscope/analyzers/__init__.py +0 -0
  18. {jscope-0.4.3 → jscope-0.5.0}/jscope/analyzers/auth_analyzer.py +0 -0
  19. {jscope-0.4.3 → jscope-0.5.0}/jscope/analyzers/authorization_analyzer.py +0 -0
  20. {jscope-0.4.3 → jscope-0.5.0}/jscope/analyzers/base.py +0 -0
  21. {jscope-0.4.3 → jscope-0.5.0}/jscope/analyzers/common.py +0 -0
  22. {jscope-0.4.3 → jscope-0.5.0}/jscope/analyzers/dataflow_analyzer.py +0 -0
  23. {jscope-0.4.3 → jscope-0.5.0}/jscope/analyzers/endpoint_analyzer.py +0 -0
  24. {jscope-0.4.3 → jscope-0.5.0}/jscope/analyzers/framework_detector.py +0 -0
  25. {jscope-0.4.3 → jscope-0.5.0}/jscope/analyzers/graphql_analyzer.py +0 -0
  26. {jscope-0.4.3 → jscope-0.5.0}/jscope/analyzers/graphql_schema_analyzer.py +0 -0
  27. {jscope-0.4.3 → jscope-0.5.0}/jscope/analyzers/html_analyzer.py +0 -0
  28. {jscope-0.4.3 → jscope-0.5.0}/jscope/analyzers/manager.py +0 -0
  29. {jscope-0.4.3 → jscope-0.5.0}/jscope/analyzers/openapi_analyzer.py +0 -0
  30. {jscope-0.4.3 → jscope-0.5.0}/jscope/analyzers/router_analyzer.py +0 -0
  31. {jscope-0.4.3 → jscope-0.5.0}/jscope/analyzers/secret_analyzer.py +0 -0
  32. {jscope-0.4.3 → jscope-0.5.0}/jscope/analyzers/service_worker_analyzer.py +0 -0
  33. {jscope-0.4.3 → jscope-0.5.0}/jscope/analyzers/source_map_analyzer.py +0 -0
  34. {jscope-0.4.3 → jscope-0.5.0}/jscope/analyzers/storage_analyzer.py +0 -0
  35. {jscope-0.4.3 → jscope-0.5.0}/jscope/analyzers/wasm_analyzer.py +0 -0
  36. {jscope-0.4.3 → jscope-0.5.0}/jscope/assessment_engine.py +0 -0
  37. {jscope-0.4.3 → jscope-0.5.0}/jscope/assessment_reporting.py +0 -0
  38. {jscope-0.4.3 → jscope-0.5.0}/jscope/benchmark/__init__.py +0 -0
  39. {jscope-0.4.3 → jscope-0.5.0}/jscope/benchmark/fixtures.py +0 -0
  40. {jscope-0.4.3 → jscope-0.5.0}/jscope/benchmark/runner.py +0 -0
  41. {jscope-0.4.3 → jscope-0.5.0}/jscope/config.py +0 -0
  42. {jscope-0.4.3 → jscope-0.5.0}/jscope/core/__init__.py +0 -0
  43. {jscope-0.4.3 → jscope-0.5.0}/jscope/core/artifacts.py +0 -0
  44. {jscope-0.4.3 → jscope-0.5.0}/jscope/core/cache.py +0 -0
  45. {jscope-0.4.3 → jscope-0.5.0}/jscope/core/classification.py +0 -0
  46. {jscope-0.4.3 → jscope-0.5.0}/jscope/core/evidence.py +0 -0
  47. {jscope-0.4.3 → jscope-0.5.0}/jscope/core/graph.py +0 -0
  48. {jscope-0.4.3 → jscope-0.5.0}/jscope/core/redact.py +0 -0
  49. {jscope-0.4.3 → jscope-0.5.0}/jscope/crawler/__init__.py +0 -0
  50. {jscope-0.4.3 → jscope-0.5.0}/jscope/crawler/crawler.py +0 -0
  51. {jscope-0.4.3 → jscope-0.5.0}/jscope/dataflow/__init__.py +0 -0
  52. {jscope-0.4.3 → jscope-0.5.0}/jscope/dataflow/engine.py +0 -0
  53. {jscope-0.4.3 → jscope-0.5.0}/jscope/dataflow/modules.py +0 -0
  54. {jscope-0.4.3 → jscope-0.5.0}/jscope/dataflow/rules.py +0 -0
  55. {jscope-0.4.3 → jscope-0.5.0}/jscope/downloader/__init__.py +0 -0
  56. {jscope-0.4.3 → jscope-0.5.0}/jscope/downloader/downloader.py +0 -0
  57. {jscope-0.4.3 → jscope-0.5.0}/jscope/parsing/__init__.py +0 -0
  58. {jscope-0.4.3 → jscope-0.5.0}/jscope/parsing/ast_engine.py +0 -0
  59. {jscope-0.4.3 → jscope-0.5.0}/jscope/parsing/graphql_schema.py +0 -0
  60. {jscope-0.4.3 → jscope-0.5.0}/jscope/parsing/html.py +0 -0
  61. {jscope-0.4.3 → jscope-0.5.0}/jscope/parsing/queries.py +0 -0
  62. {jscope-0.4.3 → jscope-0.5.0}/jscope/parsing/wasm.py +0 -0
  63. {jscope-0.4.3 → jscope-0.5.0}/jscope/passive_discovery.py +0 -0
  64. {jscope-0.4.3 → jscope-0.5.0}/jscope/pipeline.py +0 -0
  65. {jscope-0.4.3 → jscope-0.5.0}/jscope/plugin/__init__.py +0 -0
  66. {jscope-0.4.3 → jscope-0.5.0}/jscope/plugin/_worker.py +0 -0
  67. {jscope-0.4.3 → jscope-0.5.0}/jscope/plugin/loader.py +0 -0
  68. {jscope-0.4.3 → jscope-0.5.0}/jscope/plugin/sandbox.py +0 -0
  69. {jscope-0.4.3 → jscope-0.5.0}/jscope/reporting/__init__.py +0 -0
  70. {jscope-0.4.3 → jscope-0.5.0}/jscope/reporting/formats.py +0 -0
  71. {jscope-0.4.3 → jscope-0.5.0}/jscope/reporting/human.py +0 -0
  72. {jscope-0.4.3 → jscope-0.5.0}/jscope/reporting/json_report.py +0 -0
  73. {jscope-0.4.3 → jscope-0.5.0}/jscope/reporting/priority.py +0 -0
  74. {jscope-0.4.3 → jscope-0.5.0}/jscope/runtime/__init__.py +0 -0
  75. {jscope-0.4.3 → jscope-0.5.0}/jscope/runtime/observe.py +0 -0
  76. {jscope-0.4.3 → jscope-0.5.0}/jscope/runtime/prober.py +0 -0
  77. {jscope-0.4.3 → jscope-0.5.0}/jscope/runtime/scope.py +0 -0
  78. {jscope-0.4.3 → jscope-0.5.0}/jscope/security_transport.py +0 -0
  79. {jscope-0.4.3 → jscope-0.5.0}/jscope/verify/__init__.py +0 -0
  80. {jscope-0.4.3 → jscope-0.5.0}/jscope/verify/engine.py +0 -0
  81. {jscope-0.4.3 → jscope-0.5.0}/jscope/workspace/__init__.py +0 -0
  82. {jscope-0.4.3 → jscope-0.5.0}/jscope/workspace/assessment.py +0 -0
  83. {jscope-0.4.3 → jscope-0.5.0}/jscope/workspace/common.py +0 -0
  84. {jscope-0.4.3 → jscope-0.5.0}/jscope/workspace/diff.py +0 -0
  85. {jscope-0.4.3 → jscope-0.5.0}/jscope/workspace/store.py +0 -0
  86. {jscope-0.4.3 → jscope-0.5.0}/jscope.egg-info/dependency_links.txt +0 -0
  87. {jscope-0.4.3 → jscope-0.5.0}/jscope.egg-info/entry_points.txt +0 -0
  88. {jscope-0.4.3 → jscope-0.5.0}/jscope.egg-info/requires.txt +0 -0
  89. {jscope-0.4.3 → jscope-0.5.0}/jscope.egg-info/top_level.txt +0 -0
  90. {jscope-0.4.3 → jscope-0.5.0}/setup.cfg +0 -0
  91. {jscope-0.4.3 → jscope-0.5.0}/tests/test_analyzers.py +0 -0
  92. {jscope-0.4.3 → jscope-0.5.0}/tests/test_assessment_scope.py +0 -0
  93. {jscope-0.4.3 → jscope-0.5.0}/tests/test_ast_engine.py +0 -0
  94. {jscope-0.4.3 → jscope-0.5.0}/tests/test_benchmark.py +0 -0
  95. {jscope-0.4.3 → jscope-0.5.0}/tests/test_dataflow.py +0 -0
  96. {jscope-0.4.3 → jscope-0.5.0}/tests/test_engine_hardening_and_plugins.py +0 -0
  97. {jscope-0.4.3 → jscope-0.5.0}/tests/test_evidence_engine.py +0 -0
  98. {jscope-0.4.3 → jscope-0.5.0}/tests/test_graph_correlation.py +0 -0
  99. {jscope-0.4.3 → jscope-0.5.0}/tests/test_incremental.py +0 -0
  100. {jscope-0.4.3 → jscope-0.5.0}/tests/test_live_local.py +0 -0
  101. {jscope-0.4.3 → jscope-0.5.0}/tests/test_observe.py +0 -0
  102. {jscope-0.4.3 → jscope-0.5.0}/tests/test_path_independence.py +0 -0
  103. {jscope-0.4.3 → jscope-0.5.0}/tests/test_phase2_analyzers.py +0 -0
  104. {jscope-0.4.3 → jscope-0.5.0}/tests/test_phase2_scope_transport.py +0 -0
  105. {jscope-0.4.3 → jscope-0.5.0}/tests/test_phase3.py +0 -0
  106. {jscope-0.4.3 → jscope-0.5.0}/tests/test_phase4.py +0 -0
  107. {jscope-0.4.3 → jscope-0.5.0}/tests/test_phases345_hardening.py +0 -0
  108. {jscope-0.4.3 → jscope-0.5.0}/tests/test_plugin_isolation.py +0 -0
  109. {jscope-0.4.3 → jscope-0.5.0}/tests/test_router.py +0 -0
  110. {jscope-0.4.3 → jscope-0.5.0}/tests/test_scope.py +0 -0
  111. {jscope-0.4.3 → jscope-0.5.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.5.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,11 +94,20 @@ 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 # opens the guided terminal wizard
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
+ 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:
102
+
103
+ ```bash
104
+ jscope --help
105
+ jscope doctor
106
+ jscope analyze ./path/to/project --verbose
107
+ jscope https://app.example.com
108
+ ```
109
+
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.
102
111
 
103
112
  ## Quick start
104
113
 
@@ -165,7 +174,7 @@ JScope is a **beta development tool, not a production scanner.** Be aware of the
165
174
  ## Development
166
175
 
167
176
  ```bash
168
- git clone https://github.com/Lime27-Star/JScope && cd JScope
177
+ git clone https://github.com/LIME1Star/Jscope && cd JScope
169
178
  python -m venv .venv && . .venv/bin/activate
170
179
  pip install -e ".[dev]"
171
180
  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,11 +55,20 @@ 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 # opens the guided terminal wizard
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
+ 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:
63
+
64
+ ```bash
65
+ jscope --help
66
+ jscope doctor
67
+ jscope analyze ./path/to/project --verbose
68
+ jscope https://app.example.com
69
+ ```
70
+
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.
63
72
 
64
73
  ## Quick start
65
74
 
@@ -126,7 +135,7 @@ JScope is a **beta development tool, not a production scanner.** Be aware of the
126
135
  ## Development
127
136
 
128
137
  ```bash
129
- git clone https://github.com/Lime27-Star/JScope && cd JScope
138
+ git clone https://github.com/LIME1Star/Jscope && cd JScope
130
139
  python -m venv .venv && . .venv/bin/activate
131
140
  pip install -e ".[dev]"
132
141
  pytest
@@ -0,0 +1 @@
1
+ __version__ = "0.5.0"
@@ -32,8 +32,6 @@ def _emit(text: str, output: str | None) -> None:
32
32
 
33
33
  def _run_analysis(paths, config, label: str = "Inspecting JavaScript and related source files"):
34
34
  """Run the existing engine with JScope's terminal activity treatment."""
35
- if sys.stderr.isatty():
36
- terminal.banner()
37
35
  with terminal.activity(label):
38
36
  return run_analysis(paths, config)
39
37
 
@@ -237,7 +235,7 @@ def cmd_go(args: argparse.Namespace) -> int:
237
235
  if headers is None:
238
236
  return 1
239
237
  rc, updated = _confirm_core(payload, url, args.allow_host or [host], args.rate, args.max_requests,
240
- headers, config, dry_run=False, i_have_permission=args.i_have_permission)
238
+ headers, config, dry_run=False, authorize_active_tests=args.authorize_active_tests)
241
239
  if rc == 0 and updated:
242
240
  with open(findings_path, "w") as f:
243
241
  json.dump(updated, f, indent=2)
@@ -806,7 +804,7 @@ def cmd_report(args: argparse.Namespace) -> int:
806
804
 
807
805
 
808
806
  def _confirm_core(data: dict, base_url: str, allow_hosts: list[str], rate: float | None, max_requests: int | None,
809
- headers: dict, config: Config, dry_run: bool, i_have_permission: bool) -> tuple[int, dict | None]:
807
+ headers: dict, config: Config, dry_run: bool, authorize_active_tests: bool) -> tuple[int, dict | None]:
810
808
  """Shared by `jscope confirm` and `jscope go --confirm`. Returns (exit_code, updated_payload_or_None)."""
811
809
  from jscope.runtime.prober import Prober, ScopeError, apply_results
812
810
  findings = [finding_from_dict(m) for m in data["findings"]]
@@ -825,8 +823,8 @@ def _confirm_core(data: dict, base_url: str, allow_hosts: list[str], rate: float
825
823
  if dry_run:
826
824
  print("[dry run: nothing was sent]", file=sys.stderr)
827
825
  return 0, None
828
- if not i_have_permission:
829
- print("error: refusing to send requests without --i-have-permission (you are authorized to test this host). "
826
+ if not authorize_active_tests:
827
+ print("error: refusing to send requests without --authorize-active-tests. "
830
828
  "Use --dry-run to review the plan first.", file=sys.stderr)
831
829
  return 1, None
832
830
  _, results = prober.run(findings)
@@ -988,7 +986,7 @@ def cmd_confirm(args: argparse.Namespace) -> int:
988
986
  if headers is None:
989
987
  return 1
990
988
  rc, updated = _confirm_core(data, args.base_url, args.allow_host or [], args.rate, args.max_requests,
991
- headers, config, args.dry_run, args.i_have_permission)
989
+ headers, config, args.dry_run, args.authorize_active_tests)
992
990
  if rc == 0 and updated and args.out:
993
991
  with open(args.out, "w") as fh:
994
992
  json.dump(updated, fh, indent=2)
@@ -1031,9 +1029,9 @@ def build_parser() -> argparse.ArgumentParser:
1031
1029
  pg2.add_argument("--allow-private", action="store_true", help="permit loopback/private destinations (controlled local testing only)")
1032
1030
  pg2.add_argument("--no-probe", action="store_true", help="skip well-known OpenAPI/GraphQL spec paths (remote targets only)")
1033
1031
  pg2.add_argument("-y", "--yes", action="store_true", help="skip the target-confirmation prompt (required in non-interactive sessions)")
1034
- pg2.add_argument("--confirm", action="store_true", help="after analyzing, also run opt-in runtime confirmation (still needs --i-have-permission to send)")
1032
+ pg2.add_argument("--confirm", action="store_true", help="after analyzing, run opt-in runtime confirmation (requires --authorize-active-tests to send requests)")
1035
1033
  pg2.add_argument("--allow-host", action="append", help="host(s) allowed for --confirm (default: the target's own host)")
1036
- pg2.add_argument("--i-have-permission", action="store_true", help="required for --confirm to actually send requests")
1034
+ pg2.add_argument("--authorize-active-tests", action="store_true", help="explicitly authorize the opt-in confirmation requests")
1037
1035
  pg2.add_argument("--header", action="append", help="extra header for --confirm, e.g. 'Cookie: session=...'")
1038
1036
  pg2.add_argument("--rate", type=float, default=None)
1039
1037
  pg2.add_argument("--max-requests", type=int, default=None)
@@ -1111,7 +1109,7 @@ def build_parser() -> argparse.ArgumentParser:
1111
1109
  pk.add_argument("findings_file", help="saved with `jscope analyze --save-findings`")
1112
1110
  pk.add_argument("--base-url", required=True, help="origin to test, e.g. https://app.example.com")
1113
1111
  pk.add_argument("--allow-host", action="append", help="host[:port] you are authorized to test (repeatable, required)")
1114
- pk.add_argument("--i-have-permission", action="store_true", help="required to actually send; confirms you may test the host")
1112
+ pk.add_argument("--authorize-active-tests", action="store_true", help="explicitly authorize the planned confirmation requests")
1115
1113
  pk.add_argument("--dry-run", action="store_true", help="print the request plan and send nothing")
1116
1114
  pk.add_argument("--header", action="append", help="extra request header 'Name: value' (e.g. a session cookie you own)")
1117
1115
  pk.add_argument("--rate", type=float, default=None, help="requests per second (default 2)")
@@ -1238,8 +1236,17 @@ def build_parser() -> argparse.ArgumentParser:
1238
1236
  return p
1239
1237
 
1240
1238
 
1241
- def main(argv: list[str] | None = None) -> int:
1239
+ def main(argv: list[str] | None = None, *, _show_banner: bool = True) -> int:
1242
1240
  argv = sys.argv[1:] if argv is None else list(argv)
1241
+ if not argv and sys.stdin.isatty() and sys.stderr.isatty():
1242
+ if _show_banner:
1243
+ terminal.banner()
1244
+ from jscope.wizard import launch_wizard
1245
+ return launch_wizard()
1246
+ if _show_banner and sys.stderr.isatty():
1247
+ terminal.banner()
1248
+ if not argv:
1249
+ argv = ["--help"]
1243
1250
  argv = _rewrite_bare_target(argv)
1244
1251
  parser = build_parser()
1245
1252
  args = parser.parse_args(argv)
@@ -39,12 +39,34 @@ def feather() -> str:
39
39
 
40
40
 
41
41
  def banner() -> None:
42
- """Print the compact White Hawk identity; never pollute machine-readable stdout."""
42
+ """Print the JScope hawk identity on interactive terminal startup."""
43
43
  enabled = _color_enabled(sys.stderr)
44
- mark = _paint("//>", _Style.LIME + _Style.BOLD, enabled)
44
+ hawk = r"""⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⢀⠀⠀⠀⣰⡇⢀⡄⠀⠀⠀
45
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡄⠀⣿⣰⡀⢠⣿⣇⣾⡇⠀⠀⠀
46
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣰⣿⣿⢇⣾⣿⣼⣿⢃⡞⠀⠀
47
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⢋⣾⣿⣿⣿⣯⣿⠇⠀⠀
48
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⢟⣵⣿⣿⣿⣿⣿⣿⣯⡞⠀⠀
49
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣵⣿⣿⣿⣿⣿⣿⣿⣿⡿⡁⠀⠀
50
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣦⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⠀
51
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀
52
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⡡⠀⠀⠀
53
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀⠀
54
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠁⠀⠀⠀⠀
55
+ ⠀⠀⢀⣀⣄⣀⡀⡀⣠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡥⠀⠀⠀⠀⠀⠀
56
+ ⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀
57
+ ⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠁⠀⠀⠀⠀⠀⠀⠀
58
+ ⠘⣿⠋⠛⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
59
+ ⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣶⣀⡀⠀⠀⠀⠀
60
+ ⠀⠀⠀⠀⠘⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⡛⠃⠀⠀
61
+ ⠀⠀⠀⠀⠀⠀⢈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀
62
+ ⠀⠀⠀⠀⠀⢰⣾⣿⣿⣿⣿⣿⠟⠁⠉⠙⠻⠯⡛⠿⠛⠻⠿⠟⠛⠓⠀⠀
63
+ ⠀⠜⡿⠳⡶⠻⣿⣿⣿⣿⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
64
+ ⠀⠀⣠⣽⣧⣾⠛⠉⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
65
+ ⠀⠀⠉⠟⠁⠘⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀"""
45
66
  name = _paint("JSCOPE", _Style.WHITE + _Style.BOLD, enabled)
46
- tagline = _paint("JavaScript Intelligence", _Style.DIM, enabled)
47
- print(f"\n {mark} {name} {tagline}", file=sys.stderr)
67
+ tagline = _paint("JavaScript Intelligence Framework", _Style.DIM, enabled)
68
+ art = _paint(hawk, _Style.LIME + _Style.BOLD, enabled)
69
+ print(f"\n{art}\n {name} {tagline}\n", file=sys.stderr)
48
70
 
49
71
 
50
72
  @contextmanager
@@ -0,0 +1,107 @@
1
+ """Guided interactive entry point for JScope.
2
+
3
+ The wizard is intentionally a thin presentation layer over the existing CLI
4
+ application services. It never invokes a shell and never broadens target scope.
5
+ """
6
+ from __future__ import annotations
7
+
8
+ import shlex
9
+ from urllib.parse import urlparse
10
+
11
+
12
+ def _ask(prompt: str, default: str | None = None) -> str:
13
+ suffix = f" [{default}]" if default else ""
14
+ value = input(f"\n{prompt}{suffix}: ").strip()
15
+ return value or (default or "")
16
+
17
+
18
+ def _choose(title: str, choices: list[str]) -> int:
19
+ print(f"\n{title}")
20
+ for i, choice in enumerate(choices, 1):
21
+ print(f" {i}. {choice}")
22
+ while True:
23
+ value = _ask("Select", "1")
24
+ if value.isdigit() and 1 <= int(value) <= len(choices):
25
+ return int(value)
26
+ print(f"Enter a number from 1 to {len(choices)}.")
27
+
28
+
29
+ def launch_wizard() -> int:
30
+ """Launch the interactive Auto / Manual workflow."""
31
+ from jscope.cli import main
32
+
33
+ print("\nWelcome to JScope.")
34
+ while True:
35
+ mode = _choose("Choose a mode", [
36
+ "Auto mode — guided assessment",
37
+ "Manual mode — run individual tools",
38
+ "Exit",
39
+ ])
40
+ if mode == 3:
41
+ print("JScope closed.")
42
+ return 0
43
+ if mode == 1:
44
+ return _auto_mode(main)
45
+ result = _manual_mode(main)
46
+ if result is not None:
47
+ return result
48
+
49
+
50
+ def _auto_mode(main) -> int:
51
+ print("\nAUTO MODE")
52
+ print("JScope will discover and analyze the target using its existing scope and transport controls.")
53
+ target = _ask("Target URL or local project path")
54
+ if not target:
55
+ print("No target supplied. Returning to the mode selector.")
56
+ return 0
57
+
58
+ profile = _choose("Assessment profile", [
59
+ "Passive discovery — skip well-known API specification probes",
60
+ "Standard discovery — include well-known API specification paths",
61
+ ])
62
+ print("\nASSESSMENT REVIEW")
63
+ print(f" Target : {target}")
64
+ parsed = urlparse(target if "://" in target else f"https://{target}")
65
+ if parsed.hostname:
66
+ print(f" Scope : exact target host ({parsed.hostname}); discovered requests remain host-bound")
67
+ else:
68
+ print(" Scope : local filesystem path; no network requests")
69
+ print(f" Profile: {'Passive discovery' if profile == 1 else 'Standard discovery'}")
70
+ print(" Actions: discover assets, download discovered resources, analyze local evidence, write report")
71
+ print(" Limits : target-host transport policy; private/loopback destinations remain blocked by default")
72
+ proceed = _ask("Start this assessment? (y/N)", "n").lower()
73
+ if proceed not in {"y", "yes"}:
74
+ print("Assessment cancelled.")
75
+ return 0
76
+
77
+ args = ["go", target, "--yes"]
78
+ if profile == 1:
79
+ args.append("--no-probe")
80
+ return main(args, _show_banner=False)
81
+
82
+
83
+ def _manual_mode(main) -> int | None:
84
+ print("\nMANUAL MODE")
85
+ print("Enter an existing JScope command without the leading 'jscope'.")
86
+ print("Examples: doctor | analyze ./project --verbose | graph findings.json | --help")
87
+ print("Commands run through JScope's normal parser; no shell commands are executed.")
88
+ last_status = 0
89
+ while True:
90
+ command = _ask("jscope>")
91
+ if not command:
92
+ continue
93
+ if command.lower() in {"back", "menu", "exit"}:
94
+ return None
95
+ try:
96
+ argv = shlex.split(command)
97
+ except ValueError as exc:
98
+ print(f"Could not parse command: {exc}")
99
+ continue
100
+ if argv and argv[0] == "jscope":
101
+ argv = argv[1:]
102
+ try:
103
+ last_status = main(argv, _show_banner=False)
104
+ except SystemExit as exc:
105
+ last_status = exc.code if isinstance(exc.code, int) else 0
106
+ if last_status:
107
+ print(f"Command exited with status {last_status}.")
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jscope
3
- Version: 0.4.3
3
+ Version: 0.5.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,11 +94,20 @@ 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 # opens the guided terminal wizard
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
+ 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:
102
+
103
+ ```bash
104
+ jscope --help
105
+ jscope doctor
106
+ jscope analyze ./path/to/project --verbose
107
+ jscope https://app.example.com
108
+ ```
109
+
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.
102
111
 
103
112
  ## Quick start
104
113
 
@@ -165,7 +174,7 @@ JScope is a **beta development tool, not a production scanner.** Be aware of the
165
174
  ## Development
166
175
 
167
176
  ```bash
168
- git clone https://github.com/Lime27-Star/JScope && cd JScope
177
+ git clone https://github.com/LIME1Star/Jscope && cd JScope
169
178
  python -m venv .venv && . .venv/bin/activate
170
179
  pip install -e ".[dev]"
171
180
  pytest
@@ -1,6 +1,7 @@
1
1
  LICENSE
2
2
  README.md
3
3
  pyproject.toml
4
+ setup.cfg
4
5
  jscope/__init__.py
5
6
  jscope/__main__.py
6
7
  jscope/assessment_engine.py
@@ -11,6 +12,7 @@ jscope/passive_discovery.py
11
12
  jscope/pipeline.py
12
13
  jscope/security_transport.py
13
14
  jscope/terminal.py
15
+ jscope/wizard.py
14
16
  jscope.egg-info/PKG-INFO
15
17
  jscope.egg-info/SOURCES.txt
16
18
  jscope.egg-info/dependency_links.txt
@@ -38,9 +38,9 @@ browser = ["playwright>=1.40"]
38
38
  dev = ["pytest>=7", "PyYAML>=6.0", "build", "twine"]
39
39
 
40
40
  [project.urls]
41
- Homepage = "https://github.com/Lime27-Star/JScope"
42
- Issues = "https://github.com/Lime27-Star/JScope/issues"
43
- Changelog = "https://github.com/Lime27-Star/JScope/blob/main/CHANGELOG.md"
41
+ Homepage = "https://github.com/LIME1Star/Jscope"
42
+ Issues = "https://github.com/LIME1Star/Jscope/issues"
43
+ Changelog = "https://github.com/LIME1Star/Jscope/blob/main/CHANGELOG.md"
44
44
 
45
45
  [project.scripts]
46
46
  jscope = "jscope.cli:main"
@@ -128,14 +128,14 @@ def test_go_respects_out_and_format_overrides(tmp_path, monkeypatch):
128
128
 
129
129
 
130
130
  # ------------------------------------------------------------------ go --confirm chains into the prober (dry-run only)
131
- def test_go_confirm_without_permission_only_plans(tmp_path, monkeypatch, capsys):
131
+ def test_go_confirm_without_active_test_authorization_refuses_to_send(tmp_path, monkeypatch, capsys):
132
132
  monkeypatch.chdir(tmp_path)
133
133
  srv = make_server()
134
134
  try:
135
135
  url = f"http://127.0.0.1:{srv.server_port}/"
136
136
  rc = main(["go", url, "--yes", "--no-probe", "--confirm", "--allow-private"])
137
137
  assert rc == 1 # confirm runs, but refuses to send without permission
138
- assert "i-have-permission" in capsys.readouterr().err
138
+ assert "--authorize-active-tests" in capsys.readouterr().err
139
139
  finally:
140
140
  srv.shutdown()
141
141
 
@@ -255,3 +255,23 @@ def test_go_remote_loopback_blocked_by_default(tmp_path, monkeypatch, capsys):
255
255
  assert "blocked by scope policy" in capsys.readouterr().err
256
256
  finally:
257
257
  srv.shutdown()
258
+
259
+
260
+ def test_no_args_launches_wizard_and_can_exit(monkeypatch, capsys):
261
+ from jscope.cli import main
262
+ answers = iter(["3"])
263
+ monkeypatch.setattr("sys.stdin.isatty", lambda: True)
264
+ monkeypatch.setattr("sys.stderr.isatty", lambda: True)
265
+ monkeypatch.setattr("builtins.input", lambda *_: next(answers))
266
+ assert main([]) == 0
267
+ captured = capsys.readouterr()
268
+ assert "Choose a mode" in captured.out
269
+ assert "JScope closed" in captured.out
270
+
271
+
272
+ def test_confirm_exposes_explicit_active_test_authorization():
273
+ parser = build_parser()
274
+ args = parser.parse_args(["confirm", "findings.json", "--base-url", "https://example.test", "--authorize-active-tests"])
275
+ assert args.authorize_active_tests is True
276
+ help_text = parser._subparsers._group_actions[0].choices["confirm"].format_help()
277
+ assert "--authorize-active-tests" in help_text
@@ -1 +0,0 @@
1
- __version__ = "0.4.3"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes