arkaos 2.46.0 → 2.46.1
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.
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.46.
|
|
1
|
+
2.46.1
|
package/config/hooks/stop.sh
CHANGED
|
@@ -140,17 +140,25 @@ try:
|
|
|
140
140
|
except Exception:
|
|
141
141
|
safe_sid = None
|
|
142
142
|
if safe_sid:
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
"
|
|
150
|
-
|
|
151
|
-
"
|
|
152
|
-
|
|
153
|
-
|
|
143
|
+
# PR25 v2.46.1 — restrict cite-file permissions on shared
|
|
144
|
+
# multi-user systems. umask(0o077) makes the directory and the
|
|
145
|
+
# JSON file owner-only (mode 0600 / 0700). No-op on single-user
|
|
146
|
+
# dev boxes; defence in depth otherwise.
|
|
147
|
+
prev_umask = os.umask(0o077)
|
|
148
|
+
try:
|
|
149
|
+
cite_dir = Path("/tmp/arkaos-cite")
|
|
150
|
+
cite_dir.mkdir(parents=True, exist_ok=True)
|
|
151
|
+
cite_path = cite_dir / f"{safe_sid}.json"
|
|
152
|
+
cite_payload = {
|
|
153
|
+
"passed": cr.passed,
|
|
154
|
+
"reason": cr.reason,
|
|
155
|
+
"suggestion": cr.suggestion,
|
|
156
|
+
"citation_count": cr.citation_count,
|
|
157
|
+
"topic_score": cr.topic_score,
|
|
158
|
+
}
|
|
159
|
+
cite_path.write_text(json.dumps(cite_payload), encoding="utf-8")
|
|
160
|
+
finally:
|
|
161
|
+
os.umask(prev_umask)
|
|
154
162
|
except Exception:
|
|
155
163
|
pass
|
|
156
164
|
|
|
Binary file
|
|
Binary file
|
|
@@ -26,6 +26,9 @@ _DEFAULT_REPO_ROOT = Path.cwd()
|
|
|
26
26
|
_SUBPROCESS_TIMEOUT = 10
|
|
27
27
|
_NPM_PACKAGE_VERSION_RE = re.compile(r'"version"\s*:\s*"([^"]+)"')
|
|
28
28
|
_PYPROJECT_VERSION_RE = re.compile(r'^version\s*=\s*"([^"]+)"', re.MULTILINE)
|
|
29
|
+
# PR25 v2.46.1 — Redact `user:token@` from git remote URLs before
|
|
30
|
+
# surfacing them in CLI output (some operators use PAT-in-URL remotes).
|
|
31
|
+
_GIT_URL_CREDENTIAL_RE = re.compile(r"://[^/\s@]+:[^/\s@]+@")
|
|
29
32
|
|
|
30
33
|
|
|
31
34
|
@dataclass(frozen=True)
|
|
@@ -229,12 +232,18 @@ def check_git_remote() -> CheckResult:
|
|
|
229
232
|
reason="no `origin` remote configured",
|
|
230
233
|
remediation="set up the remote with `git remote add origin <url>`",
|
|
231
234
|
)
|
|
235
|
+
url = _redact_git_credentials(out.stdout.strip())
|
|
232
236
|
return CheckResult(
|
|
233
237
|
name="git-remote", passed=True,
|
|
234
|
-
reason=
|
|
238
|
+
reason=url,
|
|
235
239
|
)
|
|
236
240
|
|
|
237
241
|
|
|
242
|
+
def _redact_git_credentials(url: str) -> str:
|
|
243
|
+
"""Strip `user:token@` segments from a remote URL before display."""
|
|
244
|
+
return _GIT_URL_CREDENTIAL_RE.sub("://<redacted-credentials>@", url)
|
|
245
|
+
|
|
246
|
+
|
|
238
247
|
def check_git_clean() -> CheckResult:
|
|
239
248
|
"""Flag uncommitted changes as a WARNING (not blocking)."""
|
|
240
249
|
out = _run(["git", "status", "--porcelain"])
|
package/package.json
CHANGED