-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CM-40433 - Fix missed markdown blocks on violation cards
- Loading branch information
Showing
19 changed files
with
146 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...tentTab/sastViolationCardContentTab/components/companyGuidelines/SastCompanyGuidelines.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.cycode.plugin.components.toolWindow.components.violationCardContentTab.sastViolationCardContentTab.components.companyGuidelines | ||
|
||
import com.cycode.plugin.CycodeBundle | ||
import com.cycode.plugin.cli.models.scanResult.sast.SastDetection | ||
import com.cycode.plugin.components.toolWindow.components.violationCardContentTab.common.htmlSummary.CardHtmlSummary | ||
import com.cycode.plugin.components.toolWindow.components.violationCardContentTab.convertMarkdownToHtml | ||
import javax.swing.JComponent | ||
|
||
class SastCompanyGuidelines : CardHtmlSummary() { | ||
private fun getCustomGuidelines(detection: SastDetection): String? { | ||
val descriptionMarkdown = detection.detectionDetails.customRemediationGuidelines ?: return null | ||
return convertMarkdownToHtml(descriptionMarkdown) | ||
} | ||
|
||
fun getContent(detection: SastDetection): JComponent { | ||
return getContent( | ||
CycodeBundle.message("violationCardCompanyGuidelinesTitle"), | ||
getCustomGuidelines(detection) | ||
) | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...ontentTab/sastViolationCardContentTab/components/cycodeGuidelines/SastCycodeGuidelines.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.cycode.plugin.components.toolWindow.components.violationCardContentTab.sastViolationCardContentTab.components.cycodeGuidelines | ||
|
||
import com.cycode.plugin.CycodeBundle | ||
import com.cycode.plugin.cli.models.scanResult.sast.SastDetection | ||
import com.cycode.plugin.components.toolWindow.components.violationCardContentTab.common.htmlSummary.CardHtmlSummary | ||
import com.cycode.plugin.components.toolWindow.components.violationCardContentTab.convertMarkdownToHtml | ||
import javax.swing.JComponent | ||
|
||
class SastCycodeGuidelines : CardHtmlSummary() { | ||
private fun getCycodeGuidelines(detection: SastDetection): String? { | ||
val descriptionMarkdown = detection.detectionDetails.remediationGuidelines ?: return null | ||
return convertMarkdownToHtml(descriptionMarkdown) | ||
} | ||
|
||
fun getContent(detection: SastDetection): JComponent { | ||
return getContent( | ||
CycodeBundle.message("violationCardCycodeGuidelinesTitle"), | ||
getCycodeGuidelines(detection) | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...ontentTab/scaViolationCardContentTab/components/companyGuidelines/ScaCompanyGuidelines.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.cycode.plugin.components.toolWindow.components.violationCardContentTab.scaViolationCardContentTab.components.companyGuidelines | ||
|
||
import com.cycode.plugin.CycodeBundle | ||
import com.cycode.plugin.cli.models.scanResult.sca.ScaDetection | ||
import com.cycode.plugin.components.toolWindow.components.violationCardContentTab.common.htmlSummary.CardHtmlSummary | ||
import com.cycode.plugin.components.toolWindow.components.violationCardContentTab.convertMarkdownToHtml | ||
import javax.swing.JComponent | ||
|
||
class ScaCompanyGuidelines : CardHtmlSummary() { | ||
private fun getCustomGuidelines(detection: ScaDetection): String? { | ||
val descriptionMarkdown = detection.detectionDetails.customRemediationGuidelines ?: return null | ||
return convertMarkdownToHtml(descriptionMarkdown) | ||
} | ||
|
||
fun getContent(detection: ScaDetection): JComponent { | ||
return getContent( | ||
CycodeBundle.message("violationCardCompanyGuidelinesTitle"), | ||
getCustomGuidelines(detection) | ||
) | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...dContentTab/scaViolationCardContentTab/components/cycodeGuidelines/ScaCycodeGuidelines.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.cycode.plugin.components.toolWindow.components.violationCardContentTab.scaViolationCardContentTab.components.cycodeGuidelines | ||
|
||
import com.cycode.plugin.CycodeBundle | ||
import com.cycode.plugin.cli.models.scanResult.sca.ScaDetection | ||
import com.cycode.plugin.components.toolWindow.components.violationCardContentTab.common.htmlSummary.CardHtmlSummary | ||
import com.cycode.plugin.components.toolWindow.components.violationCardContentTab.convertMarkdownToHtml | ||
import javax.swing.JComponent | ||
|
||
class ScaCycodeGuidelines : CardHtmlSummary() { | ||
private fun getCycodeGuidelines(detection: ScaDetection): String? { | ||
val descriptionMarkdown = detection.detectionDetails.remediationGuidelines ?: return null | ||
return convertMarkdownToHtml(descriptionMarkdown) | ||
} | ||
|
||
fun getContent(detection: ScaDetection): JComponent { | ||
return getContent( | ||
CycodeBundle.message("violationCardCycodeGuidelinesTitle"), | ||
getCycodeGuidelines(detection) | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...ntTab/secretViolationCardContentTab/components/cycodeGuidelines/SecretCycodeGuidelines.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.cycode.plugin.components.toolWindow.components.violationCardContentTab.secretViolationCardContentTab.components.cycodeGuidelines | ||
|
||
import com.cycode.plugin.CycodeBundle | ||
import com.cycode.plugin.cli.models.scanResult.secret.SecretDetection | ||
import com.cycode.plugin.components.toolWindow.components.violationCardContentTab.common.htmlSummary.CardHtmlSummary | ||
import com.cycode.plugin.components.toolWindow.components.violationCardContentTab.convertMarkdownToHtml | ||
import javax.swing.JComponent | ||
|
||
class SecretCycodeGuidelines : CardHtmlSummary() { | ||
private fun getCycodeGuidelines(detection: SecretDetection): String? { | ||
val descriptionMarkdown = detection.detectionDetails.remediationGuidelines ?: return null | ||
return convertMarkdownToHtml(descriptionMarkdown) | ||
} | ||
|
||
fun getContent(detection: SecretDetection): JComponent { | ||
return getContent( | ||
CycodeBundle.message("violationCardCycodeGuidelinesTitle"), | ||
getCycodeGuidelines(detection) | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters