sourcecode 4.10.1__py3-none-any.whl → 4.10.2__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.

Potentially problematic release.


This version of sourcecode might be problematic. Click here for more details.

sourcecode/__init__.py CHANGED
@@ -4,4 +4,4 @@ ASK Engine is the product. ``ask`` is the canonical CLI command; ``sourcecode``
4
4
  the legacy compatibility alias and the Python/PyPI package name. See
5
5
  docs/PRODUCT_IDENTITY.md (normative)."""
6
6
 
7
- __version__ = "4.10.1"
7
+ __version__ = "4.10.2"
sourcecode/runs.py CHANGED
@@ -2,6 +2,7 @@
2
2
  from __future__ import annotations
3
3
 
4
4
  import json
5
+ import hashlib
5
6
  import os
6
7
  import time
7
8
  import uuid
@@ -18,7 +19,17 @@ def _now() -> float:
18
19
 
19
20
 
20
21
  def _runs_dir(root: Path) -> Path:
21
- return Path(root).resolve() / ".ask" / "runs"
22
+ override = os.environ.get("ASK_RUNS_DIR", "").strip()
23
+ if override:
24
+ return Path(override).expanduser().resolve()
25
+ if os.environ.get("ASK_RUNS_IN_REPO", "").lower() in ("1", "true", "yes", "on"):
26
+ return Path(root).resolve() / ".ask" / "runs"
27
+ try:
28
+ key_source = str(Path(root).resolve())
29
+ except Exception:
30
+ key_source = str(Path(root).absolute())
31
+ repo_key = hashlib.sha256(key_source.encode("utf-8", errors="replace")).hexdigest()[:16]
32
+ return Path.home() / ".sourcecode" / "runs" / repo_key
22
33
 
23
34
 
24
35
  @dataclass
@@ -212,6 +212,15 @@ _COMMENTED_CONFIG_CONTROLS: tuple[tuple[re.Pattern, str, str], ...] = (
212
212
  ),
213
213
  )
214
214
 
215
+ _COMMENTED_JAVA_HINTS = (
216
+ "@PreAuthorize", "@PostAuthorize", "@Secured", "@RolesAllowed", "@DenyAll",
217
+ "@PermitAll", "FiltroSeguridad", "Security", "Authz", "Authorize",
218
+ "Authorized", "setSecure", "csrfTokenRepository", "csrf(",
219
+ )
220
+ _COMMENTED_XML_HINTS = (
221
+ "<transport-guarantee", "CONFIDENTIAL", "<security-constraint", "<intercept-url",
222
+ )
223
+
215
224
 
216
225
  @dataclass(frozen=True)
217
226
  class SecurityConfigObservation:
@@ -456,6 +465,9 @@ def _scan_commented_controls(
456
465
  from sourcecode.source_text import commented_spans
457
466
 
458
467
  rules = _COMMENTED_XML_CONTROLS if xml else _COMMENTED_JAVA_CONTROLS
468
+ hints = _COMMENTED_XML_HINTS if xml else _COMMENTED_JAVA_HINTS
469
+ if not any(hint in source for hint in hints):
470
+ return []
459
471
  out: "list[SecurityConfigObservation]" = []
460
472
  seen: set[tuple[str, int]] = set()
461
473
  for start, end in commented_spans(source, xml=xml):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sourcecode
3
- Version: 4.10.1
3
+ Version: 4.10.2
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
- ![Version](https://img.shields.io/badge/version-4.10.1-blue)
45
+ ![Version](https://img.shields.io/badge/version-4.10.2-blue)
46
46
  ![Python](https://img.shields.io/badge/python-3.9%2B-green)
47
47
 
48
48
  > **ASK Engine** is the product. The CLI command is **`ask`**. The legacy **`sourcecode`**
@@ -73,7 +73,14 @@ These numbers are cache-layer benchmarks, not a promise for every command. Per-s
73
73
 
74
74
  With the right command class, ASK Engine becomes **constant infrastructure** inside agent loops — call the fast/context surfaces before edits and reserve deep compositions for the points where their evidence is worth the runtime.
75
75
 
76
- **Large-repo controls.** Set `ASK_PROGRESS=1` to get line heartbeats in non-TTY supervised runs. Set `ASK_MAX_ANALYSIS_SECONDS=<seconds>` to fail before starting a repo-wide/deep command whose configured budget is below its safe floor. Use `ask audit-report --from-risk risk.json` to package an existing risk run instead of recomputing it.
76
+ **Large-repo controls.** Set `ASK_PROGRESS=1` to get line heartbeats in non-TTY
77
+ supervised runs. Long repo-wide/deep runs also write durable records under
78
+ `~/.sourcecode/runs/<repo-hash>/` by default, not inside the audited repository;
79
+ set `ASK_RUNS_IN_REPO=1` only when repo-local `.ask/runs` records are intentional.
80
+ Set `ASK_MAX_ANALYSIS_SECONDS=<seconds>` to fail before starting a repo-wide/deep
81
+ command whose configured budget is below its safe floor. Use
82
+ `ask audit-report --from-risk risk.json` to package an existing risk run instead
83
+ of recomputing it.
77
84
 
78
85
  **What a warm actually covers.** `ask cache warm` runs the compact analysis: it rebuilds the
79
86
  shared structural layers (L1/L2 + the Repository Intelligence Snapshot + the shared Canonical
@@ -99,7 +106,7 @@ brew tap haroundominique/sourcecode && brew install sourcecode
99
106
  # pip / pipx
100
107
  pipx install sourcecode # or: pip install sourcecode
101
108
 
102
- ask version # ask 4.10.1 — and, on a build that has aged,
109
+ ask version # ask 4.10.2 — and, on a build that has aged,
103
110
  # how many releases have probably shipped since
104
111
  ```
105
112
 
@@ -1,4 +1,4 @@
1
- sourcecode/__init__.py,sha256=bZfhB676iKPqbeqLZO21xhmWnrXFygsr1pQZ-4LbcWc,309
1
+ sourcecode/__init__.py,sha256=xskHY5rRjTUnc0g0owXUqwzO6Eu4fz6BniL2gUx5fz0,309
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=agDSwGEakdkgLLh5xnd3hiD_TC6pRujWt4klnuYF1wo,18689
@@ -97,13 +97,13 @@ sourcecode/repository_ir.py,sha256=UdA13zDUvhgZvdUt8BIbfHOXi40OkdvqtpMJG7hYkms,3
97
97
  sourcecode/ris.py,sha256=SjjDNMcc9Zr9us9G8ikBVkoPXKK3BpM-dBodSGMh_g4,24783
98
98
  sourcecode/risk.py,sha256=UgTVdMc8XBArO6D9e2Xx9I-kKqx-PW4W0hSe1Jy9qjU,54491
99
99
  sourcecode/rule_catalog.py,sha256=xmphuULUCtg_GWTbriwY25D-N2IaeMXXvB5CNU1xSuA,4925
100
- sourcecode/runs.py,sha256=Oq3vm0_KJGyYUe6Oi8H0DsTNXuWvHQ8tKZjET5i-f0E,4251
100
+ sourcecode/runs.py,sha256=K1G7WjSLACZFNklRupFiHjmF5SJYtoo1OWjA0h8-q7Y,4761
101
101
  sourcecode/runtime_classifier.py,sha256=uTAD6BDCiBLUZEDRfqk718kM4RTT_vAbfkcOI2_Xx58,18432
102
102
  sourcecode/sarif.py,sha256=3hQEegUxIZbojFdY59oB-yKsK-rnafHdTNmYsEP2--A,25984
103
103
  sourcecode/scanner.py,sha256=z3CV0rcGunu0Y8mpNgp07wI7nxT0pxw1BkXRRtI0Rpo,9609
104
104
  sourcecode/schema.py,sha256=aHNXDf8LGyUC8ZDE_VS9kiskC2-Oswhi_WnpdGy6HDw,24897
105
105
  sourcecode/security_config.py,sha256=KblMEoRiEjrIE68YsPaUAFebxFp8UM7MS7lAk5CGD8U,3531
106
- sourcecode/security_config_scan.py,sha256=HEzUOfJpHDnLslhtxnUcDPd3Ci_KCi-4JPTcD8mxjts,26079
106
+ sourcecode/security_config_scan.py,sha256=aG2gqhPrjDpYwqML3Sqg-6_FtJWKmlyy9ceMBd4FHSo,26570
107
107
  sourcecode/security_posture.py,sha256=CjJ2Qm87HhKXepnaWx1ncJLW-SxI18udCmUDIkCyAsY,50270
108
108
  sourcecode/semantic_analyzer.py,sha256=bpgdC6m0_ftVtRf3rSdwhbhWjnZnGxRXaZVcfe4BbcQ,95414
109
109
  sourcecode/semantic_impact_engine.py,sha256=t09IirGC3JjQDy33JZd1_WKzQVKXkoNl3-XEUr5kjis,20563
@@ -193,8 +193,8 @@ sourcecode/telemetry/consent.py,sha256=pQdl-QeLl6Gcibn0eWHSKZrm-HYSsjpVqOnjrgFp8
193
193
  sourcecode/telemetry/events.py,sha256=4_yeO58U-Cwc1Qb27VB0_EjhmroY0k91n3_VGxeALB8,2776
194
194
  sourcecode/telemetry/filters.py,sha256=RzxauTz8HliO4BllQnXEXc7zTeqdCZi5MgqGEDuW7OQ,6570
195
195
  sourcecode/telemetry/transport.py,sha256=4gGHsq0WeY9VywEZXA3vUxykfiYnw9uuqfjAAec7F8o,1681
196
- sourcecode-4.10.1.dist-info/METADATA,sha256=C03K4BPIPgHtCgRNb8t39MBqlERAAQTfSEv75MGXYpg,36435
197
- sourcecode-4.10.1.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
198
- sourcecode-4.10.1.dist-info/entry_points.txt,sha256=-JEAdChrK5We51kZcb7OaDcyil-dHBjBPL-NhuO-QY8,89
199
- sourcecode-4.10.1.dist-info/licenses/LICENSE,sha256=7DdHrU9Z_3e7dSvq4ISijZNjnuHo5NIHNiHDouMQ9JU,10491
200
- sourcecode-4.10.1.dist-info/RECORD,,
196
+ sourcecode-4.10.2.dist-info/METADATA,sha256=LpRICJiZXofZyp2RYC7EnsTKURHjIHQLvktzU_ABEzM,36657
197
+ sourcecode-4.10.2.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
198
+ sourcecode-4.10.2.dist-info/entry_points.txt,sha256=-JEAdChrK5We51kZcb7OaDcyil-dHBjBPL-NhuO-QY8,89
199
+ sourcecode-4.10.2.dist-info/licenses/LICENSE,sha256=7DdHrU9Z_3e7dSvq4ISijZNjnuHo5NIHNiHDouMQ9JU,10491
200
+ sourcecode-4.10.2.dist-info/RECORD,,