chore(lint): remove unused pathlib.Path import in llm_actors.py
CI / benchmark-publish (push) Has started running
CI / helm (push) Successful in 40s
CI / push-validation (push) Successful in 39s
CI / benchmark-regression (push) Failing after 49s
CI / build (push) Successful in 1m12s
CI / lint (push) Successful in 1m29s
CI / quality (push) Successful in 1m35s
CI / typecheck (push) Successful in 1m44s
CI / security (push) Successful in 2m4s
CI / e2e_tests (push) Successful in 52s
CI / integration_tests (push) Successful in 5m23s
CI / unit_tests (push) Successful in 6m25s
CI / docker (push) Successful in 1m39s
CI / coverage (push) Successful in 11m21s
CI / status-check (push) Successful in 7s
CI / lint (pull_request) Successful in 1m45s
CI / quality (pull_request) Successful in 1m41s
CI / security (pull_request) Successful in 2m19s
CI / typecheck (pull_request) Successful in 2m46s
CI / build (pull_request) Successful in 38s
CI / helm (pull_request) Successful in 38s
CI / push-validation (pull_request) Successful in 25s
CI / integration_tests (pull_request) Successful in 3m58s
CI / unit_tests (pull_request) Successful in 7m35s
CI / docker (pull_request) Successful in 1m55s
CI / coverage (pull_request) Successful in 15m21s
CI / status-check (pull_request) Successful in 10s
CI / benchmark-publish (push) Has started running
CI / helm (push) Successful in 40s
CI / push-validation (push) Successful in 39s
CI / benchmark-regression (push) Failing after 49s
CI / build (push) Successful in 1m12s
CI / lint (push) Successful in 1m29s
CI / quality (push) Successful in 1m35s
CI / typecheck (push) Successful in 1m44s
CI / security (push) Successful in 2m4s
CI / e2e_tests (push) Successful in 52s
CI / integration_tests (push) Successful in 5m23s
CI / unit_tests (push) Successful in 6m25s
CI / docker (push) Successful in 1m39s
CI / coverage (push) Successful in 11m21s
CI / status-check (push) Successful in 7s
CI / lint (pull_request) Successful in 1m45s
CI / quality (pull_request) Successful in 1m41s
CI / security (pull_request) Successful in 2m19s
CI / typecheck (pull_request) Successful in 2m46s
CI / build (pull_request) Successful in 38s
CI / helm (pull_request) Successful in 38s
CI / push-validation (pull_request) Successful in 25s
CI / integration_tests (pull_request) Successful in 3m58s
CI / unit_tests (pull_request) Successful in 7m35s
CI / docker (pull_request) Successful in 1m55s
CI / coverage (pull_request) Successful in 15m21s
CI / status-check (pull_request) Successful in 10s
This commit was merged in pull request #7801.
This commit is contained in:
@@ -11,7 +11,6 @@ from __future__ import annotations
|
||||
import os
|
||||
import re
|
||||
from datetime import UTC, datetime
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING, Any, Protocol, runtime_checkable
|
||||
|
||||
import structlog
|
||||
@@ -499,14 +498,14 @@ class LLMExecuteActor:
|
||||
for match in pattern.finditer(llm_output):
|
||||
path = match.group(1).strip()
|
||||
content = match.group(2)
|
||||
full_path = os.path.normpath(os.path.join(sandbox_root, path))
|
||||
full_path = os.path.normpath(os.path.join(sandbox_root, path))
|
||||
rel = os.path.relpath(full_path, sandbox_root)
|
||||
# Path traversal guard: reject paths escaping sandbox
|
||||
if rel.startswith(".." + os.sep) or rel == "..":
|
||||
logger.warning(
|
||||
"Rejected path traversal in LLM output",
|
||||
path=path,
|
||||
resolved=str(full_path),
|
||||
resolved=full_path,
|
||||
)
|
||||
continue
|
||||
os.makedirs(os.path.dirname(full_path), exist_ok=True)
|
||||
|
||||
@@ -12,7 +12,6 @@ Based on issue #515 — container-aware tool execution and I/O forwarding.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import posixpath
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user