Compare commits

...

24 Commits

Author SHA1 Message Date
Mohamed Hegazy
66a63f2c43 security-guidance: probe for a non-PATH 3.10+ interpreter on HOOK_PY_INCOMPATIBLE (2.0.6 → 2.0.7)
Instrument-first for the macOS Python-3.9 cohort.

v2.0.6 telemetry: ~13.6% of macOS sessions (~6,337 users) run on Apple's
Python 3.9 → HOOK_PY_INCOMPATIBLE → the agentic reviewer can't load (needs
3.10+ syntax). That's ~12x macOS's build-failure rate and the single
biggest macOS degradation. sg-python.sh only probes `python3.1x` on PATH,
so these users have nothing newer ON PATH — but they may still have a
3.10+ installed at a standard location that isn't on the hook's PATH
(Homebrew /opt/homebrew, python.org framework, etc.).

Before building an explicit-path interpreter search, size the RECOVERABLE
fraction: `_probe_alt_python()` checks Homebrew / python.org / distro
locations for a 3.10+ binary and emits the highest found as `sdk_alt_py`
(major*100+minor, or 0 = genuinely 3.9-only). Telemetry-only; probed ONLY
on the HOOK_PY_INCOMPATIBLE path, so healthy sessions never run it.

After a data cycle: non-zero sdk_alt_py = recoverable by an explicit-path
search in sg-python.sh; 0 = needs a user-side Python install (the one-time
notice is the only lever). That decides whether the search is worth building.

Verified locally on macOS Python 3.13:
  - py_compile clean; probe returns 314 on this Mac (homebrew 3.14 present).
  - 7 new tests (test_altpython_probe.py): highest-version selection,
    0-when-none (mocked os.access), framework/distro path parsing, only
    counts 3.10+, and emit gated on outcome==HOOK_PY_INCOMPATIBLE.
  - Full suite 575/575 + 2 skipped.

No behavior change — purely additive telemetry on the incompatible path.
Version 2.0.6 -> 2.0.7 per the per-PR-bump policy (#2114).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-15 12:57:33 -07:00
abibbs-ant
ad34eb0fa6 Merge pull request #2852 from anthropics/add-lovable
Add lovable plugin
2026-06-15 11:35:09 -07:00
github-actions[bot]
6ff128bdcc bump(sap-fiori-mcp-server): b204616c → 384fb88f (#2847)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:19:34 -05:00
github-actions[bot]
0ea860bff1 bump(adobe-for-creativity): cdf87381 → c467bf83 (#2831)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:19:10 -05:00
github-actions[bot]
c6335cc27b bump(aws-startup-advisor): 944e5b17 → 3eae1312 (#2832)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:18:44 -05:00
github-actions[bot]
2d25650f94 bump(carta-cap-table): 9de95825 → 5e119d78 (#2834)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:18:18 -05:00
github-actions[bot]
1e37280cf9 bump(datarobot-agent-skills): 9e12eca2 → 6937e65a (#2840)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:17:54 -05:00
github-actions[bot]
75c62a9197 bump(migration-to-aws): 944e5b17 → 3eae1312 (#2842)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:17:29 -05:00
github-actions[bot]
999e8e0c57 bump(carta-crm): 9de95825 → 5e119d78 (#2835)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:17:03 -05:00
Bryan Thompson
00667be766 Add lovable plugin 2026-06-15 13:17:01 -05:00
github-actions[bot]
41fc10261c bump(carta-investors): 9de95825 → 5e119d78 (#2836)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:16:35 -05:00
github-actions[bot]
2cba8f077a bump(nvidia-skills): 5b2a1e80 → b0c4c9ab (#2843)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:16:07 -05:00
github-actions[bot]
ce64e6bf3c bump(vibe-prospecting): aa5903f5 → 14cb2971 (#2850)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:15:39 -05:00
github-actions[bot]
554d4cb80e bump(azure): 966330ee → 82492494 (#2833)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:15:18 -05:00
github-actions[bot]
e5f6c09bcb bump(cloudflare): e16d698f → 8ff55f2a (#2837)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:15:10 -05:00
github-actions[bot]
658af9f960 bump(codspeed): 32229fdf → 9e21a9c0 (#2838)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:14:41 -05:00
github-actions[bot]
e2debd8290 bump(dash0): 19f4a5f9 → e1a46f08 (#2839)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:14:11 -05:00
github-actions[bot]
25ceefbdb5 bump(hyperframes): b158870d → 3b3ece81 (#2841)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:13:39 -05:00
github-actions[bot]
ea6c6c54bf bump(posthog): fd9992ff → 071b9b84 (#2844)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:13:08 -05:00
github-actions[bot]
8796a01308 bump(rc): 473fd504 → e0470e8f (#2845)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:12:37 -05:00
github-actions[bot]
ff082f171c bump(revenuecat): 473fd504 → e0470e8f (#2846)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:12:05 -05:00
github-actions[bot]
de0381871c bump(sentry): d65bd23b → 765cca46 (#2848)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:11:32 -05:00
github-actions[bot]
9738aaa20d bump(sonarqube): 5434d7f5 → 25460dd5 (#2849)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:10:58 -05:00
github-actions[bot]
2f345cc812 bump(wix): a62c26eb → 561315d2 (#2851)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:10:23 -05:00
3 changed files with 85 additions and 23 deletions

View File

@@ -35,7 +35,7 @@
"url": "https://github.com/adobe/skills.git",
"path": "plugins/creative-cloud/adobe-for-creativity",
"ref": "main",
"sha": "cdf8738152076ea5850354c1a3de21d88e377c2e"
"sha": "c467bf831064ebda26f39dd30c02d7cce03eb26c"
},
"homepage": "https://github.com/adobe/skills/tree/main/plugins/creative-cloud/adobe-for-creativity"
},
@@ -381,7 +381,7 @@
"url": "https://github.com/awslabs/startups.git",
"path": "advisor/plugins/aws-startup-advisor",
"ref": "main",
"sha": "944e5b17bb4b6a84a76b6382e3f5d7fa9abd7bbd"
"sha": "3eae13125da8cc923f010b19321137efd0e69a66"
},
"homepage": "https://github.com/awslabs/startups"
},
@@ -392,7 +392,7 @@
"source": {
"source": "url",
"url": "https://github.com/microsoft/azure-skills.git",
"sha": "966330ee4fc61978b6e324993687e917125a1f36"
"sha": "82492494405b948c8422766ddae390714bbd78ed"
},
"homepage": "https://github.com/microsoft/azure-skills"
},
@@ -502,7 +502,7 @@
"url": "https://github.com/carta/plugins.git",
"path": "plugins/carta-cap-table",
"ref": "main",
"sha": "9de95825cd0eef06abc819e99591270ce5a77e95"
"sha": "5e119d7848e1f495092df4e41ac43e609e3293d1"
},
"homepage": "https://carta.com"
},
@@ -518,7 +518,7 @@
"url": "https://github.com/carta/plugins.git",
"path": "plugins/carta-crm",
"ref": "main",
"sha": "9de95825cd0eef06abc819e99591270ce5a77e95"
"sha": "5e119d7848e1f495092df4e41ac43e609e3293d1"
},
"homepage": "https://carta.com"
},
@@ -534,7 +534,7 @@
"url": "https://github.com/carta/plugins.git",
"path": "plugins/carta-investors",
"ref": "main",
"sha": "9de95825cd0eef06abc819e99591270ce5a77e95"
"sha": "5e119d7848e1f495092df4e41ac43e609e3293d1"
},
"homepage": "https://carta.com"
},
@@ -720,7 +720,7 @@
"source": {
"source": "url",
"url": "https://github.com/cloudflare/skills.git",
"sha": "e16d698f6be2beb3a100138ac7eb072499bf429f"
"sha": "8ff55f2a574f498bbf89675279d92b7a61f4d521"
},
"description": "Skills for the Cloudflare developer platform: Workers, Durable Objects, Agents SDK, MCP servers, Wrangler CLI, and web performance.",
"category": "deployment",
@@ -804,7 +804,7 @@
"source": {
"source": "url",
"url": "https://github.com/CodSpeedHQ/codspeed.git",
"sha": "32229fdfb99928e5e946b8b53c26f4696fdbda09"
"sha": "9e21a9c0415c848d1c6d7e66c221f7524433899d"
},
"homepage": "https://codspeed.io"
},
@@ -918,7 +918,7 @@
"source": {
"source": "url",
"url": "https://github.com/dash0hq/dash0-agent-plugin.git",
"sha": "19f4a5f96306bd316a124fcf35d56d54d8f99aa1"
"sha": "e1a46f085171787382465b7148070da36127119f"
},
"homepage": "https://dash0.com/"
},
@@ -1022,7 +1022,7 @@
"source": {
"source": "url",
"url": "https://github.com/datarobot-oss/datarobot-agent-skills.git",
"sha": "9e12eca2a8246674aaa6d7bc3b6cf267163d932e"
"sha": "6937e65a4f652ecc08b8b53bd7e79f6e3d1f69b3"
},
"homepage": "https://datarobot.com"
},
@@ -1361,7 +1361,7 @@
"source": {
"source": "url",
"url": "https://github.com/heygen-com/hyperframes.git",
"sha": "b158870d8f1cd2241d00eb46fa0d2d1c2aa9dfb7"
"sha": "3b3ece81d1a0b36038e67e58d9ca620e4a3122e9"
},
"homepage": "https://hyperframes.heygen.com"
},
@@ -1572,6 +1572,20 @@
},
"homepage": "https://github.com/gemini-cli-extensions/looker"
},
{
"name": "lovable",
"description": "Build, iterate on, deploy, and manage Lovable apps from Claude Code. Bundles the official Lovable MCP server (remote, OAuth 2.1) and adds focused commands for the common build/iterate/database workflows, with credit- and publish-safety prompts.",
"author": {
"name": "Lovable"
},
"category": "development",
"source": {
"source": "url",
"url": "https://github.com/lovablelabs/mcp.git",
"sha": "9321737a737cf719db44c8124507f75e0bd0d270"
},
"homepage": "https://lovable.dev"
},
{
"name": "lua-lsp",
"description": "Lua language server for code intelligence",
@@ -1722,7 +1736,7 @@
"url": "https://github.com/awslabs/startups.git",
"path": "migrate/plugins/migration-to-aws",
"ref": "main",
"sha": "944e5b17bb4b6a84a76b6382e3f5d7fa9abd7bbd"
"sha": "3eae13125da8cc923f010b19321137efd0e69a66"
},
"homepage": "https://github.com/awslabs/startups"
},
@@ -1853,7 +1867,7 @@
"url": "https://github.com/NVIDIA/skills.git",
"path": "plugins/nvidia-skills",
"ref": "main",
"sha": "5b2a1e80d0e03fc3c9f60e69a727cdfcc9ab8d4c"
"sha": "b0c4c9abca3e0b493d96a1574c9678daf086c4b5"
},
"homepage": "https://github.com/NVIDIA/skills"
},
@@ -2009,7 +2023,7 @@
"source": {
"source": "url",
"url": "https://github.com/PostHog/ai-plugin.git",
"sha": "fd9992ff9f74b97ae8cd4a21e69d07687c5369ca"
"sha": "071b9b841a987aa93409d4db1499237a5120bc63"
},
"homepage": "https://posthog.com/docs/model-context-protocol"
},
@@ -2177,7 +2191,7 @@
"source": "url",
"url": "https://github.com/RevenueCat/rc-claude-code-plugin.git",
"path": "revenuecat",
"sha": "473fd504bf13d25e76bf4a0267b42be3794f6266"
"sha": "e0470e8f5413decb0dc67156057b4b5cfc6df447"
},
"homepage": "https://www.revenuecat.com"
},
@@ -2229,7 +2243,7 @@
"source": "url",
"url": "https://github.com/RevenueCat/rc-claude-code-plugin.git",
"path": "revenuecat",
"sha": "473fd504bf13d25e76bf4a0267b42be3794f6266"
"sha": "e0470e8f5413decb0dc67156057b4b5cfc6df447"
},
"homepage": "https://www.revenuecat.com"
},
@@ -2362,7 +2376,7 @@
"url": "https://github.com/SAP/open-ux-tools.git",
"path": "packages/fiori-mcp-server",
"ref": "main",
"sha": "b204616c3622abdd40e18c4c1fc09c397978d9e2"
"sha": "384fb88f5b4662ec0f7e1ac81689ebccaa9d7cb8"
},
"homepage": "https://github.com/SAP/open-ux-tools/tree/main/packages/fiori-mcp-server"
},
@@ -2401,7 +2415,7 @@
{
"name": "security-guidance",
"description": "Security review for Claude-generated code. Pattern-based warnings on edits, LLM-powered diff review on Stop, and an agentic commit reviewer that catches injection, XSS, SSRF, hardcoded secrets, and 25+ other vulnerability classes.",
"version": "2.0.6",
"version": "2.0.7",
"author": {
"name": "Anthropic",
"email": "support@anthropic.com"
@@ -2429,7 +2443,7 @@
"source": {
"source": "url",
"url": "https://github.com/getsentry/sentry-for-claude.git",
"sha": "d65bd23b6779a30564ff2bd3ee6d35746dab86fb"
"sha": "765cca4683e77271900fdf3521a555a04528baaf"
},
"homepage": "https://github.com/getsentry/sentry-for-claude/tree/main"
},
@@ -2562,7 +2576,7 @@
"source": {
"source": "url",
"url": "https://github.com/SonarSource/sonarqube-agent-plugins.git",
"sha": "5434d7f5cf7aa6e04ff491d59ae98ed6cda64bd0"
"sha": "25460dd53961fb4dba3c4b9026b29dfbbd3d87e0"
},
"homepage": "https://www.sonarsource.com"
},
@@ -2870,7 +2884,7 @@
"source": {
"source": "url",
"url": "https://github.com/explorium-ai/vibeprospecting-plugin.git",
"sha": "aa5903f52d79e7f2a5f9c324c6fff7d5a5d92631"
"sha": "14cb2971a99661382f5a56a9caa7c2d526c4e444"
},
"homepage": "https://www.vibeprospecting.ai/product/claude-plugin"
},
@@ -2895,7 +2909,7 @@
"source": {
"source": "url",
"url": "https://github.com/wix/skills.git",
"sha": "a62c26eb185e5dc1cc05fef27ddf654a68e15165"
"sha": "561315d22a49544d6518d3a753973d3a95dfafcc"
},
"homepage": "https://dev.wix.com/docs/wix-cli/guides/development/about-wix-skills"
},

View File

@@ -1,6 +1,6 @@
{
"name": "security-guidance",
"version": "2.0.6",
"version": "2.0.7",
"description": "Security review for Claude-generated code. Pattern-based warnings on edits, LLM-powered diff review on Stop, and an agentic commit reviewer that catches injection, XSS, SSRF, hardcoded secrets, and 25+ other vulnerability classes.",
"author": {
"name": "David Dworken",

View File

@@ -318,6 +318,46 @@ def _probe_has_pip() -> bool:
return False
def _probe_alt_python() -> int:
"""When the hook interpreter is <3.10 (HOOK_PY_INCOMPATIBLE), look for a
3.10+ interpreter at well-known install locations that aren't necessarily
on the hook's PATH — Homebrew (/opt/homebrew, /usr/local), python.org
framework builds, and the `py`/distro layouts. Returns the HIGHEST version
found encoded as major*100+minor (e.g. 312), or 0 if none.
Purpose (telemetry only, for now): size how many of the macOS Python-3.9
cohort actually HAVE a newer interpreter that sg-python.sh's PATH probe
missed — i.e. how many are RECOVERABLE by an explicit-path search vs.
genuinely 3.9-only. Emitted as sdk_alt_py. Existence-checks the versioned
binaries (cheap); a later explicit-path search would version-verify before
exec'ing. Probed only on the incompatible path, so healthy sessions never
pay for it."""
candidates = []
for minor in (14, 13, 12, 11, 10):
candidates += [
f"/opt/homebrew/bin/python3.{minor}", # Apple-Silicon Homebrew
f"/usr/local/bin/python3.{minor}", # Intel Homebrew / python.org shim
f"/Library/Frameworks/Python.framework/Versions/3.{minor}/bin/python3", # python.org
f"/usr/bin/python3.{minor}", # distro-managed (Linux)
]
best = 0
for path in candidates:
try:
if os.access(path, os.X_OK):
# path name encodes the minor; parse it back to a code
base = os.path.basename(path)
minor = None
if base.startswith("python3."):
minor = int(base.split(".")[1])
elif "/Versions/3." in path:
minor = int(path.split("/Versions/3.")[1].split("/")[0])
if minor is not None:
best = max(best, 300 + minor)
except (OSError, ValueError, IndexError):
continue
return best
def _pip_err_from_stderr(stderr_b):
"""Categorize a pip-install stderr into a known err_kind (the pip subset
of SDK_BOOTSTRAP_ERR_CODES). Used by the --target fallback; mirrors the
@@ -788,6 +828,14 @@ if __name__ == "__main__":
# per healthy session.
if _encode_err_kind(err_kind) == 11:
metrics["sdk_has_pip"] = _probe_has_pip()
# When the hook interpreter is <3.10 (HOOK_PY_INCOMPATIBLE), probe for a
# 3.10+ interpreter at known non-PATH locations. Non-zero sdk_alt_py =
# this user is RECOVERABLE by an explicit-path search in sg-python.sh; 0 =
# genuinely 3.9-only (needs a user install). Sizes the macOS Py-3.9 cohort
# (~13.6% of macOS sessions) before we build the search. Incompatible path
# only — healthy sessions never run it.
if outcome == HOOK_PY_INCOMPATIBLE:
metrics["sdk_alt_py"] = _probe_alt_python()
# Interpreter version (major*100 + minor, e.g. 309 / 312), emitted on
# every bootstrap. Disambiguates the macOS cohort (Apple 3.9 vs a 3.10+
# with broken ensurepip) for both venv_ensurepip_fail AND