jscope 0.6.0__tar.gz → 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 (121) hide show
  1. jscope-1.0.0/CHANGELOG.md +85 -0
  2. jscope-1.0.0/MANIFEST.in +1 -0
  3. jscope-1.0.0/PKG-INFO +214 -0
  4. jscope-1.0.0/README.md +175 -0
  5. jscope-1.0.0/jscope/__init__.py +1 -0
  6. {jscope-0.6.0 → jscope-1.0.0}/jscope/cli.py +204 -15
  7. {jscope-0.6.0 → jscope-1.0.0}/jscope/core/graph.py +4 -0
  8. {jscope-0.6.0 → jscope-1.0.0}/jscope/crawler/crawler.py +76 -2
  9. jscope-1.0.0/jscope/investigation_intelligence.py +336 -0
  10. {jscope-0.6.0 → jscope-1.0.0}/jscope/pipeline.py +16 -1
  11. jscope-1.0.0/jscope/project_index.py +297 -0
  12. {jscope-0.6.0 → jscope-1.0.0}/jscope/session.py +81 -0
  13. {jscope-0.6.0 → jscope-1.0.0}/jscope/shell.py +6 -2
  14. {jscope-0.6.0 → jscope-1.0.0}/jscope/terminal.py +28 -6
  15. jscope-1.0.0/jscope.egg-info/PKG-INFO +214 -0
  16. {jscope-0.6.0 → jscope-1.0.0}/jscope.egg-info/SOURCES.txt +5 -24
  17. {jscope-0.6.0 → jscope-1.0.0}/pyproject.toml +2 -2
  18. jscope-0.6.0/PKG-INFO +0 -209
  19. jscope-0.6.0/README.md +0 -170
  20. jscope-0.6.0/jscope/__init__.py +0 -1
  21. jscope-0.6.0/jscope.egg-info/PKG-INFO +0 -209
  22. jscope-0.6.0/tests/test_analyzers.py +0 -51
  23. jscope-0.6.0/tests/test_assessment_scope.py +0 -60
  24. jscope-0.6.0/tests/test_ast_engine.py +0 -61
  25. jscope-0.6.0/tests/test_benchmark.py +0 -76
  26. jscope-0.6.0/tests/test_cli_entry.py +0 -275
  27. jscope-0.6.0/tests/test_dataflow.py +0 -397
  28. jscope-0.6.0/tests/test_engine_hardening_and_plugins.py +0 -131
  29. jscope-0.6.0/tests/test_evidence_engine.py +0 -69
  30. jscope-0.6.0/tests/test_graph_correlation.py +0 -55
  31. jscope-0.6.0/tests/test_incremental.py +0 -133
  32. jscope-0.6.0/tests/test_investigation_ux.py +0 -317
  33. jscope-0.6.0/tests/test_live_local.py +0 -162
  34. jscope-0.6.0/tests/test_observe.py +0 -208
  35. jscope-0.6.0/tests/test_path_independence.py +0 -29
  36. jscope-0.6.0/tests/test_phase2_analyzers.py +0 -170
  37. jscope-0.6.0/tests/test_phase2_scope_transport.py +0 -74
  38. jscope-0.6.0/tests/test_phase3.py +0 -286
  39. jscope-0.6.0/tests/test_phase4.py +0 -427
  40. jscope-0.6.0/tests/test_phases345_hardening.py +0 -158
  41. jscope-0.6.0/tests/test_plugin_isolation.py +0 -139
  42. jscope-0.6.0/tests/test_router.py +0 -97
  43. jscope-0.6.0/tests/test_scope.py +0 -171
  44. jscope-0.6.0/tests/test_verify.py +0 -242
  45. {jscope-0.6.0 → jscope-1.0.0}/LICENSE +0 -0
  46. {jscope-0.6.0 → jscope-1.0.0}/jscope/__main__.py +0 -0
  47. {jscope-0.6.0 → jscope-1.0.0}/jscope/ai/__init__.py +0 -0
  48. {jscope-0.6.0 → jscope-1.0.0}/jscope/ai/explain.py +0 -0
  49. {jscope-0.6.0 → jscope-1.0.0}/jscope/ai/providers.py +0 -0
  50. {jscope-0.6.0 → jscope-1.0.0}/jscope/analyzers/__init__.py +0 -0
  51. {jscope-0.6.0 → jscope-1.0.0}/jscope/analyzers/auth_analyzer.py +0 -0
  52. {jscope-0.6.0 → jscope-1.0.0}/jscope/analyzers/authorization_analyzer.py +0 -0
  53. {jscope-0.6.0 → jscope-1.0.0}/jscope/analyzers/base.py +0 -0
  54. {jscope-0.6.0 → jscope-1.0.0}/jscope/analyzers/common.py +0 -0
  55. {jscope-0.6.0 → jscope-1.0.0}/jscope/analyzers/dataflow_analyzer.py +0 -0
  56. {jscope-0.6.0 → jscope-1.0.0}/jscope/analyzers/endpoint_analyzer.py +0 -0
  57. {jscope-0.6.0 → jscope-1.0.0}/jscope/analyzers/framework_detector.py +0 -0
  58. {jscope-0.6.0 → jscope-1.0.0}/jscope/analyzers/graphql_analyzer.py +0 -0
  59. {jscope-0.6.0 → jscope-1.0.0}/jscope/analyzers/graphql_schema_analyzer.py +0 -0
  60. {jscope-0.6.0 → jscope-1.0.0}/jscope/analyzers/html_analyzer.py +0 -0
  61. {jscope-0.6.0 → jscope-1.0.0}/jscope/analyzers/manager.py +0 -0
  62. {jscope-0.6.0 → jscope-1.0.0}/jscope/analyzers/openapi_analyzer.py +0 -0
  63. {jscope-0.6.0 → jscope-1.0.0}/jscope/analyzers/router_analyzer.py +0 -0
  64. {jscope-0.6.0 → jscope-1.0.0}/jscope/analyzers/secret_analyzer.py +0 -0
  65. {jscope-0.6.0 → jscope-1.0.0}/jscope/analyzers/service_worker_analyzer.py +0 -0
  66. {jscope-0.6.0 → jscope-1.0.0}/jscope/analyzers/source_map_analyzer.py +0 -0
  67. {jscope-0.6.0 → jscope-1.0.0}/jscope/analyzers/storage_analyzer.py +0 -0
  68. {jscope-0.6.0 → jscope-1.0.0}/jscope/analyzers/wasm_analyzer.py +0 -0
  69. {jscope-0.6.0 → jscope-1.0.0}/jscope/assessment_engine.py +0 -0
  70. {jscope-0.6.0 → jscope-1.0.0}/jscope/assessment_reporting.py +0 -0
  71. {jscope-0.6.0 → jscope-1.0.0}/jscope/benchmark/__init__.py +0 -0
  72. {jscope-0.6.0 → jscope-1.0.0}/jscope/benchmark/fixtures.py +0 -0
  73. {jscope-0.6.0 → jscope-1.0.0}/jscope/benchmark/runner.py +0 -0
  74. {jscope-0.6.0 → jscope-1.0.0}/jscope/config.py +0 -0
  75. {jscope-0.6.0 → jscope-1.0.0}/jscope/core/__init__.py +0 -0
  76. {jscope-0.6.0 → jscope-1.0.0}/jscope/core/artifacts.py +0 -0
  77. {jscope-0.6.0 → jscope-1.0.0}/jscope/core/cache.py +0 -0
  78. {jscope-0.6.0 → jscope-1.0.0}/jscope/core/classification.py +0 -0
  79. {jscope-0.6.0 → jscope-1.0.0}/jscope/core/evidence.py +0 -0
  80. {jscope-0.6.0 → jscope-1.0.0}/jscope/core/redact.py +0 -0
  81. {jscope-0.6.0 → jscope-1.0.0}/jscope/crawler/__init__.py +0 -0
  82. {jscope-0.6.0 → jscope-1.0.0}/jscope/dataflow/__init__.py +0 -0
  83. {jscope-0.6.0 → jscope-1.0.0}/jscope/dataflow/engine.py +0 -0
  84. {jscope-0.6.0 → jscope-1.0.0}/jscope/dataflow/modules.py +0 -0
  85. {jscope-0.6.0 → jscope-1.0.0}/jscope/dataflow/rules.py +0 -0
  86. {jscope-0.6.0 → jscope-1.0.0}/jscope/downloader/__init__.py +0 -0
  87. {jscope-0.6.0 → jscope-1.0.0}/jscope/downloader/downloader.py +0 -0
  88. {jscope-0.6.0 → jscope-1.0.0}/jscope/investigate.py +0 -0
  89. {jscope-0.6.0 → jscope-1.0.0}/jscope/parsing/__init__.py +0 -0
  90. {jscope-0.6.0 → jscope-1.0.0}/jscope/parsing/ast_engine.py +0 -0
  91. {jscope-0.6.0 → jscope-1.0.0}/jscope/parsing/graphql_schema.py +0 -0
  92. {jscope-0.6.0 → jscope-1.0.0}/jscope/parsing/html.py +0 -0
  93. {jscope-0.6.0 → jscope-1.0.0}/jscope/parsing/queries.py +0 -0
  94. {jscope-0.6.0 → jscope-1.0.0}/jscope/parsing/wasm.py +0 -0
  95. {jscope-0.6.0 → jscope-1.0.0}/jscope/passive_discovery.py +0 -0
  96. {jscope-0.6.0 → jscope-1.0.0}/jscope/plugin/__init__.py +0 -0
  97. {jscope-0.6.0 → jscope-1.0.0}/jscope/plugin/_worker.py +0 -0
  98. {jscope-0.6.0 → jscope-1.0.0}/jscope/plugin/loader.py +0 -0
  99. {jscope-0.6.0 → jscope-1.0.0}/jscope/plugin/sandbox.py +0 -0
  100. {jscope-0.6.0 → jscope-1.0.0}/jscope/reporting/__init__.py +0 -0
  101. {jscope-0.6.0 → jscope-1.0.0}/jscope/reporting/formats.py +0 -0
  102. {jscope-0.6.0 → jscope-1.0.0}/jscope/reporting/human.py +0 -0
  103. {jscope-0.6.0 → jscope-1.0.0}/jscope/reporting/json_report.py +0 -0
  104. {jscope-0.6.0 → jscope-1.0.0}/jscope/reporting/priority.py +0 -0
  105. {jscope-0.6.0 → jscope-1.0.0}/jscope/runtime/__init__.py +0 -0
  106. {jscope-0.6.0 → jscope-1.0.0}/jscope/runtime/observe.py +0 -0
  107. {jscope-0.6.0 → jscope-1.0.0}/jscope/runtime/prober.py +0 -0
  108. {jscope-0.6.0 → jscope-1.0.0}/jscope/runtime/scope.py +0 -0
  109. {jscope-0.6.0 → jscope-1.0.0}/jscope/security_transport.py +0 -0
  110. {jscope-0.6.0 → jscope-1.0.0}/jscope/verify/__init__.py +0 -0
  111. {jscope-0.6.0 → jscope-1.0.0}/jscope/verify/engine.py +0 -0
  112. {jscope-0.6.0 → jscope-1.0.0}/jscope/workspace/__init__.py +0 -0
  113. {jscope-0.6.0 → jscope-1.0.0}/jscope/workspace/assessment.py +0 -0
  114. {jscope-0.6.0 → jscope-1.0.0}/jscope/workspace/common.py +0 -0
  115. {jscope-0.6.0 → jscope-1.0.0}/jscope/workspace/diff.py +0 -0
  116. {jscope-0.6.0 → jscope-1.0.0}/jscope/workspace/store.py +0 -0
  117. {jscope-0.6.0 → jscope-1.0.0}/jscope.egg-info/dependency_links.txt +0 -0
  118. {jscope-0.6.0 → jscope-1.0.0}/jscope.egg-info/entry_points.txt +0 -0
  119. {jscope-0.6.0 → jscope-1.0.0}/jscope.egg-info/requires.txt +0 -0
  120. {jscope-0.6.0 → jscope-1.0.0}/jscope.egg-info/top_level.txt +0 -0
  121. {jscope-0.6.0 → jscope-1.0.0}/setup.cfg +0 -0
@@ -0,0 +1,85 @@
1
+ # Changelog
2
+
3
+ ## 1.0.0 — Stable release
4
+
5
+ - Declared the supported CLI, evidence, session-history, and report interfaces stable for the 1.x line.
6
+ - Completed release documentation for architecture, evidence provenance, CLI behavior, investigation workflow, plugin trust, AI boundaries, security limitations, compatibility, and migration.
7
+ - Restored end-to-end sample projects and plugin fixtures required by the shipped regression suite, and included them in source distributions.
8
+ - Updated package metadata and CI release checks for the stable version.
9
+ - Kept the existing session schema (`jscope-session/1`) and report schema versions unchanged; no automatic rewrite of saved reports or sessions is performed.
10
+ - Clarified limits: analysis findings are evidence-backed leads, not remote exploitability claims; network controls differ by execution path; plugin execution still requires operator trust.
11
+
12
+ ## 0.9.5 — Investigation snapshot comparison
13
+
14
+ - Added `jscope investigate --compare previous-findings.json` to compare the current findings snapshot with a prior snapshot.
15
+ - Reports added, retained, absent, and changed findings with deterministic JSON and Markdown output.
16
+ - Tracks source-field changes for title, severity, confidence, status, category and subject.
17
+ - Explicitly avoids treating a finding absent from the current snapshot as proof of remediation.
18
+ - Uses stable finding IDs, with a deterministic title/location fallback when IDs are unavailable.
19
+
20
+ ## 0.9.4 — Investigation output hardening
21
+
22
+ - Kept comparison and investigation output deterministic and machine-readable.
23
+ - Added explicit limitations to prevent over-interpreting snapshot differences.
24
+
25
+ ## 0.9.3 — Investigation workflow integration
26
+
27
+ - Added comparison as an offline follow-up to the existing saved-findings investigation workflow.
28
+ - Preserved active-session defaults and existing Markdown/JSON output behavior.
29
+
30
+ ## 0.9.2 — Evidence-state reporting
31
+
32
+ - Snapshot comparisons distinguish changed source fields from newly observed or absent findings.
33
+ - Retained the original finding identifiers and source severity/confidence values without recalculating them.
34
+
35
+ ## 0.9.1 — Investigation reliability
36
+
37
+ - Added deterministic snapshot identity fallback for findings without explicit IDs.
38
+ - Added regression coverage for added, absent and changed finding states.
39
+
40
+ ## 0.9.0 — Evidence correlation and advanced investigation
41
+
42
+ - Added `jscope investigate` to turn saved findings and application graph data into deterministic, evidence-linked investigation leads.
43
+ - Correlated findings sharing source locations while explicitly labeling those relationships as inferred.
44
+ - Exposed graph relationships with their original relation type, evidence basis, source file and line.
45
+ - Added optional runtime-observation association against known endpoint nodes; observed responses are not treated as vulnerability confirmation.
46
+ - Added evidence-gap explanations and deterministic next-step guidance without creating or upgrading findings.
47
+ - Added Markdown and JSON output, with support for the active investigation context.
48
+ - Preserved authorization boundaries: the investigation command is offline and performs no network requests or active testing.
49
+
50
+ ## 0.8.5 — Incremental analysis and resource efficiency
51
+
52
+ - Enabled project-local incremental data-flow caching by default for `jscope analyze` and `jscope go`.
53
+ - Reused cached per-file data-flow results when the file and its transitive dependency closure are unchanged.
54
+ - Re-analyzed changed files and their dependents while retaining reusable results for unrelated files.
55
+ - Removed-file and resolver-configuration changes invalidate affected cache entries.
56
+ - Added `--no-cache` to `analyze` and `go` for clean runs and troubleshooting.
57
+ - Cache writes remain atomic; unreadable, corrupt, or incompatible caches fall back to a full analysis.
58
+ - Kept library/API calls opt-in: `run_analysis()` does not create project-local cache files unless `incremental.cache_dir` is configured.
59
+
60
+ ## 0.8.0 — Advanced Static Analysis
61
+
62
+ - Added a project-level symbol index for declarations and exported symbols.
63
+ - Added evidence-attributed import relationships to the application knowledge graph.
64
+ - Resolved supported relative, configured alias, and TypeScript `paths` imports through the shared module resolver.
65
+ - Indexed named, default, namespace, side-effect, and re-export module bindings.
66
+ - Added circular dependency component detection without recursive module traversal.
67
+ - Exposed project intelligence counts, symbol/import records, unresolved module diagnostics, and cycle information in analysis JSON.
68
+ - Preserved unresolved imports as explicit limitations instead of inventing cross-file relationships.
69
+ - Reused the existing interprocedural data-flow engine for cross-file source-to-sink paths.
70
+
71
+ ## 0.7.0 — Investigation continuity
72
+
73
+ - Added persistent investigation history to the local session context.
74
+ - Added `jscope use <target> --scope-file scope.txt` to validate and attach a host-per-line scope inventory.
75
+ - Added `--approve-scope` for explicit per-session approval; unapproved inventory entries do not widen runtime scope.
76
+ - Runtime `confirm` / `verify` can use the explicitly approved session hosts when no explicit `--base-url` is supplied; explicit alternate base URLs still require `--allow-host`.
77
+ - Added `jscope history` to list the active and previous investigation contexts.
78
+ - Added `jscope switch <number>` to restore a previous target, scope host, and saved-findings pointer without network activity.
79
+ - History stores context pointers and metadata only; findings and evidence remain in their original files.
80
+ - Kept compatibility with existing `jscope-session/1` files that do not contain history.
81
+ - Bounded retained history to the 50 most recent contexts.
82
+
83
+ ## 0.6.0
84
+
85
+ - Initial 0.6.0 baseline supplied by the project archive.
@@ -0,0 +1 @@
1
+ include README.md CHANGELOG.md LICENSE pyproject.toml setup.cfg
jscope-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,214 @@
1
+ Metadata-Version: 2.4
2
+ Name: jscope
3
+ Version: 1.0.0
4
+ Summary: Evidence-backed application security intelligence for JavaScript and web applications
5
+ Author: Muhammed Ali
6
+ License-Expression: MIT
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
+ Keywords: security,bug-bounty,pentest,javascript,static-analysis,appsec,recon
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Information Technology
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Security
21
+ Requires-Python: >=3.10
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: tree-sitter>=0.23
25
+ Requires-Dist: tree-sitter-javascript>=0.23
26
+ Requires-Dist: tree-sitter-typescript>=0.23
27
+ Requires-Dist: requests>=2.31
28
+ Requires-Dist: beautifulsoup4>=4.12
29
+ Provides-Extra: yaml
30
+ Requires-Dist: PyYAML>=6.0; extra == "yaml"
31
+ Provides-Extra: browser
32
+ Requires-Dist: playwright>=1.40; extra == "browser"
33
+ Provides-Extra: dev
34
+ Requires-Dist: pytest>=7; extra == "dev"
35
+ Requires-Dist: PyYAML>=6.0; extra == "dev"
36
+ Requires-Dist: build; extra == "dev"
37
+ Requires-Dist: twine; extra == "dev"
38
+ Dynamic: license-file
39
+
40
+ # JScope
41
+
42
+ **Evidence-backed application security intelligence for JavaScript and web applications.**
43
+
44
+ JScope reconstructs how a web application behaves from its JavaScript and related client-side artifacts. It connects routes, components, API calls, authentication and authorization signals, roles, and data flows into an evidence-backed application map.
45
+
46
+ Its goal is not to produce the longest list of URLs or suspicious strings. It helps you understand what the code actually shows, where relationships are supported by evidence, and where further manual investigation is needed.
47
+
48
+ > **JScope findings are investigation leads, not proof of remotely exploitable vulnerabilities.** Always validate results and test only systems you own or are explicitly authorized to assess.
49
+
50
+ ## Requirements
51
+
52
+ - Python 3.10 or newer
53
+ - Internet access for remote crawling and downloading
54
+ - Supported JavaScript/TypeScript parser dependencies (installed automatically with JScope)
55
+
56
+ Optional:
57
+ - `PyYAML` for YAML OpenAPI specifications
58
+ - Playwright for browser-based observation features
59
+
60
+ ## Installation
61
+
62
+ ### From PyPI
63
+
64
+ ```bash
65
+ python -m pip install --upgrade jscope
66
+ ```
67
+
68
+ Optional features:
69
+
70
+ ```bash
71
+ python -m pip install "jscope[yaml]"
72
+ python -m pip install "jscope[browser]"
73
+ ```
74
+
75
+ ### Verify the installation
76
+
77
+ ```bash
78
+ jscope --version
79
+ jscope --help
80
+ jscope doctor
81
+ ```
82
+
83
+ ## Quick start
84
+
85
+ ### Analyze a local project
86
+
87
+ ```bash
88
+ jscope analyze ./path/to/project
89
+ ```
90
+
91
+ ### Start an investigation against an authorized web application
92
+
93
+ ```bash
94
+ jscope https://app.example.com
95
+ ```
96
+
97
+ Start the interactive shell with:
98
+
99
+ ```bash
100
+ jscope
101
+ ```
102
+
103
+ Enter a URL or local project path to begin. The shell keeps the active investigation context so you can inspect findings, view the application graph, and generate reports without repeatedly specifying file paths.
104
+
105
+ ### Crawl a site
106
+
107
+ ```bash
108
+ jscope crawl https://app.example.com
109
+ ```
110
+
111
+ The crawler follows ordinary same-host HTML links and discovers supported client-side assets. Defaults are limited to 25 pages and link depth 2. Adjust the limits with:
112
+
113
+ ```bash
114
+ jscope crawl https://app.example.com --max-pages 100 --max-depth 4
115
+ ```
116
+
117
+ External hosts are not crawled as pages. Requests are subject to scope and transport policy. Forms are not submitted, and authentication or WAF controls are not bypassed.
118
+
119
+ ## Common workflow
120
+
121
+ After starting an investigation, these commands operate on the active context:
122
+
123
+ ```bash
124
+ jscope status
125
+ jscope findings
126
+ jscope show 1
127
+ jscope show 1 --source
128
+ jscope graph
129
+ jscope report --format html
130
+ jscope history
131
+ jscope switch 2
132
+ ```
133
+
134
+ Useful direct commands:
135
+
136
+ | Command | Purpose |
137
+ |---|---|
138
+ | `jscope analyze PATH` | Analyze local JavaScript/TypeScript project files |
139
+ | `jscope crawl URL` | Discover same-host pages and client-side assets |
140
+ | `jscope download URL` | Download JavaScript assets from a URL list |
141
+ | `jscope scan URL` | Run crawl, download, analysis, and reporting |
142
+ | `jscope graph` | Display route, component, API, and guard relationships |
143
+ | `jscope findings` | List ranked, evidence-backed findings |
144
+ | `jscope show ID` | Inspect a finding and its supporting evidence |
145
+ | `jscope investigate` | Correlate saved evidence into investigation leads |
146
+ | `jscope report` | Generate human-readable or machine-readable reports |
147
+ | `jscope status` | Show active target, scope, and evidence state |
148
+ | `jscope history` | List recent investigation contexts |
149
+ | `jscope switch N` | Restore a previous investigation context |
150
+ | `jscope doctor` | Diagnose installation and environment issues |
151
+ | `jscope plugins` | List available analyzers and their trust tier |
152
+ | `jscope benchmark` | Run the bundled analysis benchmark |
153
+
154
+ For exact flags and options, use:
155
+
156
+ ```bash
157
+ jscope COMMAND --help
158
+ ```
159
+
160
+ ## What JScope analyzes
161
+
162
+ JScope includes analyzers for:
163
+
164
+ - Frontend routes and routing frameworks
165
+ - Authentication and client-side authorization patterns
166
+ - Components, guards, and declared roles
167
+ - API endpoints and route-to-API attribution
168
+ - Storage and token-handling patterns
169
+ - GraphQL operations and schemas
170
+ - OpenAPI specifications
171
+ - Service workers, source maps, and HTML security configuration
172
+ - WebAssembly references and modules
173
+ - Potentially exposed secrets
174
+ - Interprocedural data-flow paths and project-level module relationships
175
+
176
+ The application graph and investigation output preserve evidence provenance. Unresolved imports, dynamic module names, ambiguous bindings, and unsupported conventions remain unresolved instead of being silently guessed.
177
+
178
+ ## Scope and safety controls
179
+
180
+ JScope is designed to make network activity explicit.
181
+
182
+ - Remote commands are constrained by the target and assessment scope.
183
+ - Loopback and private-network destinations are refused by default. Use `--allow-private` only for a controlled local environment you are authorized to test.
184
+ - An alternate `--base-url` requires explicit host authorization with `--allow-host`.
185
+ - Runtime confirmation and verification are opt-in and require `--authorize-active-tests` in non-interactive use.
186
+ - Browser observation requires explicit host authorization.
187
+ - Non-interactive remote `go` runs require `-y`.
188
+ - Crawling uses GET requests; it does not submit forms or attempt to bypass authentication or WAF controls.
189
+
190
+ Review the command's `--help` output before enabling any runtime operation. Authorization to inspect client-side code does not automatically authorize active requests against the server.
191
+
192
+ ## Reports and automation
193
+
194
+ JScope can render saved analysis results in human-readable, JSON, Markdown, HTML, and SARIF formats where supported by the selected command.
195
+
196
+ Some commands support `--json` for scripting. Check command-specific help for exact output and exit-code behavior.
197
+
198
+ ## Limitations
199
+
200
+ - Static analysis cannot establish that a server-side vulnerability is exploitable.
201
+ - A missing client-side guard does not prove that server-side authorization is missing.
202
+ - Route-to-API attribution can be less precise for imported components than for components defined in the route file.
203
+ - Dynamic imports, custom loaders, unsupported framework conventions, and ambiguous symbol bindings can limit cross-file resolution.
204
+ - Runtime confirmation is narrow and indicates that a route responds; it does not prove vulnerability.
205
+ - Benchmark results use a synthetic fixture corpus and should be treated as regression signals, not estimates of real-world precision or recall.
206
+ - Plugin code is executable Python. File-based community plugins may run in a worker process, but installed entry-point plugins and explicitly trusted plugins can run in-process. This is not a hardened operating-system sandbox.
207
+
208
+ ## Version
209
+
210
+ This distribution is **JScope 1.0.0**. The package version is intentionally unchanged.
211
+
212
+ ## License
213
+
214
+ MIT. See [LICENSE](LICENSE).
jscope-1.0.0/README.md ADDED
@@ -0,0 +1,175 @@
1
+ # JScope
2
+
3
+ **Evidence-backed application security intelligence for JavaScript and web applications.**
4
+
5
+ JScope reconstructs how a web application behaves from its JavaScript and related client-side artifacts. It connects routes, components, API calls, authentication and authorization signals, roles, and data flows into an evidence-backed application map.
6
+
7
+ Its goal is not to produce the longest list of URLs or suspicious strings. It helps you understand what the code actually shows, where relationships are supported by evidence, and where further manual investigation is needed.
8
+
9
+ > **JScope findings are investigation leads, not proof of remotely exploitable vulnerabilities.** Always validate results and test only systems you own or are explicitly authorized to assess.
10
+
11
+ ## Requirements
12
+
13
+ - Python 3.10 or newer
14
+ - Internet access for remote crawling and downloading
15
+ - Supported JavaScript/TypeScript parser dependencies (installed automatically with JScope)
16
+
17
+ Optional:
18
+ - `PyYAML` for YAML OpenAPI specifications
19
+ - Playwright for browser-based observation features
20
+
21
+ ## Installation
22
+
23
+ ### From PyPI
24
+
25
+ ```bash
26
+ python -m pip install --upgrade jscope
27
+ ```
28
+
29
+ Optional features:
30
+
31
+ ```bash
32
+ python -m pip install "jscope[yaml]"
33
+ python -m pip install "jscope[browser]"
34
+ ```
35
+
36
+ ### Verify the installation
37
+
38
+ ```bash
39
+ jscope --version
40
+ jscope --help
41
+ jscope doctor
42
+ ```
43
+
44
+ ## Quick start
45
+
46
+ ### Analyze a local project
47
+
48
+ ```bash
49
+ jscope analyze ./path/to/project
50
+ ```
51
+
52
+ ### Start an investigation against an authorized web application
53
+
54
+ ```bash
55
+ jscope https://app.example.com
56
+ ```
57
+
58
+ Start the interactive shell with:
59
+
60
+ ```bash
61
+ jscope
62
+ ```
63
+
64
+ Enter a URL or local project path to begin. The shell keeps the active investigation context so you can inspect findings, view the application graph, and generate reports without repeatedly specifying file paths.
65
+
66
+ ### Crawl a site
67
+
68
+ ```bash
69
+ jscope crawl https://app.example.com
70
+ ```
71
+
72
+ The crawler follows ordinary same-host HTML links and discovers supported client-side assets. Defaults are limited to 25 pages and link depth 2. Adjust the limits with:
73
+
74
+ ```bash
75
+ jscope crawl https://app.example.com --max-pages 100 --max-depth 4
76
+ ```
77
+
78
+ External hosts are not crawled as pages. Requests are subject to scope and transport policy. Forms are not submitted, and authentication or WAF controls are not bypassed.
79
+
80
+ ## Common workflow
81
+
82
+ After starting an investigation, these commands operate on the active context:
83
+
84
+ ```bash
85
+ jscope status
86
+ jscope findings
87
+ jscope show 1
88
+ jscope show 1 --source
89
+ jscope graph
90
+ jscope report --format html
91
+ jscope history
92
+ jscope switch 2
93
+ ```
94
+
95
+ Useful direct commands:
96
+
97
+ | Command | Purpose |
98
+ |---|---|
99
+ | `jscope analyze PATH` | Analyze local JavaScript/TypeScript project files |
100
+ | `jscope crawl URL` | Discover same-host pages and client-side assets |
101
+ | `jscope download URL` | Download JavaScript assets from a URL list |
102
+ | `jscope scan URL` | Run crawl, download, analysis, and reporting |
103
+ | `jscope graph` | Display route, component, API, and guard relationships |
104
+ | `jscope findings` | List ranked, evidence-backed findings |
105
+ | `jscope show ID` | Inspect a finding and its supporting evidence |
106
+ | `jscope investigate` | Correlate saved evidence into investigation leads |
107
+ | `jscope report` | Generate human-readable or machine-readable reports |
108
+ | `jscope status` | Show active target, scope, and evidence state |
109
+ | `jscope history` | List recent investigation contexts |
110
+ | `jscope switch N` | Restore a previous investigation context |
111
+ | `jscope doctor` | Diagnose installation and environment issues |
112
+ | `jscope plugins` | List available analyzers and their trust tier |
113
+ | `jscope benchmark` | Run the bundled analysis benchmark |
114
+
115
+ For exact flags and options, use:
116
+
117
+ ```bash
118
+ jscope COMMAND --help
119
+ ```
120
+
121
+ ## What JScope analyzes
122
+
123
+ JScope includes analyzers for:
124
+
125
+ - Frontend routes and routing frameworks
126
+ - Authentication and client-side authorization patterns
127
+ - Components, guards, and declared roles
128
+ - API endpoints and route-to-API attribution
129
+ - Storage and token-handling patterns
130
+ - GraphQL operations and schemas
131
+ - OpenAPI specifications
132
+ - Service workers, source maps, and HTML security configuration
133
+ - WebAssembly references and modules
134
+ - Potentially exposed secrets
135
+ - Interprocedural data-flow paths and project-level module relationships
136
+
137
+ The application graph and investigation output preserve evidence provenance. Unresolved imports, dynamic module names, ambiguous bindings, and unsupported conventions remain unresolved instead of being silently guessed.
138
+
139
+ ## Scope and safety controls
140
+
141
+ JScope is designed to make network activity explicit.
142
+
143
+ - Remote commands are constrained by the target and assessment scope.
144
+ - Loopback and private-network destinations are refused by default. Use `--allow-private` only for a controlled local environment you are authorized to test.
145
+ - An alternate `--base-url` requires explicit host authorization with `--allow-host`.
146
+ - Runtime confirmation and verification are opt-in and require `--authorize-active-tests` in non-interactive use.
147
+ - Browser observation requires explicit host authorization.
148
+ - Non-interactive remote `go` runs require `-y`.
149
+ - Crawling uses GET requests; it does not submit forms or attempt to bypass authentication or WAF controls.
150
+
151
+ Review the command's `--help` output before enabling any runtime operation. Authorization to inspect client-side code does not automatically authorize active requests against the server.
152
+
153
+ ## Reports and automation
154
+
155
+ JScope can render saved analysis results in human-readable, JSON, Markdown, HTML, and SARIF formats where supported by the selected command.
156
+
157
+ Some commands support `--json` for scripting. Check command-specific help for exact output and exit-code behavior.
158
+
159
+ ## Limitations
160
+
161
+ - Static analysis cannot establish that a server-side vulnerability is exploitable.
162
+ - A missing client-side guard does not prove that server-side authorization is missing.
163
+ - Route-to-API attribution can be less precise for imported components than for components defined in the route file.
164
+ - Dynamic imports, custom loaders, unsupported framework conventions, and ambiguous symbol bindings can limit cross-file resolution.
165
+ - Runtime confirmation is narrow and indicates that a route responds; it does not prove vulnerability.
166
+ - Benchmark results use a synthetic fixture corpus and should be treated as regression signals, not estimates of real-world precision or recall.
167
+ - Plugin code is executable Python. File-based community plugins may run in a worker process, but installed entry-point plugins and explicitly trusted plugins can run in-process. This is not a hardened operating-system sandbox.
168
+
169
+ ## Version
170
+
171
+ This distribution is **JScope 1.0.0**. The package version is intentionally unchanged.
172
+
173
+ ## License
174
+
175
+ MIT. See [LICENSE](LICENSE).
@@ -0,0 +1 @@
1
+ __version__ = "1.0.0"