-
Notifications
You must be signed in to change notification settings - Fork 0
Release/v5.0.1 #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release/v5.0.1 #28
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧪 PR Review is completed: The PR implements a comprehensive package rename to so.matterai. The changes look mostly consistent, but there are critical security implications in the socket creation logic and potential path mismatches in the build script.
Skipped files
.vscode/tasks.json: Skipped file patternCHANGELOG.md: Skipped file patternDEVELOPMENT.md: Skipped file patternapps/kilocode-docs/docs/extending/development-environment.md: Skipped file patternapps/kilocode-docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/extending/development-environment.md: Skipped file patternjetbrains/README.md: Skipped file pattern
⬇️ Low Priority Suggestions (2)
jetbrains/plugin/build.gradle.kts (1 suggestion)
Location:
jetbrains/plugin/build.gradle.kts(Lines 145-145)🟠 Configuration
Issue: The resource path points to
ai/axoncode(src/main/resources/ai/axoncode/...), but the project packages are being renamed toso.matterai. If the directory structure was also updated to match the package name (which is standard), this path will be incorrect.Fix: Update the path to match the new
so/matteraidirectory structure.Impact: Ensures the build process can correctly locate configuration resources.
- val configDir = File("$projectDir/src/main/resources/ai/axoncode/jetbrains/plugin/config") + val configDir = File("$projectDir/src/main/resources/so/matterai/jetbrains/plugin/config")
jetbrains/plugin/src/main/kotlin/ai/axoncode/jetbrains/core/ExtensionProcessManager.kt (1 suggestion)
Location:
jetbrains/plugin/src/main/kotlin/ai/axoncode/jetbrains/core/ExtensionProcessManager.kt(Lines 349-349)🔵 Code Quality
Issue: Redundant fully qualified name
so.matterai.jetbrains.util.PluginResourceUtil. The class is already imported or available in the classpath context.Fix: Use the simple class name
PluginResourceUtil.Impact: Improves code readability.
- val resourcesPath = so.matterai.jetbrains.util.PluginResourceUtil.getResourcePath(PLUGIN_ID, "$RUNTIME_DIR/$EXTENSION_ENTRY_FILE") + val resourcesPath = PluginResourceUtil.getResourcePath(PLUGIN_ID, "$RUNTIME_DIR/$EXTENSION_ENTRY_FILE")
| // Create temporary socket file, ensure uniqueness | ||
| private fun createSocketFile(): Path { | ||
| val tmpDir = java.nio.file.Paths.get("/tmp") | ||
| val sockPath = Files.createTempFile(tmpDir, "kilocode-idea-extension-ipc-", ".sock") | ||
| val sockPath = Files.createTempFile(tmpDir, "axoncode-idea-extension-ipc-", ".sock") | ||
| Files.deleteIfExists(sockPath) // Ensure it does not exist | ||
| return sockPath | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 Security
Issue: Creating a temporary file in /tmp and then deleting it to reuse the path for a socket introduces a race condition (TOCTOU) and potential security risks (symlink attacks) since /tmp is world-writable.
Fix: Create a private temporary directory using Files.createTempDirectory (which has secure permissions 0700) and place the socket file inside it.
Impact: Prevents local privilege escalation or denial of service attacks via socket hijacking.
| // Create temporary socket file, ensure uniqueness | |
| private fun createSocketFile(): Path { | |
| val tmpDir = java.nio.file.Paths.get("/tmp") | |
| val sockPath = Files.createTempFile(tmpDir, "kilocode-idea-extension-ipc-", ".sock") | |
| val sockPath = Files.createTempFile(tmpDir, "axoncode-idea-extension-ipc-", ".sock") | |
| Files.deleteIfExists(sockPath) // Ensure it does not exist | |
| return sockPath | |
| } | |
| // Create temporary socket file, ensure uniqueness | |
| private fun createSocketFile(): Path { | |
| val socketDir = Files.createTempDirectory("axoncode-ipc") | |
| socketDir.toFile().deleteOnExit() | |
| val sockPath = socketDir.resolve("axoncode-idea-extension-ipc.sock") | |
| sockPath.toFile().deleteOnExit() | |
| return sockPath | |
| } |
No description provided.