cycode 3.21.1.dev1__py3-none-any.whl → 3.21.1.dev2__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.21.1.dev1' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
8
+ __version__ = '3.21.1.dev2' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
@@ -334,6 +334,7 @@ def build_ai_guardrails_scan_parameters(
334
334
  'device_hostname': get_hostname(),
335
335
  'conversation_id': payload.conversation_id,
336
336
  'generation_id': payload.generation_id,
337
+ 'hook_event_id': payload.hook_event_id,
337
338
  'ide_user_email': payload.ide_user_email,
338
339
  'mcp_server_name': payload.mcp_server_name,
339
340
  'mcp_tool_name': payload.mcp_tool_name,
@@ -5,7 +5,8 @@ The dataclass is populated by `IDE.parse_hook_payload` (see
5
5
  respective IDE class.
6
6
  """
7
7
 
8
- from dataclasses import dataclass
8
+ import uuid
9
+ from dataclasses import dataclass, field
9
10
  from typing import Optional
10
11
 
11
12
 
@@ -18,6 +19,11 @@ class AIHookPayload:
18
19
  conversation_id: Optional[str] = None
19
20
  generation_id: Optional[str] = None
20
21
 
22
+ # Minted here rather than by the server: the guardrail scan and the hook event are reported in two
23
+ # separate requests, and both have to name the same event. A generation id can't stand in for it - the
24
+ # IDE mints one per prompt, so several hook events share it, and some IDEs don't supply one at all.
25
+ hook_event_id: str = field(default_factory=lambda: str(uuid.uuid4()))
26
+
21
27
  # User and IDE information
22
28
  ide_user_email: Optional[str] = None
23
29
  model: Optional[str] = None
@@ -73,6 +73,7 @@ class AISecurityManagerClient:
73
73
  return
74
74
 
75
75
  body = {
76
+ 'id': payload.hook_event_id,
76
77
  'conversation_id': conversation_id,
77
78
  'event_type': event_type,
78
79
  'outcome': outcome,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cycode
3
- Version: 3.21.1.dev1
3
+ Version: 3.21.1.dev2
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=htdvpKIXenhWNKmcCjAPYIz5jBNX7d8CmSMKOjdvR7s,396
1
+ cycode/__init__.py,sha256=0d9RphCTO-JQSW7Zg-SN6YeEycagOwtleA6xMhCfVfg,396
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
@@ -18,8 +18,8 @@ cycode/cli/apps/ai_guardrails/ides/cursor.py,sha256=-Jr76dD8m2xwvb0i93LtwjaloB_o
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
20
20
  cycode/cli/apps/ai_guardrails/scan/consts.py,sha256=drAslw6vW3kxmbCs2qPCUbUPR7PJouT2lsXtu5sD-lQ,1094
21
- cycode/cli/apps/ai_guardrails/scan/handlers.py,sha256=Tu22oCiKAGbNLbypwS7_tUQ5d7O-aYIecKCD7IRgc80,17800
22
- cycode/cli/apps/ai_guardrails/scan/payload.py,sha256=pvT3UUqNMvdK3EVzzPjy4JMlOrF-WgxZ3fHN2AtN5eA,1126
21
+ cycode/cli/apps/ai_guardrails/scan/handlers.py,sha256=m0Jpd9AMjuUBj7ry3w_S8sslCiTMv6szBmMzdl3sE_M,17848
22
+ cycode/cli/apps/ai_guardrails/scan/payload.py,sha256=sWsWq5yXP54MVCajsb180kLuprI_M2kspMOzQGh7r_o,1534
23
23
  cycode/cli/apps/ai_guardrails/scan/policy.py,sha256=BZoNNdDQ9tqnfwhB4X1-bDtudaOQc_gXizm3IVwa28o,3351
24
24
  cycode/cli/apps/ai_guardrails/scan/scan_command.py,sha256=Hs3vkYJztufulFci2N0RNSU6L5UzPMeepts4YgOYggQ,7005
25
25
  cycode/cli/apps/ai_guardrails/scan/types.py,sha256=ybQm242QN0l_4SSNX4xMHXxzqEK-MW-hfIOixI7zvGU,1497
@@ -193,7 +193,7 @@ cycode/cli/utils/version_checker.py,sha256=0f5PaTk02ZkDxzBqZOeMV9mU_CWcx6HKW80jU
193
193
  cycode/cli/utils/yaml_utils.py,sha256=ty4FlwrM49OoYSMv8U6ZGlB0JRds8nxaijHQZebBVoU,2991
194
194
  cycode/config.py,sha256=jHORGZQcAXkAGSf2XreC-RQoc8sdNWja69QKtPWTbWo,1044
195
195
  cycode/cyclient/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
196
- cycode/cyclient/ai_security_manager_client.py,sha256=K3fvBC_d-8iDnVnMSVPXiDtuuapiWGT2xg1Kx203XU0,4808
196
+ cycode/cyclient/ai_security_manager_client.py,sha256=C74tmzCF220eEcv-WdK8aVv-zjsL-R4cXg4q54YkV74,4849
197
197
  cycode/cyclient/ai_security_manager_service_config.py,sha256=83pQzgOb93JW6E-dznJkI4c0NEXmQRlx9YZKMmjVwp8,808
198
198
  cycode/cyclient/auth_client.py,sha256=TwbmZ358Ancf-Q-IZolvfljZ8691_6botsqd0R0PLPk,2105
199
199
  cycode/cyclient/base_token_auth_client.py,sha256=mn5580d7A8Z2_zcdFKIJk78ADK7mViwTcV-4QCpRCGo,4369
@@ -214,8 +214,8 @@ cycode/cyclient/report_client.py,sha256=Scq30NeJPzgXv0hPLO1U05AdE9i_2iu6cIrSKpEJ
214
214
  cycode/cyclient/scan_client.py,sha256=DqAZ7u6Z_cvw9A9RlLkAQUgLRwPCCAsUq5U9umt4F7Y,16955
215
215
  cycode/cyclient/scan_config_base.py,sha256=mXsPZGYCtp85rv5GIige40yQZXuRcEKUW-VQJ0vgFzk,1201
216
216
  cycode/logger.py,sha256=EfZGRK6VC5rE_LAjIcRrHFiQCueylCDXoG6bvGkrIME,2111
217
- cycode-3.21.1.dev1.dist-info/METADATA,sha256=U4JTLURiQLgKgiwr59nTaFaBXcv2bpBpLN5aZ6m84QU,93596
218
- cycode-3.21.1.dev1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
219
- cycode-3.21.1.dev1.dist-info/entry_points.txt,sha256=iDcVJM8ByLElVgvBgtYxDjw1kT7O8Mo0LcWZIT5L3Ig,45
220
- cycode-3.21.1.dev1.dist-info/licenses/LICENCE,sha256=2Wx4N6mD_4xB7-E3hPkZ3MPhpJy__k_I8MaCSO-PDRo,1068
221
- cycode-3.21.1.dev1.dist-info/RECORD,,
217
+ cycode-3.21.1.dev2.dist-info/METADATA,sha256=SZUhuPtfBDcWU7f4m2MMTTZKLHxKKxd-aP-3aRQ-Mbs,93596
218
+ cycode-3.21.1.dev2.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
219
+ cycode-3.21.1.dev2.dist-info/entry_points.txt,sha256=iDcVJM8ByLElVgvBgtYxDjw1kT7O8Mo0LcWZIT5L3Ig,45
220
+ cycode-3.21.1.dev2.dist-info/licenses/LICENCE,sha256=2Wx4N6mD_4xB7-E3hPkZ3MPhpJy__k_I8MaCSO-PDRo,1068
221
+ cycode-3.21.1.dev2.dist-info/RECORD,,