sourcecode 5.5.1__py3-none-any.whl → 5.5.4__py3-none-any.whl
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.
- sourcecode/__init__.py +1 -1
- sourcecode/_docs/DEFECT-LEDGER.md +11 -0
- sourcecode/_docs/USER_GUIDE.md +8 -2
- sourcecode/cli.py +42 -0
- sourcecode/dependency_analyzer.py +15 -1
- sourcecode/deployment_prefix.py +18 -12
- sourcecode/manifest_cache.py +62 -0
- sourcecode/migrate_check.py +20 -0
- sourcecode/repository_ir.py +141 -30
- sourcecode/risk.py +25 -0
- sourcecode/servlet_surface.py +60 -8
- {sourcecode-5.5.1.dist-info → sourcecode-5.5.4.dist-info}/METADATA +3 -3
- {sourcecode-5.5.1.dist-info → sourcecode-5.5.4.dist-info}/RECORD +16 -15
- {sourcecode-5.5.1.dist-info → sourcecode-5.5.4.dist-info}/WHEEL +0 -0
- {sourcecode-5.5.1.dist-info → sourcecode-5.5.4.dist-info}/entry_points.txt +0 -0
- {sourcecode-5.5.1.dist-info → sourcecode-5.5.4.dist-info}/licenses/LICENSE +0 -0
sourcecode/__init__.py
CHANGED
|
@@ -16,6 +16,17 @@ The facts these rows are keyed to are published: `ask schema facts-v1` prints th
|
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
+
## Audit synchronization
|
|
20
|
+
|
|
21
|
+
| ID | Defect | Found | Severity | Status |
|
|
22
|
+
|---|---|---|---|---|
|
|
23
|
+
| AS-01 | `risk`/`enrich` could omit `sql_taint.bounded_interpolations`, making `sinks_total` impossible to audit against its bounded evidence. | 5.4.2 re-audit | Medium | **closed 5.4.2** — both projections preserve the bounded rows; the paired fixture asserts the sink total and the retained bounded interpolation. |
|
|
24
|
+
| AS-02 | Route projection emitted declarations from abstract Spring controllers, creating phantom routes and inflating the unprotected census. | 5.4.2 re-audit | Low | **closed 5.4.2** — abstract declarers are excluded while concrete subtype projection remains admitted; the route-surface regression covers both sides. |
|
|
25
|
+
| AS-03 | The distributed ledger could leave `C3-123` open after the 5.4.1 build already excluded static assets. | 5.4.2 re-audit | Informational | **closed 5.4.2** — the stale state was synchronized to the wheel it documents. |
|
|
26
|
+
| AS-04 | An unconstrained `@RequestMapping` was described by consumers as GET although Spring admits every verb. | 5.5.1 audit | Medium | **closed 5.5.1** — primary `method` is `ANY`; 5.5.4 adds the concrete `methods` list so consumers do not need to infer its expansion. |
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
19
30
|
## Class C1 — One fact, two authorities
|
|
20
31
|
|
|
21
32
|
| ID | Defect | Found | Severity | Status |
|
sourcecode/_docs/USER_GUIDE.md
CHANGED
|
@@ -136,7 +136,7 @@ pipx install sourcecode # isolated install, no venv needed
|
|
|
136
136
|
|
|
137
137
|
# Verify
|
|
138
138
|
ask version
|
|
139
|
-
# ask 5.5.
|
|
139
|
+
# ask 5.5.4
|
|
140
140
|
```
|
|
141
141
|
|
|
142
142
|
Requires Python 3.9+.
|
|
@@ -261,7 +261,13 @@ ask endpoints /path/to/repo
|
|
|
261
261
|
ask endpoints . --format yaml
|
|
262
262
|
```
|
|
263
263
|
|
|
264
|
-
Output: list of `{method, path, controller, handler}`.
|
|
264
|
+
Output: list of `{method, methods, path, controller, handler}`. `method` remains
|
|
265
|
+
the backwards-compatible primary verb; `methods` is the complete declared set.
|
|
266
|
+
An unconstrained `@RequestMapping` reports `method: "ANY"` and
|
|
267
|
+
`methods: ["GET", "POST", "PUT", "DELETE", "PATCH"]`, because it accepts all
|
|
268
|
+
of those verbs rather than defaulting to GET. Covers `@GetMapping`, `@PostMapping`,
|
|
269
|
+
`@PutMapping`, `@DeleteMapping`, `@PatchMapping`, `@RequestMapping`, `@GET`,
|
|
270
|
+
`@POST`, `@PUT`, `@DELETE`, `@PATCH` + `@Path`.
|
|
265
271
|
|
|
266
272
|
Each endpoint carries a `security` policy. Standard annotations (`@PreAuthorize`, `@Secured`, `@RolesAllowed`, …) are recognized automatically; a custom authorization annotation reports `policy: "none_detected"` until declared in a `sourcecode.config.json` at the repo root:
|
|
267
273
|
|
sourcecode/cli.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import contextlib
|
|
4
|
+
import errno
|
|
4
5
|
import hashlib
|
|
5
6
|
import json
|
|
6
7
|
import difflib
|
|
@@ -1196,6 +1197,15 @@ def _safe_write_file(path: "Path", content: str) -> None:
|
|
|
1196
1197
|
fh.flush()
|
|
1197
1198
|
os.fsync(fh.fileno())
|
|
1198
1199
|
tmp.replace(path)
|
|
1200
|
+
# Atomic replacement alone does not prove that the destination is the
|
|
1201
|
+
# requested artifact. Verify the postcondition before reporting a run
|
|
1202
|
+
# output path, especially for non-empty JSON reports.
|
|
1203
|
+
if not path.is_file() or (content and path.stat().st_size == 0):
|
|
1204
|
+
raise OSError(
|
|
1205
|
+
errno.EIO,
|
|
1206
|
+
"atomic output replacement did not produce the requested file",
|
|
1207
|
+
str(path),
|
|
1208
|
+
)
|
|
1199
1209
|
try:
|
|
1200
1210
|
dir_fd = os.open(str(path.parent), os.O_RDONLY)
|
|
1201
1211
|
try:
|
|
@@ -3125,6 +3135,7 @@ def main(
|
|
|
3125
3135
|
raise typer.Exit()
|
|
3126
3136
|
|
|
3127
3137
|
_t0 = time.monotonic()
|
|
3138
|
+
_root_timing: dict[str, float] = {}
|
|
3128
3139
|
no_tree: bool = False # set True by --agent; --no-tree flag removed
|
|
3129
3140
|
|
|
3130
3141
|
# Validate new flag choices
|
|
@@ -3947,6 +3958,7 @@ def main(
|
|
|
3947
3958
|
if _advisory:
|
|
3948
3959
|
typer.echo(_advisory, err=True)
|
|
3949
3960
|
|
|
3961
|
+
_manifest_t0 = time.perf_counter()
|
|
3950
3962
|
_perf_detection = perf.start()
|
|
3951
3963
|
detector = ProjectDetector(build_default_detectors())
|
|
3952
3964
|
workspace_analysis = WorkspaceAnalyzer().analyze(target, manifests)
|
|
@@ -4007,6 +4019,7 @@ def main(
|
|
|
4007
4019
|
root_dependencies, root_summary = dependency_analyzer.analyze(target)
|
|
4008
4020
|
dependency_records.extend(root_dependencies)
|
|
4009
4021
|
dependency_summaries.append(root_summary)
|
|
4022
|
+
_root_timing["manifests_ms"] = round((time.perf_counter() - _manifest_t0) * 1000, 2)
|
|
4010
4023
|
module_graphs = []
|
|
4011
4024
|
if graph_analyzer is not None:
|
|
4012
4025
|
root_graph_tree = (
|
|
@@ -4652,6 +4665,13 @@ def main(
|
|
|
4652
4665
|
)
|
|
4653
4666
|
|
|
4654
4667
|
perf.stop("analysis", _perf_analysis)
|
|
4668
|
+
# Root timings are deliberately a small diagnostic envelope. They make cold
|
|
4669
|
+
# manifest cost visible even when the optional perf recorder is disabled.
|
|
4670
|
+
_root_timing.setdefault("context_ms", round((time.monotonic() - _t0) * 1000, 2))
|
|
4671
|
+
_root_timing.setdefault("parse_ms", 0.0)
|
|
4672
|
+
_root_timing.setdefault("cir_ms", 0.0)
|
|
4673
|
+
_root_timing.setdefault("ris_ms", 0.0)
|
|
4674
|
+
_root_timing.setdefault("snapshot_ms", 0.0)
|
|
4655
4675
|
# 4. Serialize
|
|
4656
4676
|
_progress.update("serializing output")
|
|
4657
4677
|
_perf_serialize = perf.start()
|
|
@@ -4697,8 +4717,16 @@ def main(
|
|
|
4697
4717
|
raw_dict = standard_view(sm, include_tree=tree and not no_tree)
|
|
4698
4718
|
if not no_redact:
|
|
4699
4719
|
raw_dict = redact_dict(raw_dict)
|
|
4720
|
+
data = raw_dict
|
|
4700
4721
|
content = _serialize_dict(raw_dict, format)
|
|
4701
4722
|
|
|
4723
|
+
if isinstance(data, dict):
|
|
4724
|
+
data.setdefault("_meta", {})["timing_ms"] = {
|
|
4725
|
+
**_root_timing,
|
|
4726
|
+
"total_ms": round((time.monotonic() - _t0) * 1000, 2),
|
|
4727
|
+
}
|
|
4728
|
+
content = _serialize_dict(data, format)
|
|
4729
|
+
|
|
4702
4730
|
perf.stop("serialize", _perf_serialize)
|
|
4703
4731
|
perf.flush_recorder()
|
|
4704
4732
|
|
|
@@ -9221,6 +9249,17 @@ def spring_audit_cmd(
|
|
|
9221
9249
|
elif format == "github-comment":
|
|
9222
9250
|
output = _render_spring_audit_github_comment(combined, min_severity)
|
|
9223
9251
|
else:
|
|
9252
|
+
_bounded_default = (
|
|
9253
|
+
not compact and output_path is None and format == "json" and not table
|
|
9254
|
+
)
|
|
9255
|
+
data = (
|
|
9256
|
+
combined.to_compact_dict()
|
|
9257
|
+
if compact or _bounded_default
|
|
9258
|
+
else combined.to_dict()
|
|
9259
|
+
)
|
|
9260
|
+
if _bounded_default:
|
|
9261
|
+
data.pop("mode", None)
|
|
9262
|
+
data["default_output"] = "bounded"
|
|
9224
9263
|
output = _serialize_dict(data, format)
|
|
9225
9264
|
|
|
9226
9265
|
# F-AV: our own readers ask for the count under either spelling — the break
|
|
@@ -9808,6 +9847,9 @@ def risk_cmd(
|
|
|
9808
9847
|
data, rule_filter=rule_filter, band_filter=band_filter, top_n=top_n
|
|
9809
9848
|
)
|
|
9810
9849
|
else:
|
|
9850
|
+
if output_path is None:
|
|
9851
|
+
from sourcecode.risk import compact_risk_output
|
|
9852
|
+
data = compact_risk_output(data)
|
|
9811
9853
|
output = _serialize_dict(data, format)
|
|
9812
9854
|
_emit_command_output(
|
|
9813
9855
|
output,
|
|
@@ -162,6 +162,15 @@ class DependencyAnalyzer:
|
|
|
162
162
|
*,
|
|
163
163
|
workspace: str | None = None,
|
|
164
164
|
) -> tuple[list[DependencyRecord], DependencySummary]:
|
|
165
|
+
from sourcecode import manifest_cache
|
|
166
|
+
|
|
167
|
+
cached = manifest_cache.load(root)
|
|
168
|
+
if cached is not None:
|
|
169
|
+
records, summary = cached
|
|
170
|
+
if workspace is not None:
|
|
171
|
+
records = [replace(record, workspace=workspace) for record in records]
|
|
172
|
+
summary = replace(summary, dependencies=records)
|
|
173
|
+
return records, summary
|
|
165
174
|
records: list[DependencyRecord] = []
|
|
166
175
|
limitations: list[str] = []
|
|
167
176
|
|
|
@@ -185,7 +194,12 @@ class DependencyAnalyzer:
|
|
|
185
194
|
replace(r, role=_infer_role(r.name, r.ecosystem, r.scope))
|
|
186
195
|
for r in deduped
|
|
187
196
|
]
|
|
188
|
-
|
|
197
|
+
summary = self._build_summary(deduped, limitations)
|
|
198
|
+
manifest_cache.save(root, deduped, summary)
|
|
199
|
+
if workspace is not None:
|
|
200
|
+
deduped = [replace(record, workspace=workspace) for record in deduped]
|
|
201
|
+
summary = replace(summary, dependencies=deduped)
|
|
202
|
+
return deduped, summary
|
|
189
203
|
|
|
190
204
|
def merge_summaries(self, summaries: Iterable[DependencySummary]) -> DependencySummary:
|
|
191
205
|
result = DependencySummary(requested=True)
|
sourcecode/deployment_prefix.py
CHANGED
|
@@ -23,7 +23,7 @@ from __future__ import annotations
|
|
|
23
23
|
import re
|
|
24
24
|
from dataclasses import dataclass, field
|
|
25
25
|
from pathlib import Path
|
|
26
|
-
from typing import Any, Optional
|
|
26
|
+
from typing import Any, Iterable, Optional
|
|
27
27
|
|
|
28
28
|
# Published Spring Boot property keys (DATA — never a predicate on a repo name).
|
|
29
29
|
_CONTEXT_PATH_KEYS: tuple[str, ...] = (
|
|
@@ -163,25 +163,31 @@ def _profile_of_document(flat: "dict[str, str]", file_profile: Optional[str]) ->
|
|
|
163
163
|
return file_profile
|
|
164
164
|
|
|
165
165
|
|
|
166
|
-
def _config_files(root: Path) -> "list[Path]":
|
|
166
|
+
def _config_files(root: Path, files: Optional[Iterable[Path]] = None) -> "list[Path]":
|
|
167
167
|
"""Spring config files under conventional resource directories.
|
|
168
168
|
|
|
169
169
|
Bounded and sorted for determinism; test resources are excluded because a
|
|
170
170
|
prefix declared for tests is not the deployed one.
|
|
171
171
|
"""
|
|
172
|
+
candidates = files if files is not None else root.rglob("application*.*")
|
|
172
173
|
found: list[Path] = []
|
|
173
|
-
for
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
174
|
+
for path in candidates:
|
|
175
|
+
path = Path(path)
|
|
176
|
+
name = path.name
|
|
177
|
+
if name not in _CONFIG_BASENAMES and not _PROFILE_FILE_RE.match(name):
|
|
178
|
+
continue
|
|
179
|
+
text = str(path).replace("\\", "/")
|
|
180
|
+
in_resources = "/src/main/resources/" in text
|
|
181
|
+
in_config = "/config/" in text
|
|
182
|
+
if not (in_resources or in_config) or "/src/test/" in text or "/target/" in text:
|
|
183
|
+
continue
|
|
184
|
+
found.append(path)
|
|
181
185
|
return sorted(set(found))[:60]
|
|
182
186
|
|
|
183
187
|
|
|
184
|
-
def detect_deployment_prefix(
|
|
188
|
+
def detect_deployment_prefix(
|
|
189
|
+
root: Path, *, files: Optional[Iterable[Path]] = None
|
|
190
|
+
) -> DeploymentPrefix:
|
|
185
191
|
"""Read the deployment prefix from the repo's Spring configuration.
|
|
186
192
|
|
|
187
193
|
Best effort and never raises: an unreadable or malformed config yields an
|
|
@@ -190,7 +196,7 @@ def detect_deployment_prefix(root: Path) -> DeploymentPrefix:
|
|
|
190
196
|
"""
|
|
191
197
|
result = DeploymentPrefix()
|
|
192
198
|
try:
|
|
193
|
-
candidates = _config_files(Path(root))
|
|
199
|
+
candidates = _config_files(Path(root), files)
|
|
194
200
|
except Exception:
|
|
195
201
|
return result
|
|
196
202
|
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"""Content-addressed cache for manifest dependency analysis."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import hashlib
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
from dataclasses import asdict
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
from sourcecode.schema import DependencyRecord, DependencySummary
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _base() -> Path:
|
|
14
|
+
configured = os.environ.get("SOURCECODE_CACHE_DIR", "")
|
|
15
|
+
return Path(configured) if configured else Path.home() / ".sourcecode" / "cache"
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def _key(root: Path) -> str:
|
|
19
|
+
digest = hashlib.sha256()
|
|
20
|
+
analyzer = Path(__file__).with_name("dependency_analyzer.py")
|
|
21
|
+
digest.update(analyzer.read_bytes())
|
|
22
|
+
names = {
|
|
23
|
+
"pom.xml", "build.gradle", "build.gradle.kts", "package.json",
|
|
24
|
+
"package-lock.json", "pyproject.toml", "Cargo.toml", "go.mod",
|
|
25
|
+
"composer.json", "Gemfile",
|
|
26
|
+
}
|
|
27
|
+
paths: set[Path] = set()
|
|
28
|
+
for name in names:
|
|
29
|
+
paths.update(root.rglob(name))
|
|
30
|
+
for path in sorted(paths):
|
|
31
|
+
if not path.is_file():
|
|
32
|
+
continue
|
|
33
|
+
try:
|
|
34
|
+
digest.update(path.relative_to(root).as_posix().encode())
|
|
35
|
+
digest.update(path.read_bytes())
|
|
36
|
+
except OSError:
|
|
37
|
+
continue
|
|
38
|
+
return digest.hexdigest()
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def load(root: Path) -> tuple[list[DependencyRecord], DependencySummary] | None:
|
|
42
|
+
try:
|
|
43
|
+
path = _base() / "manifest-cache-v1" / f"{_key(root)}.json"
|
|
44
|
+
data = json.loads(path.read_text(encoding="utf-8"))
|
|
45
|
+
records = [DependencyRecord(**row) for row in data["records"]]
|
|
46
|
+
summary = DependencySummary(**data["summary"])
|
|
47
|
+
summary.dependencies = records
|
|
48
|
+
return records, summary
|
|
49
|
+
except (OSError, ValueError, KeyError, TypeError):
|
|
50
|
+
return None
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def save(root: Path, records: list[DependencyRecord], summary: DependencySummary) -> None:
|
|
54
|
+
try:
|
|
55
|
+
path = _base() / "manifest-cache-v1" / f"{_key(root)}.json"
|
|
56
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
57
|
+
payload = {"records": [asdict(row) for row in records], "summary": asdict(summary)}
|
|
58
|
+
tmp = path.with_suffix(".tmp")
|
|
59
|
+
tmp.write_text(json.dumps(payload, sort_keys=True), encoding="utf-8")
|
|
60
|
+
tmp.replace(path)
|
|
61
|
+
except OSError:
|
|
62
|
+
return
|
sourcecode/migrate_check.py
CHANGED
|
@@ -2375,6 +2375,26 @@ class MigrationReport:
|
|
|
2375
2375
|
compact, "findings", top_n,
|
|
2376
2376
|
key=lambda f: SEVERITY_ORDER.get(f.get("severity"), 3),
|
|
2377
2377
|
)
|
|
2378
|
+
# Keep invariant rule prose once; each finding carries only location and
|
|
2379
|
+
# rule identity. Full prose remains available in the non-compact report.
|
|
2380
|
+
_rule_catalog: dict[str, dict] = {}
|
|
2381
|
+
_lean_findings: list[dict] = []
|
|
2382
|
+
for _finding in compact.get("findings", []):
|
|
2383
|
+
_rule_id = _finding.get("rule_id", "unknown")
|
|
2384
|
+
_rule_catalog.setdefault(_rule_id, {
|
|
2385
|
+
"title": _finding.get("title", ""),
|
|
2386
|
+
"explanation": _finding.get("explanation", ""),
|
|
2387
|
+
"fix_hint": _finding.get("fix_hint", ""),
|
|
2388
|
+
})
|
|
2389
|
+
_lean_findings.append({
|
|
2390
|
+
key: _finding[key]
|
|
2391
|
+
for key in (
|
|
2392
|
+
"id", "rule_id", "severity", "source_file", "first_line",
|
|
2393
|
+
"migration_target", "imports_found", "code_context",
|
|
2394
|
+
) if key in _finding
|
|
2395
|
+
})
|
|
2396
|
+
compact["rule_catalog"] = _rule_catalog
|
|
2397
|
+
compact["findings"] = _lean_findings
|
|
2378
2398
|
hib = full.get("hibernate")
|
|
2379
2399
|
if isinstance(hib, dict):
|
|
2380
2400
|
h = dict(hib)
|
sourcecode/repository_ir.py
CHANGED
|
@@ -3772,17 +3772,40 @@ def _route_path_expression(args_str: str, constants: "Optional[dict[str, str]]")
|
|
|
3772
3772
|
return args_str.strip()
|
|
3773
3773
|
|
|
3774
3774
|
|
|
3775
|
-
|
|
3776
|
-
|
|
3775
|
+
_ANY_HTTP_METHODS = ("GET", "POST", "PUT", "DELETE", "PATCH")
|
|
3776
|
+
|
|
3777
|
+
|
|
3778
|
+
def _parse_route_http_methods(ann_name: str, args_str: str) -> tuple[str, ...]:
|
|
3779
|
+
"""Derive every declared HTTP method, preserving annotation order."""
|
|
3777
3780
|
explicit = _HTTP_METHOD_MAP.get(ann_name)
|
|
3778
3781
|
if explicit:
|
|
3779
|
-
return explicit
|
|
3780
|
-
|
|
3782
|
+
return (explicit,)
|
|
3783
|
+
# Spring accepts both `method=RequestMethod.GET` and the array spelling
|
|
3784
|
+
# `method={RequestMethod.GET, RequestMethod.POST}`. The old expression
|
|
3785
|
+
# expected the token immediately after `=`, so the braces form fell through
|
|
3786
|
+
# to ANY and overstated the reachable verb surface.
|
|
3787
|
+
m = re.search(
|
|
3788
|
+
r'\bmethod\s*=\s*\{?\s*((?:RequestMethod\.)?\w+(?:\s*,\s*(?:RequestMethod\.)?\w+)*)',
|
|
3789
|
+
args_str or "",
|
|
3790
|
+
)
|
|
3781
3791
|
if m:
|
|
3782
|
-
|
|
3792
|
+
methods = re.findall(r'(?:RequestMethod\.)?(\w+)', m.group(1))
|
|
3793
|
+
if methods:
|
|
3794
|
+
return tuple(dict.fromkeys(method.upper() for method in methods))
|
|
3783
3795
|
if ann_name == "@RequestMapping":
|
|
3784
|
-
return "ANY"
|
|
3785
|
-
return
|
|
3796
|
+
return ("ANY",)
|
|
3797
|
+
return ()
|
|
3798
|
+
|
|
3799
|
+
|
|
3800
|
+
def _parse_route_http_method(ann_name: str, args_str: str) -> str:
|
|
3801
|
+
"""Backward-compatible primary HTTP method for a route."""
|
|
3802
|
+
methods = _parse_route_http_methods(ann_name, args_str)
|
|
3803
|
+
return methods[0] if methods else ""
|
|
3804
|
+
|
|
3805
|
+
|
|
3806
|
+
def _published_http_methods(method: str) -> list[str]:
|
|
3807
|
+
"""Concrete verbs a consumer must consider for a route's method label."""
|
|
3808
|
+
return list(_ANY_HTTP_METHODS if method == "ANY" else (method,))
|
|
3786
3809
|
|
|
3787
3810
|
|
|
3788
3811
|
def _parse_route_extras(args_str: str) -> dict:
|
|
@@ -5014,7 +5037,8 @@ def _build_route_surface(
|
|
|
5014
5037
|
_suffix_expr = _route_path_expression(args, constants)
|
|
5015
5038
|
effective_prefixes = class_info.get(cls_simple, {}).get("prefixes", [""])
|
|
5016
5039
|
|
|
5017
|
-
|
|
5040
|
+
route_methods = _parse_route_http_methods(ann_name, args) or ("GET",)
|
|
5041
|
+
method = route_methods[0]
|
|
5018
5042
|
|
|
5019
5043
|
if cls_simple in class_info:
|
|
5020
5044
|
class_info[cls_simple]["own_endpoints"].append(
|
|
@@ -5070,6 +5094,7 @@ def _build_route_surface(
|
|
|
5070
5094
|
"effective_class": cls_fqn,
|
|
5071
5095
|
"path": full_path,
|
|
5072
5096
|
"method": method,
|
|
5097
|
+
"methods": _published_http_methods(method) if method == "ANY" else list(route_methods),
|
|
5073
5098
|
"return_type": (sym.return_type.strip() if sym.return_type else "void"),
|
|
5074
5099
|
"stable_id": sym.stable_id,
|
|
5075
5100
|
"inheritance_depth": 0,
|
|
@@ -5175,6 +5200,7 @@ def _build_route_surface(
|
|
|
5175
5200
|
"effective_class": data["fqn"],
|
|
5176
5201
|
"path": full_path,
|
|
5177
5202
|
"method": verb,
|
|
5203
|
+
"methods": _published_http_methods(verb),
|
|
5178
5204
|
"return_type": _parent_rt_by_sym.get(declaring_sym, "void"),
|
|
5179
5205
|
"stable_id": stable_id,
|
|
5180
5206
|
"inheritance_depth": depth,
|
|
@@ -6411,10 +6437,31 @@ def extract_java_endpoints(
|
|
|
6411
6437
|
|
|
6412
6438
|
java_files = sorted(
|
|
6413
6439
|
p for p in root.rglob("*.java")
|
|
6414
|
-
if not is_test_source_file(_rel(p))
|
|
6440
|
+
if (include_tests or not is_test_source_file(_rel(p)))
|
|
6415
6441
|
and "target/" not in str(p).replace("\\", "/")
|
|
6416
6442
|
and not any(f in str(p).replace("\\", "/") for f in _CLIENT_PATH_FRAGMENTS)
|
|
6417
6443
|
)
|
|
6444
|
+
# `endpoints` needs XML both for Spring Security and WebScript detection.
|
|
6445
|
+
# One inventory avoids seven name-specific walks plus a later desc.xml walk.
|
|
6446
|
+
_xml_files = sorted(root.rglob("*.xml"))
|
|
6447
|
+
# Deployment-prefix resolution formerly ran two independent `root.glob()`
|
|
6448
|
+
# calls. One candidate list keeps that work bounded and reusable below.
|
|
6449
|
+
_config_files = sorted(root.rglob("application*.*"))
|
|
6450
|
+
_excluded_test_source_routes = 0
|
|
6451
|
+
if not include_tests:
|
|
6452
|
+
_route_marker = _re.compile(
|
|
6453
|
+
r"@(GetMapping|PostMapping|PutMapping|DeleteMapping|PatchMapping|RequestMapping|GET|POST|PUT|DELETE|PATCH|Path)\b"
|
|
6454
|
+
)
|
|
6455
|
+
for _candidate in root.rglob("*.java"):
|
|
6456
|
+
_candidate_rel = _rel(_candidate)
|
|
6457
|
+
if not is_test_source_file(_candidate_rel):
|
|
6458
|
+
continue
|
|
6459
|
+
try:
|
|
6460
|
+
_excluded_test_source_routes += len(
|
|
6461
|
+
_route_marker.findall(_candidate.read_text(encoding="utf-8", errors="replace"))
|
|
6462
|
+
)
|
|
6463
|
+
except OSError:
|
|
6464
|
+
continue
|
|
6418
6465
|
|
|
6419
6466
|
all_symbols: list[SymbolRecord] = []
|
|
6420
6467
|
extends_map: dict[str, str] = {}
|
|
@@ -6620,6 +6667,7 @@ def extract_java_endpoints(
|
|
|
6620
6667
|
|
|
6621
6668
|
entry: dict = {
|
|
6622
6669
|
"method": route["method"],
|
|
6670
|
+
"methods": route.get("methods", _published_http_methods(route["method"])),
|
|
6623
6671
|
"path": route["path"],
|
|
6624
6672
|
"controller": controller,
|
|
6625
6673
|
# Two controllers can share a simple name across packages: keycloak
|
|
@@ -6776,23 +6824,23 @@ def extract_java_endpoints(
|
|
|
6776
6824
|
re.IGNORECASE,
|
|
6777
6825
|
)
|
|
6778
6826
|
_xml_security_detected = False
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6827
|
+
for _xf in _xml_files:
|
|
6828
|
+
_xml_name = _xf.name.lower()
|
|
6829
|
+
if not (
|
|
6830
|
+
"security" in _xml_name
|
|
6831
|
+
or "spring" in _xml_name
|
|
6832
|
+
or _xml_name.endswith("-context.xml")
|
|
6833
|
+
or _xml_name.endswith("context.xml")
|
|
6834
|
+
):
|
|
6835
|
+
continue
|
|
6836
|
+
if "target/" in str(_xf).replace("\\", "/"):
|
|
6837
|
+
continue
|
|
6838
|
+
try:
|
|
6839
|
+
_xt = _xf.read_text(encoding="utf-8", errors="replace")
|
|
6840
|
+
except OSError:
|
|
6841
|
+
continue
|
|
6842
|
+
if _XML_SECURITY_RE.search(_xt):
|
|
6843
|
+
_xml_security_detected = True
|
|
6796
6844
|
break
|
|
6797
6845
|
|
|
6798
6846
|
if _xml_security_detected:
|
|
@@ -6892,7 +6940,7 @@ def extract_java_endpoints(
|
|
|
6892
6940
|
try:
|
|
6893
6941
|
from sourcecode.deployment_prefix import detect_deployment_prefix
|
|
6894
6942
|
|
|
6895
|
-
_prefix = detect_deployment_prefix(root)
|
|
6943
|
+
_prefix = detect_deployment_prefix(root, files=_config_files)
|
|
6896
6944
|
if _prefix.sources:
|
|
6897
6945
|
result["deployment_prefix"] = _prefix.to_dict()
|
|
6898
6946
|
if _prefix.prefix:
|
|
@@ -6912,6 +6960,12 @@ def extract_java_endpoints(
|
|
|
6912
6960
|
)
|
|
6913
6961
|
elif _test_util_endpoints:
|
|
6914
6962
|
result["test_util_included"] = len(_test_util_endpoints)
|
|
6963
|
+
if _excluded_test_source_routes:
|
|
6964
|
+
result["test_source_excluded"] = _excluded_test_source_routes
|
|
6965
|
+
result.setdefault("notes", []).append(
|
|
6966
|
+
f"{_excluded_test_source_routes} route annotation(s) from test source trees "
|
|
6967
|
+
"were excluded; use --include-tests to include them."
|
|
6968
|
+
)
|
|
6915
6969
|
# Surface incomplete-endpoint warnings (interface-defined controllers) only when
|
|
6916
6970
|
# present, to keep output backward-compatible for the common case.
|
|
6917
6971
|
if endpoint_warnings:
|
|
@@ -6949,7 +7003,9 @@ def extract_java_endpoints(
|
|
|
6949
7003
|
# (*.desc.xml: <url>/<authentication>/<transaction>) in addition to the Java
|
|
6950
7004
|
# signals gathered above.
|
|
6951
7005
|
_webscript_descriptors = 0
|
|
6952
|
-
for _df in
|
|
7006
|
+
for _df in _xml_files:
|
|
7007
|
+
if not _df.name.endswith(".desc.xml"):
|
|
7008
|
+
continue
|
|
6953
7009
|
if "target/" in str(_df).replace("\\", "/"):
|
|
6954
7010
|
continue
|
|
6955
7011
|
try:
|
|
@@ -6977,7 +7033,7 @@ def extract_java_endpoints(
|
|
|
6977
7033
|
from sourcecode.servlet_surface import build_servlet_surface
|
|
6978
7034
|
|
|
6979
7035
|
_nonspring["servlets"] = int(
|
|
6980
|
-
build_servlet_surface(root).get("declarations", 0)
|
|
7036
|
+
build_servlet_surface(root, files=[*java_files, *_xml_files]).get("declarations", 0)
|
|
6981
7037
|
)
|
|
6982
7038
|
except Exception:
|
|
6983
7039
|
pass
|
|
@@ -7419,16 +7475,22 @@ def compute_blast_radius(
|
|
|
7419
7475
|
|
|
7420
7476
|
# BFS for indirect callers
|
|
7421
7477
|
indirect_callers: list[str] = []
|
|
7478
|
+
_indirect_parent: dict[str, str] = {}
|
|
7479
|
+
_hub_frontier_nodes: set[str] = set()
|
|
7422
7480
|
visited: set[str] = set(matched_fqns) | set(direct_callers)
|
|
7423
7481
|
|
|
7424
7482
|
while queue:
|
|
7425
7483
|
node, depth = queue.pop(0)
|
|
7426
7484
|
if depth >= _effective_depth:
|
|
7427
7485
|
continue
|
|
7428
|
-
|
|
7486
|
+
_node_callers = _walk_callers(node)
|
|
7487
|
+
if len(_node_callers) > _HUB_CALLER_THRESHOLD:
|
|
7488
|
+
_hub_frontier_nodes.add(node)
|
|
7489
|
+
for caller in _node_callers:
|
|
7429
7490
|
if caller not in visited:
|
|
7430
7491
|
visited.add(caller)
|
|
7431
7492
|
all_affected[caller] = depth + 1
|
|
7493
|
+
_indirect_parent[caller] = node
|
|
7432
7494
|
indirect_callers.append(caller)
|
|
7433
7495
|
queue.append((caller, depth + 1))
|
|
7434
7496
|
|
|
@@ -7658,6 +7720,29 @@ def compute_blast_radius(
|
|
|
7658
7720
|
n_direct_classes = len(_direct_caller_classes)
|
|
7659
7721
|
n_direct = n_direct_symbols
|
|
7660
7722
|
n_indirect = len(indirect_callers)
|
|
7723
|
+
|
|
7724
|
+
# The complete reverse walk is useful as a measured upper reach, but a
|
|
7725
|
+
# service-locator hub can make it collapse to "the whole repository". Publish
|
|
7726
|
+
# a second, conservative axis that stops at hub frontiers instead of forcing
|
|
7727
|
+
# consumers to guess from a flat list of symbols.
|
|
7728
|
+
_without_hubs: list[str] = []
|
|
7729
|
+
_without_hubs_seen = set(matched_fqns) | set(direct_callers)
|
|
7730
|
+
_without_hubs_queue: list[tuple[str, int]] = [
|
|
7731
|
+
(c, 1) for c in direct_callers
|
|
7732
|
+
]
|
|
7733
|
+
while _without_hubs_queue:
|
|
7734
|
+
_node, _depth = _without_hubs_queue.pop(0)
|
|
7735
|
+
if _depth >= _effective_depth:
|
|
7736
|
+
continue
|
|
7737
|
+
_next = _walk_callers(_node)
|
|
7738
|
+
if len(_next) > _HUB_CALLER_THRESHOLD:
|
|
7739
|
+
continue
|
|
7740
|
+
for _caller in _next:
|
|
7741
|
+
if _caller not in _without_hubs_seen:
|
|
7742
|
+
_without_hubs_seen.add(_caller)
|
|
7743
|
+
_without_hubs.append(_caller)
|
|
7744
|
+
_without_hubs_queue.append((_caller, _depth + 1))
|
|
7745
|
+
|
|
7661
7746
|
n_ep = len(endpoints_affected)
|
|
7662
7747
|
n_txn = len(txn_nodes)
|
|
7663
7748
|
n_mappers = len(mappers_affected)
|
|
@@ -7824,6 +7909,24 @@ def compute_blast_radius(
|
|
|
7824
7909
|
_indirect_summary = (
|
|
7825
7910
|
_indirect_ordered if _indirect_cap is None else _indirect_ordered[:_indirect_cap]
|
|
7826
7911
|
)
|
|
7912
|
+
_indirect_by_depth: dict[str, int] = {}
|
|
7913
|
+
for _node in indirect_callers:
|
|
7914
|
+
_depth_key = str(all_affected.get(_node, 0))
|
|
7915
|
+
_indirect_by_depth[_depth_key] = _indirect_by_depth.get(_depth_key, 0) + 1
|
|
7916
|
+
def _via_hub(_node: str) -> bool:
|
|
7917
|
+
_seen_path: set[str] = set()
|
|
7918
|
+
_cursor = _node
|
|
7919
|
+
while _cursor in _indirect_parent and _cursor not in _seen_path:
|
|
7920
|
+
_seen_path.add(_cursor)
|
|
7921
|
+
_cursor = _indirect_parent[_cursor]
|
|
7922
|
+
if _cursor in _hub_frontier_nodes:
|
|
7923
|
+
return True
|
|
7924
|
+
return False
|
|
7925
|
+
|
|
7926
|
+
_indirect_details = [
|
|
7927
|
+
{"fqn": _node, "depth": all_affected.get(_node), "via_hub": _via_hub(_node)}
|
|
7928
|
+
for _node in _indirect_summary
|
|
7929
|
+
]
|
|
7827
7930
|
|
|
7828
7931
|
out: dict = {
|
|
7829
7932
|
"target": target,
|
|
@@ -7870,6 +7973,10 @@ def compute_blast_radius(
|
|
|
7870
7973
|
else _direct_caller_symbols[:_direct_cap]
|
|
7871
7974
|
),
|
|
7872
7975
|
"indirect_callers": _indirect_summary,
|
|
7976
|
+
"indirect_caller_details": _indirect_details,
|
|
7977
|
+
"indirect_callers_unit": "reference symbols (methods or classes)",
|
|
7978
|
+
"indirect_callers_by_depth": _indirect_by_depth,
|
|
7979
|
+
"indirect_callers_without_hubs": _without_hubs,
|
|
7873
7980
|
"container_wired": [w.to_dict() for w in _container_wired],
|
|
7874
7981
|
"endpoints_affected": endpoints_affected,
|
|
7875
7982
|
"mappers_affected": mappers_affected,
|
|
@@ -7889,6 +7996,10 @@ def compute_blast_radius(
|
|
|
7889
7996
|
"indirect_caller_count": n_indirect,
|
|
7890
7997
|
"indirect_callers_computed": not _bfs_truncated or _indirect_sampled,
|
|
7891
7998
|
"indirect_callers_sampled": _indirect_sampled,
|
|
7999
|
+
"indirect_caller_count_unit": "reference symbols (methods or classes)",
|
|
8000
|
+
"indirect_callers_without_hubs_count": len(_without_hubs),
|
|
8001
|
+
"indirect_callers_without_hubs_unit": "reference symbols (hub frontiers excluded)",
|
|
8002
|
+
"hub_frontier_count": len(_hub_frontier_nodes),
|
|
7892
8003
|
"endpoints_affected_count": n_ep,
|
|
7893
8004
|
# C1-37: four figures called "endpoints" at one commit (3 364 /
|
|
7894
8005
|
# 3 382 / 3 382 / 3 574). Each one now says which population it
|
sourcecode/risk.py
CHANGED
|
@@ -47,6 +47,31 @@ if TYPE_CHECKING:
|
|
|
47
47
|
|
|
48
48
|
RISK_SCHEMA = "risk-v1"
|
|
49
49
|
|
|
50
|
+
|
|
51
|
+
def compact_risk_output(data: dict) -> dict:
|
|
52
|
+
"""Project stdout to stable rule prose plus small per-defect evidence."""
|
|
53
|
+
compact = dict(data)
|
|
54
|
+
rows = data.get("risks") or []
|
|
55
|
+
rules: dict[str, dict] = {}
|
|
56
|
+
lean: list[dict] = []
|
|
57
|
+
for row in rows:
|
|
58
|
+
rule_ids = row.get("rule_ids") or [row.get("rule_id", "unknown")]
|
|
59
|
+
for rule_id in rule_ids:
|
|
60
|
+
rules.setdefault(rule_id, {
|
|
61
|
+
"title": row.get("title", ""),
|
|
62
|
+
"statement": row.get("statement", ""),
|
|
63
|
+
})
|
|
64
|
+
lean.append({
|
|
65
|
+
key: row[key] for key in (
|
|
66
|
+
"defect_id", "symbol", "source_file", "first_line", "band",
|
|
67
|
+
"score", "rule_ids", "factors",
|
|
68
|
+
) if key in row
|
|
69
|
+
})
|
|
70
|
+
compact["rules"] = rules
|
|
71
|
+
compact["risks"] = lean
|
|
72
|
+
compact["default_output"] = "bounded"
|
|
73
|
+
return compact
|
|
74
|
+
|
|
50
75
|
#: The composition, in one place. The payload publishes it, `--help` renders it and
|
|
51
76
|
#: the battery holds both to it: a hand-copied model line in the help screen went on
|
|
52
77
|
#: advertising four factors for as long as it took someone to read it, which is the
|
sourcecode/servlet_surface.py
CHANGED
|
@@ -20,10 +20,11 @@ So the answer is a second, named population beside the first, with its own total
|
|
|
20
20
|
|
|
21
21
|
from __future__ import annotations
|
|
22
22
|
|
|
23
|
+
import os
|
|
23
24
|
import re
|
|
24
25
|
from dataclasses import dataclass
|
|
25
26
|
from pathlib import Path
|
|
26
|
-
from typing import Optional
|
|
27
|
+
from typing import Iterable, Optional
|
|
27
28
|
from xml.etree import ElementTree as ET
|
|
28
29
|
|
|
29
30
|
POPULATION = "servlet"
|
|
@@ -84,7 +85,8 @@ def _child_text(elem: "ET.Element", name: str) -> str:
|
|
|
84
85
|
|
|
85
86
|
def _from_web_xml(xml_path: Path, relative: str) -> "list[ServletMapping]":
|
|
86
87
|
try:
|
|
87
|
-
|
|
88
|
+
text = xml_path.read_text(encoding="utf-8", errors="replace")
|
|
89
|
+
root = ET.fromstring(text)
|
|
88
90
|
except Exception:
|
|
89
91
|
return []
|
|
90
92
|
classes: "dict[str, str]" = {}
|
|
@@ -110,6 +112,27 @@ def _from_web_xml(xml_path: Path, relative: str) -> "list[ServletMapping]":
|
|
|
110
112
|
source_file=relative,
|
|
111
113
|
source="web.xml",
|
|
112
114
|
))
|
|
115
|
+
# Keep a tolerant lexical fallback for descriptors containing legacy XML
|
|
116
|
+
# constructs that ElementTree rejects or partially normalizes. Comments are
|
|
117
|
+
# removed first so commented deployment examples never become live routes.
|
|
118
|
+
try:
|
|
119
|
+
active = re.sub(r"<!--.*?-->", "", text, flags=re.DOTALL)
|
|
120
|
+
for block in re.findall(r"<servlet-mapping\b[^>]*>(.*?)</servlet-mapping>", active, re.DOTALL | re.IGNORECASE):
|
|
121
|
+
name_match = re.search(r"<servlet-name\b[^>]*>\s*([^<]+?)\s*</servlet-name>", block, re.DOTALL | re.IGNORECASE)
|
|
122
|
+
pattern_match = re.search(r"<url-pattern\b[^>]*>\s*([^<]+?)\s*</url-pattern>", block, re.DOTALL | re.IGNORECASE)
|
|
123
|
+
if not pattern_match:
|
|
124
|
+
continue
|
|
125
|
+
candidate = ServletMapping(
|
|
126
|
+
url_pattern=pattern_match.group(1).strip(),
|
|
127
|
+
servlet_name=name_match.group(1).strip() if name_match else "",
|
|
128
|
+
servlet_class=classes.get(name_match.group(1).strip(), "") if name_match else "",
|
|
129
|
+
source_file=relative,
|
|
130
|
+
source="web.xml",
|
|
131
|
+
)
|
|
132
|
+
if candidate not in out:
|
|
133
|
+
out.append(candidate)
|
|
134
|
+
except Exception:
|
|
135
|
+
pass
|
|
113
136
|
return out
|
|
114
137
|
|
|
115
138
|
|
|
@@ -144,14 +167,36 @@ def _from_registration_beans(java_path: Path, relative: str) -> "list[ServletMap
|
|
|
144
167
|
return out
|
|
145
168
|
|
|
146
169
|
|
|
147
|
-
def build_servlet_surface(
|
|
170
|
+
def build_servlet_surface(
|
|
171
|
+
root: Path,
|
|
172
|
+
*,
|
|
173
|
+
limit: Optional[int] = None,
|
|
174
|
+
files: Optional[Iterable[Path]] = None,
|
|
175
|
+
) -> dict:
|
|
148
176
|
"""Every servlet-mapped URL pattern under `root`, as a population of its own."""
|
|
149
177
|
from sourcecode import non_coverage
|
|
150
178
|
|
|
151
179
|
root = Path(root)
|
|
152
180
|
mappings: "list[ServletMapping]" = []
|
|
153
|
-
|
|
154
|
-
|
|
181
|
+
if files is None:
|
|
182
|
+
candidates: list[Path] = []
|
|
183
|
+
for directory, dirs, names in os.walk(root):
|
|
184
|
+
dirs[:] = sorted(name for name in dirs if name not in _SKIP_DIRS)
|
|
185
|
+
candidates.extend(
|
|
186
|
+
Path(directory) / name
|
|
187
|
+
for name in sorted(names)
|
|
188
|
+
if name == "web.xml" or name.endswith(".java")
|
|
189
|
+
)
|
|
190
|
+
else:
|
|
191
|
+
candidates = sorted(
|
|
192
|
+
{
|
|
193
|
+
Path(path)
|
|
194
|
+
for path in files
|
|
195
|
+
if Path(path).name == "web.xml" or Path(path).suffix == ".java"
|
|
196
|
+
}
|
|
197
|
+
)
|
|
198
|
+
for path in candidates:
|
|
199
|
+
if not path.is_file():
|
|
155
200
|
continue
|
|
156
201
|
try:
|
|
157
202
|
# POSIX, like every other path this CLI publishes. C2-18 fixed this
|
|
@@ -168,9 +213,16 @@ def build_servlet_surface(root: Path, *, limit: Optional[int] = None) -> dict:
|
|
|
168
213
|
elif path.suffix == ".java":
|
|
169
214
|
mappings.extend(_from_registration_beans(path, relative))
|
|
170
215
|
|
|
171
|
-
#
|
|
172
|
-
#
|
|
173
|
-
|
|
216
|
+
# A URL pattern is the observable HTTP surface. Multiple descriptors can
|
|
217
|
+
# repeat it, but publishing every duplicate made `declarations` disagree with
|
|
218
|
+
# the pattern census and with endpoint-side reconciliation. Keep the first
|
|
219
|
+
# deterministic declaration as provenance and expose one row per reachable
|
|
220
|
+
# pattern.
|
|
221
|
+
_unique: dict[str, ServletMapping] = {}
|
|
222
|
+
for mapping in sorted(mappings, key=lambda m: (m.url_pattern, m.source_file, m.source)):
|
|
223
|
+
_unique.setdefault(mapping.url_pattern, mapping)
|
|
224
|
+
mappings = list(_unique.values())
|
|
225
|
+
patterns = sorted(_unique)
|
|
174
226
|
by_source: "dict[str, int]" = {}
|
|
175
227
|
for mapping in mappings:
|
|
176
228
|
by_source[mapping.source] = by_source.get(mapping.source, 0) + 1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sourcecode
|
|
3
|
-
Version: 5.5.
|
|
3
|
+
Version: 5.5.4
|
|
4
4
|
Summary: Persistent structural context and ultra-fast repeated analysis for AI coding agents
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Keywords: agents,ai,codebase,context,developer-tools,llm
|
|
@@ -42,7 +42,7 @@ Description-Content-Type: text/markdown
|
|
|
42
42
|
|
|
43
43
|
**Context · Impact · Migration · Architecture · Review — everything from one structural model.**
|
|
44
44
|
|
|
45
|
-

|
|
46
46
|

|
|
47
47
|
|
|
48
48
|
> **ASK Engine** is the product. The CLI command is **`ask`**. The legacy **`sourcecode`**
|
|
@@ -126,7 +126,7 @@ brew tap haroundominique/sourcecode && brew install sourcecode
|
|
|
126
126
|
# pip / pipx
|
|
127
127
|
pipx install sourcecode # or: pip install sourcecode
|
|
128
128
|
|
|
129
|
-
ask version # ask 5.5.
|
|
129
|
+
ask version # ask 5.5.4 — and, on a build that has aged,
|
|
130
130
|
# how many releases have probably shipped since
|
|
131
131
|
```
|
|
132
132
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
sourcecode/__init__.py,sha256=
|
|
1
|
+
sourcecode/__init__.py,sha256=YOYdzwhKTESrTz_n8s2dcmsijpZC-UZTrzT3notGeRw,308
|
|
2
2
|
sourcecode/adaptive_scanner.py,sha256=yJBKjNpkY6bpueYJ2YnRezen3sYZDecEt7WaaNWdqug,9466
|
|
3
3
|
sourcecode/archetype.py,sha256=CZvRLpkHot_D8D3JFQVorr-EHDJyh0BbS7RnSTqBigM,40499
|
|
4
4
|
sourcecode/architectural_baseline.py,sha256=4GiMVBLJVHvRKSWQGf2ZVurI1-R0qk5pmaevgvGSgVA,26325
|
|
@@ -19,7 +19,7 @@ sourcecode/chain_rules.py,sha256=Bi6UHfgd-GxWswmnHRcPz5jdbAuqka3Zkz_P-MTvqhw,127
|
|
|
19
19
|
sourcecode/change_plan.py,sha256=aX1mp2XnlDN-8R2BcTiu8HlkDwQ_4fN1ZLckj0VMXHM,9945
|
|
20
20
|
sourcecode/cir_graphs.py,sha256=9G0HHj1kw2325IDyzo2OpX73BNswEckecf4MZUXB4JM,12078
|
|
21
21
|
sourcecode/classifier.py,sha256=JBzPwSSrDG-tUHAbcKB678HRbjLpD-ohzbzzO62mgpo,20114
|
|
22
|
-
sourcecode/cli.py,sha256=
|
|
22
|
+
sourcecode/cli.py,sha256=e5KKOjoGJw71izHDZAP04IHjZIVDhtfAS-DHeZIJpbg,649752
|
|
23
23
|
sourcecode/client_calls.py,sha256=5_sBfFVXi6RgGiyWrlJKH4x4EF21do6gKlAOuFCKAoA,17709
|
|
24
24
|
sourcecode/code_notes_analyzer.py,sha256=EJemNCNc9Dn-1RZYu-aNbK0ELzmsyC4s6FdHi3XyNEI,9392
|
|
25
25
|
sourcecode/compare.py,sha256=2GdDy0qkDSgmkkpgvoCHitoLj3mt30EeFgJ8PGEXJng,14712
|
|
@@ -41,8 +41,8 @@ sourcecode/data_labels.py,sha256=c_hmgudTE68cVRdywfbfonr7nUWIL-JH2HOXB8Pplv0,845
|
|
|
41
41
|
sourcecode/declarations.py,sha256=Jr7oJDg004sFw0TvJySNVggXFT2jB6hQgbeQK2qreVo,7000
|
|
42
42
|
sourcecode/defect_identity.py,sha256=XS2VFDImg9NLaRImybKTeyk-CoDSsXmchldg0dwvM7c,7028
|
|
43
43
|
sourcecode/degradation.py,sha256=BtuGUKFgkzI3Z6fwmUdxEUEaLFAcPQ_bHhU2w9ItDxw,18376
|
|
44
|
-
sourcecode/dependency_analyzer.py,sha256=
|
|
45
|
-
sourcecode/deployment_prefix.py,sha256=
|
|
44
|
+
sourcecode/dependency_analyzer.py,sha256=MRv6eh1TG5E9Y5Db-bNdZHDIJ3gWvvL3bBU1-9_QSZI,64593
|
|
45
|
+
sourcecode/deployment_prefix.py,sha256=kPHPT6ZLg6CnMqCp9QwhbNNjDyS0sXAfKlPtSHUMggs,12180
|
|
46
46
|
sourcecode/detach.py,sha256=PvkCcbIuTaDKKt5TGqtQLahmsmCkflui33jLnMEWkvg,8006
|
|
47
47
|
sourcecode/doc_analyzer.py,sha256=05bjTUbDbmnbajD_cgRnACzS8T7xxBKVX4CjkJlhZg8,24411
|
|
48
48
|
sourcecode/dynamic_argument_surface.py,sha256=u6zJoY-zChYVw1-SrgiyAq-rUwqMZ5ZqBwLfbPJ_8ng,2960
|
|
@@ -71,9 +71,10 @@ sourcecode/identity_fallback.py,sha256=uRC_j_80uaI4Ue4tf-OhKX4h472dmufYcjEFGSxY2
|
|
|
71
71
|
sourcecode/integration_coordinates.py,sha256=7vGFxN4tCn_KTisYFJuixa8XkyHBoasEFB3fqM62OBI,7407
|
|
72
72
|
sourcecode/jdk_exports.py,sha256=fCrlwNAXUT9gge_joq6kMnY3zJxYB2pxqy-0w3o3MJI,874
|
|
73
73
|
sourcecode/license.py,sha256=vvgE1vBUWh8ozWI7USYuteh6noxntnjuzDQIPF-l4rA,27795
|
|
74
|
+
sourcecode/manifest_cache.py,sha256=NkVtg0T5YfHdIiM63jStvcLcsznM6_bnTHib4t8_FW8,2158
|
|
74
75
|
sourcecode/mcp_nudge.py,sha256=lKemOqK_wny2u7Ymcr2Idi5Kx8pXY02jCi-_nJYLGMg,2992
|
|
75
76
|
sourcecode/metrics_analyzer.py,sha256=gLoRWKygF18jLgwsqmGXSWopw-f5iO1VbM7Jjdif6ag,22809
|
|
76
|
-
sourcecode/migrate_check.py,sha256=
|
|
77
|
+
sourcecode/migrate_check.py,sha256=vdJ_2hOR9XOIQsz4czzamQMKKzHnNErg8vPdzzYqfMY,150019
|
|
77
78
|
sourcecode/migration_blast.py,sha256=OPryWkM6-PbvcG3eJFdcWUnlpXBje41nu2BkrZnE2hg,9359
|
|
78
79
|
sourcecode/non_coverage.py,sha256=sKp0J4_hKzKb_HMoXtdP91D0lMfEAPrOx44sqdQc18Y,23520
|
|
79
80
|
sourcecode/openapi_surface.py,sha256=BTt0K-woZbkbWTN77IkqeBm_Okag9owR0848fmot8sk,16207
|
|
@@ -105,9 +106,9 @@ sourcecode/relevance_scorer.py,sha256=0AgEt4KrV73nioMqBgjhGjtY7L2C7L7cSyKtj3IKcr
|
|
|
105
106
|
sourcecode/remedies.py,sha256=V2_cD4pLq8bKRkzF-3RGFoiu1xWYZS384WDVp1MrlZw,10225
|
|
106
107
|
sourcecode/rename_refactor.py,sha256=h6dNFlB9aZ_3q6heeHBkgXQeXaT03nvPSsYH6P8qxFg,12965
|
|
107
108
|
sourcecode/repo_classifier.py,sha256=FG1vaWKdWXsWdl-S8hjVMiTqcwgaRXkDyvK4rPcOGtQ,22681
|
|
108
|
-
sourcecode/repository_ir.py,sha256=
|
|
109
|
+
sourcecode/repository_ir.py,sha256=f2dLU59dOopIowKey_lBiQNP5bFJ86h92XCKApH0d8A,387247
|
|
109
110
|
sourcecode/ris.py,sha256=Xbx34dkJI_uXil9xsgw-fA_Apcm4nbnTjQgFm66dP1g,27489
|
|
110
|
-
sourcecode/risk.py,sha256=
|
|
111
|
+
sourcecode/risk.py,sha256=u2V7nG5yGW8VV4sFDSgFkZqdI6ltmilWhlQwlIH7d2o,82660
|
|
111
112
|
sourcecode/rule_catalog.py,sha256=pTkgkQZ1u7atB3fkQJ9BPWo8lNiamvEuRN7MtRgle0c,5263
|
|
112
113
|
sourcecode/rule_pass.py,sha256=DTNxD-nAecMJhIzI1LCd9FyRumInQSZjitacNh4Zoc8,14671
|
|
113
114
|
sourcecode/runs.py,sha256=o4oXkB3WFJGScbK_C10OAWzsE18B9Zc55u_IE8_yl4M,6291
|
|
@@ -124,7 +125,7 @@ sourcecode/semantic_impact_engine.py,sha256=t09IirGC3JjQDy33JZd1_WKzQVKXkoNl3-XE
|
|
|
124
125
|
sourcecode/semantic_integration_engine.py,sha256=7a0WqAInOv39f0Yr_94TYo_JP_8QpeI9KGaknpzAyQU,18899
|
|
125
126
|
sourcecode/semantic_services.py,sha256=nbUuPv-F01USTt_9CHT8iy_ucCIw3fz4W3Aquea_pd4,10782
|
|
126
127
|
sourcecode/serializer.py,sha256=cK4I3WzX0H-oBPbqzBsUBRux5GcYmH_yPDQwxvkf8yQ,141598
|
|
127
|
-
sourcecode/servlet_surface.py,sha256=
|
|
128
|
+
sourcecode/servlet_surface.py,sha256=2MLMMUQI1tbNq88iR7ahWm_17ZO7uI5mxXGLe9wthPQ,11387
|
|
128
129
|
sourcecode/source_text.py,sha256=R52gmSljz7L6YVPbixv5W-LOZ5eKUVvSUP3S-QH_IWc,9047
|
|
129
130
|
sourcecode/spring_event_topology.py,sha256=5_ON_21Le5zbG-1GRc5GLIi5HJfy_QjcXLVPC5WeUGQ,18055
|
|
130
131
|
sourcecode/spring_findings.py,sha256=cW6NiQAFUM9mDYPitJr6MrQg--YBI41LxrSEMI9aeIQ,25272
|
|
@@ -212,10 +213,10 @@ sourcecode/telemetry/consent.py,sha256=pQdl-QeLl6Gcibn0eWHSKZrm-HYSsjpVqOnjrgFp8
|
|
|
212
213
|
sourcecode/telemetry/events.py,sha256=4_yeO58U-Cwc1Qb27VB0_EjhmroY0k91n3_VGxeALB8,2776
|
|
213
214
|
sourcecode/telemetry/filters.py,sha256=RzxauTz8HliO4BllQnXEXc7zTeqdCZi5MgqGEDuW7OQ,6570
|
|
214
215
|
sourcecode/telemetry/transport.py,sha256=4gGHsq0WeY9VywEZXA3vUxykfiYnw9uuqfjAAec7F8o,1681
|
|
215
|
-
sourcecode/_docs/DEFECT-LEDGER.md,sha256=
|
|
216
|
-
sourcecode/_docs/USER_GUIDE.md,sha256=
|
|
217
|
-
sourcecode-5.5.
|
|
218
|
-
sourcecode-5.5.
|
|
219
|
-
sourcecode-5.5.
|
|
220
|
-
sourcecode-5.5.
|
|
221
|
-
sourcecode-5.5.
|
|
216
|
+
sourcecode/_docs/DEFECT-LEDGER.md,sha256=ToyTn-J_Lqg64X2DeQQByyvoHCy_hYGK0FdeF8e4-cU,498363
|
|
217
|
+
sourcecode/_docs/USER_GUIDE.md,sha256=vKyfdo74dvMxo761kpDcdCKPzM6QFK13UlidCitQAoQ,79837
|
|
218
|
+
sourcecode-5.5.4.dist-info/METADATA,sha256=JDRjnkUfXvwtMmLyyheXfsu6nxX-_DEk1YQz8-FX7uI,47104
|
|
219
|
+
sourcecode-5.5.4.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
220
|
+
sourcecode-5.5.4.dist-info/entry_points.txt,sha256=-JEAdChrK5We51kZcb7OaDcyil-dHBjBPL-NhuO-QY8,89
|
|
221
|
+
sourcecode-5.5.4.dist-info/licenses/LICENSE,sha256=7DdHrU9Z_3e7dSvq4ISijZNjnuHo5NIHNiHDouMQ9JU,10491
|
|
222
|
+
sourcecode-5.5.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|