Skip to content

Commit a4f6b76

Browse files
committed
Merge branch 'main' into CM-65100-add-file-handling-for-mcps
2 parents 8262f1e + d53991b commit a4f6b76

15 files changed

Lines changed: 648 additions & 680 deletions

File tree

.github/workflows/build_executable.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
steps:
3939
- name: Run Cimon
4040
if: matrix.os == 'ubuntu-22.04'
41-
uses: cycodelabs/cimon-action@3ca67e875f34772093aa3bf3c185a711720bf5d9 # v0.10.1
41+
uses: cycodelabs/cimon-action@a0870cc3d9e3bf3cedd28bdb67bf3fd3281e5941 # v1.0.1
4242
with:
4343
client-id: ${{ secrets.CIMON_CLIENT_ID }}
4444
secret: ${{ secrets.CIMON_SECRET }}
@@ -265,7 +265,7 @@ jobs:
265265
run: echo "ARTIFACT_NAME=$(./process_executable_file.py dist/cycode-cli)" >> $GITHUB_ENV
266266

267267
- name: Upload files as artifact
268-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
268+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
269269
with:
270270
name: ${{ env.ARTIFACT_NAME }}
271271
path: dist
@@ -313,7 +313,7 @@ jobs:
313313
314314
- name: Upload files to release
315315
if: ${{ github.event_name == 'workflow_dispatch' && inputs.publish }}
316-
uses: svenstaro/upload-release-action@b98a3b12e86552593f3e4e577ca8a62aa2f3f22b # v2
316+
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # v2
317317
with:
318318
file: dist/*
319319
tag: ${{ env.LATEST_TAG }}

.github/workflows/docker-image.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
- name: Build and push
7777
id: docker_build
7878
if: ${{ github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v') }}
79-
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
79+
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
8080
with:
8181
context: .
8282
platforms: linux/amd64,linux/arm64
@@ -86,7 +86,7 @@ jobs:
8686
- name: Verify build
8787
id: docker_verify_build
8888
if: ${{ github.event_name != 'workflow_dispatch' && !startsWith(github.ref, 'refs/tags/v') }}
89-
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
89+
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
9090
with:
9191
context: .
9292
platforms: linux/amd64,linux/arm64

.github/workflows/pre_release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: Run Cimon
18-
uses: cycodelabs/cimon-action@3ca67e875f34772093aa3bf3c185a711720bf5d9 # v0.10.1
18+
uses: cycodelabs/cimon-action@a0870cc3d9e3bf3cedd28bdb67bf3fd3281e5941 # v1.0.1
1919
with:
2020
client-id: ${{ secrets.CIMON_CLIENT_ID }}
2121
secret: ${{ secrets.CIMON_SECRET }}
@@ -74,4 +74,4 @@ jobs:
7474
run: poetry build
7575

7676
- name: Publish a Python distribution to PyPI
77-
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
77+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
steps:
1616
- name: Run Cimon
17-
uses: cycodelabs/cimon-action@3ca67e875f34772093aa3bf3c185a711720bf5d9 # v0.10.1
17+
uses: cycodelabs/cimon-action@a0870cc3d9e3bf3cedd28bdb67bf3fd3281e5941 # v1.0.1
1818
with:
1919
client-id: ${{ secrets.CIMON_CLIENT_ID }}
2020
secret: ${{ secrets.CIMON_SECRET }}
@@ -73,4 +73,4 @@ jobs:
7373
run: poetry build
7474

7575
- name: Publish a Python distribution to PyPI
76-
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
76+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0

.github/workflows/ruff.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Run Cimon
13-
uses: cycodelabs/cimon-action@3ca67e875f34772093aa3bf3c185a711720bf5d9 # v0.10.1
13+
uses: cycodelabs/cimon-action@a0870cc3d9e3bf3cedd28bdb67bf3fd3281e5941 # v1.0.1
1414
with:
1515
client-id: ${{ secrets.CIMON_CLIENT_ID }}
1616
secret: ${{ secrets.CIMON_SECRET }}

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
steps:
1313
- name: Run Cimon
14-
uses: cycodelabs/cimon-action@3ca67e875f34772093aa3bf3c185a711720bf5d9 # v0.10.1
14+
uses: cycodelabs/cimon-action@a0870cc3d9e3bf3cedd28bdb67bf3fd3281e5941 # v1.0.1
1515
with:
1616
client-id: ${{ secrets.CIMON_CLIENT_ID }}
1717
secret: ${{ secrets.CIMON_SECRET }}

.github/workflows/tests_full.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
steps:
2525
- name: Run Cimon
2626
if: matrix.os == 'ubuntu-latest'
27-
uses: cycodelabs/cimon-action@3ca67e875f34772093aa3bf3c185a711720bf5d9 # v0.10.1
27+
uses: cycodelabs/cimon-action@a0870cc3d9e3bf3cedd28bdb67bf3fd3281e5941 # v1.0.1
2828
with:
2929
client-id: ${{ secrets.CIMON_CLIENT_ID }}
3030
secret: ${{ secrets.CIMON_SECRET }}

cycode/cli/apps/ai_guardrails/ides/claude_code.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ def render_hooks_config(self, async_mode: bool = False) -> dict:
240240
'hooks': {
241241
'SessionStart': [
242242
{
243-
'matcher': 'startup|clear',
244243
'hooks': [{'type': 'command', 'command': _SESSION_START_COMMAND}],
245244
}
246245
],

cycode/cli/apps/ai_guardrails/ides/codex.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ def render_hooks_config(self, async_mode: bool = False) -> dict:
202202
'hooks': {
203203
'SessionStart': [
204204
{
205-
'matcher': 'startup|clear',
206205
'hooks': [{'type': 'command', 'command': _SESSION_START_COMMAND}],
207206
}
208207
],

cycode/cli/apps/mcp/mcp_command.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import uuid
99
from typing import Annotated, Any, Optional
1010

11+
import anyio
1112
import typer
1213
from pathvalidate import sanitize_filepath
1314
from pydantic import Field
@@ -65,6 +66,7 @@ def _get_current_executable() -> str:
6566
return 'cycode'
6667

6768

69+
# ruff: disable[ASYNC109]
6870
async def _run_cycode_command(*args: str, timeout: int = _DEFAULT_RUN_COMMAND_TIMEOUT) -> dict[str, Any]:
6971
"""Run a cycode command asynchronously and return the parsed result.
7072
@@ -109,6 +111,9 @@ async def _run_cycode_command(*args: str, timeout: int = _DEFAULT_RUN_COMMAND_TI
109111
return {'error': f'Failed to run command: {e!s}'}
110112

111113

114+
# ruff: enable[ASYNC109]
115+
116+
112117
def _sanitize_file_path(file_path: str) -> str:
113118
"""Sanitize file path to prevent path traversal and other security issues.
114119
@@ -238,7 +243,7 @@ async def _cycode_scan_tool(
238243

239244
try:
240245
if paths:
241-
missing = [p for p in paths if not os.path.exists(p)]
246+
missing = [p for p in paths if not await anyio.Path(p).exists()]
242247
if missing:
243248
return json.dumps({'error': f'Paths not found on disk: {missing}'}, indent=2)
244249

0 commit comments

Comments
 (0)