cycode 3.18.1.dev12__py3-none-any.whl → 3.19.1__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.
cycode/__init__.py CHANGED
@@ -5,4 +5,4 @@ import time as _time
5
5
  # end-to-end scan duration from the moment the user actually triggered it.
6
6
  _BOOT_WALL: float = _time.time()
7
7
 
8
- __version__ = '3.18.1.dev12' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
8
+ __version__ = '3.19.1' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
@@ -284,9 +284,13 @@ class ClaudeCode(IDE):
284
284
  def matches_payload(self, raw_payload: dict) -> bool:
285
285
  # transcript_path is a documented Claude Code common field, present on every
286
286
  # hook event. VS Code Copilot emits near-identical payloads (same event names,
287
- # snake_case fields) without it — requiring it keeps those from being
288
- # processed as Claude Code events.
289
- return raw_payload.get('hook_event_name', '') in _CLAUDE_CODE_EVENT_NAMES and 'transcript_path' in raw_payload
287
+ # snake_case fields) — Copilot additionally carries a top-level
288
+ # timestamp, which Claude Code never sends.
289
+ return (
290
+ raw_payload.get('hook_event_name', '') in _CLAUDE_CODE_EVENT_NAMES
291
+ and 'transcript_path' in raw_payload
292
+ and 'timestamp' not in raw_payload
293
+ )
290
294
 
291
295
  def is_synthetic_prompt(self, raw_payload: dict) -> bool:
292
296
  if raw_payload.get('hook_event_name') != 'UserPromptSubmit':
@@ -7,8 +7,9 @@ VS Code payload dialect is parsed here — CLI payloads (camelCase, no event nam
7
7
  are rejected by ``matches_payload`` and fall through to the allow-and-skip path.
8
8
 
9
9
  VS Code sends Claude-style payloads (``hook_event_name``, ``tool_name``,
10
- ``tool_input``) with structural differences that ``matches_payload`` keys on:
11
- a top-level ISO ``timestamp`` and no ``transcript_path``. Copilot hooks have no
10
+ ``tool_input``), told apart by the one field Claude Code never sends: a top-level
11
+ ISO ``timestamp``. VS Code also sends a ``transcript_path`` of its own once a
12
+ workspace has chat history, so that field cannot discriminate. Copilot hooks have no
12
13
  matchers, so ``preToolUse`` fires for every tool; tools we don't scan pass
13
14
  through as raw event names, which match no handler and allow immediately.
14
15
  """
@@ -340,14 +341,9 @@ class Copilot(IDE):
340
341
  }
341
342
 
342
343
  def matches_payload(self, raw_payload: dict) -> bool:
343
- # Structural discrimination, no magic strings: VS Code Copilot events carry
344
- # a top-level ISO timestamp and no transcript_path; real Claude Code events
345
- # always carry transcript_path; Copilot CLI payloads have no hook_event_name.
346
- return (
347
- raw_payload.get('hook_event_name', '') in _COPILOT_SCAN_EVENT_NAMES
348
- and 'timestamp' in raw_payload
349
- and 'transcript_path' not in raw_payload
350
- )
344
+ # Structural discrimination, no magic strings: Copilot events carry a top-level
345
+ # timestamp, Claude Code events never do.
346
+ return raw_payload.get('hook_event_name', '') in _COPILOT_SCAN_EVENT_NAMES and 'timestamp' in raw_payload
351
347
 
352
348
  def parse_hook_payload(self, raw_payload: dict) -> AIHookPayload:
353
349
  hook_event_name = raw_payload.get('hook_event_name', '')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cycode
3
- Version: 3.18.1.dev12
3
+ Version: 3.19.1
4
4
  Summary: Boost security in your dev lifecycle via SAST, SCA, Secrets & IaC scanning.
5
5
  License-Expression: MIT
6
6
  License-File: LICENCE
@@ -1,4 +1,4 @@
1
- cycode/__init__.py,sha256=zMJKhyCoXPBdRRVjxH5barhGcjZuNsbtdJFelBCgU34,397
1
+ cycode/__init__.py,sha256=rbFo89m_h6k6bXgLEUuPhYX3rOY7Jfn2cz0XFXA-UMM,391
2
2
  cycode/__main__.py,sha256=Z3bD5yrA7yPvAChcADQrqCaZd0ChGI1gdiwALwbWJ6U,104
3
3
  cycode/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  cycode/cli/app.py,sha256=AlR2durAEbsa47PDfIj7JtMvJDWA_Dq6wPtVuMJYSCs,10250
@@ -11,9 +11,9 @@ cycode/cli/apps/ai_guardrails/hooks_manager.py,sha256=_8EjjpaDoeUrlh6gDXechWyev0
11
11
  cycode/cli/apps/ai_guardrails/ides/__init__.py,sha256=9FPz984poZWPX6S6abuo-PThiXgJ_WpoUv47wiSXnKQ,2639
12
12
  cycode/cli/apps/ai_guardrails/ides/_plugin_utils.py,sha256=XPIc9pZFEgdGVTSSAl9yqI48F88GKlFnJ5FsLUhHjCE,3981
13
13
  cycode/cli/apps/ai_guardrails/ides/base.py,sha256=RZintDpwWgl0l1cBVKccG4ek1jkTMuzRJ-hq91V5ehc,8224
14
- cycode/cli/apps/ai_guardrails/ides/claude_code.py,sha256=ejLGzuVxrnVNOToJl--7HaTFTDI_N3jru8ZC8K0iIo8,15086
14
+ cycode/cli/apps/ai_guardrails/ides/claude_code.py,sha256=Am8NXgcU18ediboI5oSBocftmzbETdEh3-ScnAv0k54,15172
15
15
  cycode/cli/apps/ai_guardrails/ides/codex.py,sha256=1nI0TPeCgg2zI1PCVmLi0GouD8HGwGoa6RsIshDDa9c,11972
16
- cycode/cli/apps/ai_guardrails/ides/copilot.py,sha256=xjY3jceCwSjFxVygmFwyawXEQT2CVvmiQHYMMA03wXY,19038
16
+ cycode/cli/apps/ai_guardrails/ides/copilot.py,sha256=NMppvjDN50bgCRycUS5eoan47nWUXt5JL8jAGtTgHv8,18920
17
17
  cycode/cli/apps/ai_guardrails/ides/cursor.py,sha256=-Jr76dD8m2xwvb0i93LtwjaloB_oon0OjBUPkv1K6f0,5633
18
18
  cycode/cli/apps/ai_guardrails/install_command.py,sha256=faNM-5SPpuaKA-9kQ2IdOq9jxJipRfykielgbHk5l-k,4299
19
19
  cycode/cli/apps/ai_guardrails/scan/__init__.py,sha256=qJc82XiQGiAuc1sYY8Ij_A-qXpxgLPuayQq8xWlouMA,48
@@ -211,8 +211,8 @@ cycode/cyclient/report_client.py,sha256=Scq30NeJPzgXv0hPLO1U05AdE9i_2iu6cIrSKpEJ
211
211
  cycode/cyclient/scan_client.py,sha256=6TK5FQkfrvV7PHqRnUzEn1PBNd2oPYVamvIixcUfe3c,16755
212
212
  cycode/cyclient/scan_config_base.py,sha256=mXsPZGYCtp85rv5GIige40yQZXuRcEKUW-VQJ0vgFzk,1201
213
213
  cycode/logger.py,sha256=EfZGRK6VC5rE_LAjIcRrHFiQCueylCDXoG6bvGkrIME,2111
214
- cycode-3.18.1.dev12.dist-info/METADATA,sha256=FkOBJfmlA4SwEjC5ucA-K3I5tH_GE7d8d4K3HpnF9f0,91053
215
- cycode-3.18.1.dev12.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
216
- cycode-3.18.1.dev12.dist-info/entry_points.txt,sha256=iDcVJM8ByLElVgvBgtYxDjw1kT7O8Mo0LcWZIT5L3Ig,45
217
- cycode-3.18.1.dev12.dist-info/licenses/LICENCE,sha256=2Wx4N6mD_4xB7-E3hPkZ3MPhpJy__k_I8MaCSO-PDRo,1068
218
- cycode-3.18.1.dev12.dist-info/RECORD,,
214
+ cycode-3.19.1.dist-info/METADATA,sha256=blUYJrXWNzNzE-XSFHB8CbxkquEb5Bcb0WhjqB-6e-A,91047
215
+ cycode-3.19.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
216
+ cycode-3.19.1.dist-info/entry_points.txt,sha256=iDcVJM8ByLElVgvBgtYxDjw1kT7O8Mo0LcWZIT5L3Ig,45
217
+ cycode-3.19.1.dist-info/licenses/LICENCE,sha256=2Wx4N6mD_4xB7-E3hPkZ3MPhpJy__k_I8MaCSO-PDRo,1068
218
+ cycode-3.19.1.dist-info/RECORD,,