Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ jobs:
if: ${{ github.event_name == 'workflow_dispatch' }}
env:
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: ./gradlew publishPlugin

# test:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
.gradle
.idea
.intellijPlatform
.env
build

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

## [Unreleased]

- Remove Sentry error tracking
- Update required CLI version to 3.9.2

## [3.0.0] - 2025-11-18

- Add support for IDEs 2025.3
Expand Down
30 changes: 10 additions & 20 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import org.jetbrains.changelog.Changelog
import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.intellij.platform.gradle.TestFrameworkType

fun properties(key: String) = providers.gradleProperty(key)
fun environment(key: String) = providers.environmentVariable(key)
Expand All @@ -10,7 +11,6 @@ plugins {
alias(libs.plugins.gradleIntelliJPlugin) // Gradle IntelliJ Plugin
alias(libs.plugins.changelog) // Gradle Changelog Plugin
alias(libs.plugins.kover) // Gradle Kover Plugin
alias(libs.plugins.sentry)
}

group = properties("pluginGroup").get()
Expand All @@ -36,7 +36,11 @@ dependencies {
// Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
// Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
bundledPlugin("com.intellij.java")

testFramework(TestFrameworkType.Platform)
}

testImplementation("junit:junit:4.13.2")
Comment thread
cycode-security[bot] marked this conversation as resolved.
}

// Set the JVM language level used to build the project. We are using Java 17 for 2022.2+.
Expand Down Expand Up @@ -125,28 +129,15 @@ changelog {
}

// Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration
koverReport {
defaults {
xml {
onCheck = true
kover {
// Disable Kover instrumentation for tests to avoid conflicts with IntelliJ Platform test framework
currentProject {
instrumentation {
disabledForTestTasks.add("test")
}
}
}

// Configure Sentry
sentry {
includeDependenciesReport = false

// Generates a JVM (Java, Kotlin, etc.) source bundle and uploads your source code to Sentry.
// This enables source context, allowing you to see your source
// code as part of your stack traces in Sentry.
includeSourceContext = true

org = "cycode"
projectName = "intellij-platform-plugin"
authToken = environment("SENTRY_AUTH_TOKEN")
}

tasks {
wrapper {
gradleVersion = properties("gradleVersion").get()
Expand Down Expand Up @@ -180,5 +171,4 @@ val runIdeForUiTests by intellijPlatformTesting.runIde.registering {

tasks.named("publishPlugin") {
dependsOn("patchChangelog")
dependsOn("sentryUploadSourceBundleJava")
}
4 changes: 1 addition & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ dokka = "1.9.20"
kotlin = "2.2.0"
changelog = "2.2.1"
gradleIntelliJPlugin = "2.10.4"
kover = "0.7.3"
sentry = "4.11.0"
kover = "0.9.0"

[libraries]
annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" }
Expand All @@ -23,4 +22,3 @@ dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
gradleIntelliJPlugin = { id = "org.jetbrains.intellij.platform", version.ref = "gradleIntelliJPlugin" }
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
sentry = { id = "io.sentry.jvm.gradle", version.ref = "sentry" }
16 changes: 1 addition & 15 deletions src/main/kotlin/com/cycode/plugin/Consts.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.cycode.plugin

import com.cycode.plugin.utils.getPluginVersion
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.util.SystemInfo

Expand All @@ -17,17 +16,11 @@ private fun getDefaultCliPath(): String {
return "${Consts.PLUGIN_PATH}/cycode"
}

private fun getSentryReleaseVersion(): String {
val appName = CycodeBundle.message("appName")
val version = getPluginVersion()
return "$appName@${version}"
}

class Consts {
companion object {
val PLUGIN_PATH = PathManager.getPluginsPath() + "/cycode-intellij-platform-plugin"
val DEFAULT_CLI_PATH = getDefaultCliPath()
const val REQUIRED_CLI_VERSION = "3.6.0"
const val REQUIRED_CLI_VERSION = "3.9.2"

const val CYCODE_DOMAIN = "cycode.com"

Expand All @@ -38,12 +31,5 @@ class Consts {

const val PLUGIN_AUTO_SAVE_FLUSH_INITIAL_DELAY_SEC = 0L
const val PLUGIN_AUTO_SAVE_FLUSH_DELAY_SEC = 5L

const val SENTRY_DSN = "https://0f0524e8d03a4283702a10ed4b6e03d0@o1026942.ingest.us.sentry.io/4507543885774848"
const val SENTRY_DEBUG = false
val SENTRY_RELEASE = getSentryReleaseVersion()
const val SENTRY_SAMPLE_RATE = 1.0
const val SENTRY_SEND_DEFAULT_PII = false
const val SENTRY_ENABLE_UNCAUGHT_EXCEPTION_HANDLER = false
}
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package com.cycode.plugin.activities

import com.cycode.plugin.annotators.CycodeAnnotator
import com.cycode.plugin.sentry.SentryInit
import com.cycode.plugin.services.cycode
import com.intellij.openapi.diagnostic.thisLogger
import com.intellij.openapi.project.Project
import com.intellij.openapi.startup.StartupActivity

class PostStartupActivity : StartupActivity.DumbAware {
override fun runActivity(project: Project) {
SentryInit.init()

// we are using singleton here because runActivity is called for each project
CycodeAnnotator.INSTANCE.registerForAllLangs()

Expand Down
2 changes: 0 additions & 2 deletions src/main/kotlin/com/cycode/plugin/cli/CliWrapper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import com.intellij.execution.process.ProcessOutputTypes
import com.intellij.openapi.diagnostic.thisLogger
import com.intellij.openapi.util.Key
import com.intellij.util.io.BaseOutputReader
import io.sentry.Sentry
import java.io.File
import java.nio.charset.Charset

Expand Down Expand Up @@ -108,7 +107,6 @@ class CliWrapper(val workDirectory: String? = null) {
val result: CliError = mapper.readValue(stdout)
return CliResult.Error(result)
} catch (e: Exception) {
Sentry.captureException(e)
thisLogger().error("Failed to parse ANY CLI output: $stdout", e)
}

Expand Down
78 changes: 0 additions & 78 deletions src/main/kotlin/com/cycode/plugin/sentry/SentryErrorReporter.kt

This file was deleted.

40 changes: 0 additions & 40 deletions src/main/kotlin/com/cycode/plugin/sentry/SentryInit.kt

This file was deleted.

5 changes: 0 additions & 5 deletions src/main/kotlin/com/cycode/plugin/services/CliService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import com.cycode.plugin.cli.models.scanResult.sast.SastScanResult
import com.cycode.plugin.cli.models.scanResult.sca.ScaScanResult
import com.cycode.plugin.cli.models.scanResult.secret.SecretScanResult
import com.cycode.plugin.components.toolWindow.updateToolWindowState
import com.cycode.plugin.sentry.SentryInit
import com.cycode.plugin.utils.CycodeNotifier
import com.cycode.plugin.utils.isValidExistedFilePath
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer
Expand Down Expand Up @@ -111,10 +110,6 @@ class CliService(private val project: Project) {

if (!pluginLocalState.cliAuthed) {
showErrorNotification(CycodeBundle.message("checkAuthErrorNotification"))
} else {
if (processedResult.result.userId != null && processedResult.result.tenantId != null) {
SentryInit.setupScope(processedResult.result.userId, processedResult.result.tenantId)
}
}

return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.cycode.plugin.services
import com.cycode.plugin.utils.verifyFileChecksum
import com.intellij.openapi.components.Service
import com.intellij.openapi.diagnostic.thisLogger
import io.sentry.Sentry
import java.io.BufferedInputStream
import java.io.File
import java.io.FileOutputStream
Expand Down Expand Up @@ -32,7 +31,6 @@ class DownloadService {

return content
} catch (e: Exception) {
Sentry.captureException(e)
thisLogger().error("Failed to download file $e", e)
}

Expand Down Expand Up @@ -90,7 +88,6 @@ class DownloadService {
return file
}
} catch (e: Exception) {
Sentry.captureException(e)
thisLogger().error("Failed to download file $e", e)
} finally {
tempFile.delete()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import com.fasterxml.jackson.databind.PropertyNamingStrategies
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
import com.intellij.openapi.components.Service
import io.sentry.Sentry
import java.net.URI


Expand Down Expand Up @@ -76,7 +75,6 @@ class GithubReleaseService {

null
} catch (e: Exception) {
Sentry.captureException(e)
e.printStackTrace()
null
}
Expand Down
2 changes: 0 additions & 2 deletions src/main/kotlin/com/cycode/plugin/utils/FileChecksum.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.cycode.plugin.utils

import io.sentry.Sentry
import java.io.File
import java.io.FileInputStream
import java.security.MessageDigest
Expand Down Expand Up @@ -39,7 +38,6 @@ fun verifyFileChecksum(file: File, sha256Checksum: String): Boolean {
try {
return sha256Checksum.equals(getFileShaHash(file), ignoreCase = true)
} catch (e: Exception) {
Sentry.captureException(e)
e.printStackTrace()
}

Expand Down
1 change: 0 additions & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<projectConfigurable instance="com.cycode.plugin.settings.ApplicationSettingsConfigurable" groupId="tools"
displayName="Cycode"/>
<notificationGroup id="Cycode" displayType="BALLOON"/>
<errorHandler implementation="com.cycode.plugin.sentry.SentryErrorReporter"/>
</extensions>

<applicationListeners>
Expand Down
3 changes: 0 additions & 3 deletions src/main/resources/messages/CycodeBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ scaScanning=Cycode is scanning files for package vulnerabilities...
iacScanning=Cycode is scanning files for Infrastructure As Code...
sastScanning=Cycode is scanning files for Code Security...
ignoresApplying=Cycode is applying ignores...
sentryReporting=Cycode is reporting the problem...
aiRemediationGenerating=Cycode is generating AI remediation...
# settings menu
settingsCliSectionTitle=Cycode CLI settings
Expand Down Expand Up @@ -139,5 +138,3 @@ toolbarFilterBySeverityAction=Filter by {0} severity
toolbarClearAction=Clear results
toolbarHelpAction=Open documentation
toolbarRunAllAction=Run all scans types for the entire project
# sentry
reportActionButton=Report to Cycode
Comment thread
gotbadger marked this conversation as resolved.