This repository has been archived by the owner on Nov 6, 2024. It is now read-only.
-
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.
Merge pull request #127 from bridgecrewio/BCE-38714-Analytics-and-ver…
…sion-fixes BCE-38714 - Analytics and version fixes
- Loading branch information
Showing
24 changed files
with
368 additions
and
355 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,69 @@ | ||
package com.bridgecrew | ||
|
||
import com.google.gson.Gson | ||
|
||
val gson = Gson() | ||
|
||
data class VulnerabilityDetails( | ||
val id: String?, | ||
val package_name: String?, | ||
val package_version: String?, | ||
val link: String?, | ||
val description: String?, | ||
val license: String?, | ||
val cvss: Double?, | ||
val lowest_fixed_version: String?, | ||
val published_date: String?, | ||
val vector: String?, | ||
val risk_factors: Map<String, Any>, | ||
val root_package_name: String?, | ||
val root_package_version: String?, | ||
val root_package_fix_version: String?, | ||
val fix_command: FixCommand? | ||
val id: String?, | ||
val package_name: String?, | ||
val package_version: String?, | ||
val link: String?, | ||
val description: String?, | ||
val license: String?, | ||
val cvss: Double?, | ||
val lowest_fixed_version: String?, | ||
val published_date: String?, | ||
val vector: String?, | ||
val risk_factors: Map<String, Any>?, | ||
val root_package_name: String?, | ||
val root_package_version: String?, | ||
val root_package_fix_version: String?, | ||
val fix_command: FixCommand? | ||
) | ||
|
||
data class FixCommand( | ||
val msg: String?, | ||
val cmds: ArrayList<String>, | ||
val manualCodeFix: Boolean | ||
val msg: String?, | ||
val cmds: ArrayList<String>, | ||
val manualCodeFix: Boolean | ||
) | ||
|
||
data class CheckovResult( | ||
val check_id: String, | ||
val bc_check_id: String = "", | ||
val check_name: String, | ||
val file_path: String, | ||
val repo_file_path: String, | ||
var file_abs_path: String, | ||
val file_line_range: ArrayList<Int>, | ||
val resource: String, | ||
val severity: String, | ||
val description: String, | ||
val short_description: String, | ||
val vulnerability_details: VulnerabilityDetails?, | ||
val guideline: String = "\"No Guide\")", | ||
val code_block: List<List<Any>>, | ||
var check_type: String, | ||
val fixed_definition: String = "", | ||
val cwe: ArrayList<String>? = ArrayList(), | ||
val owasp: ArrayList<String>? = ArrayList(), | ||
val metadata: Metadata? = null | ||
) | ||
val check_id: String, | ||
val bc_check_id: String? = "", | ||
val check_name: String, | ||
val file_path: String, | ||
val repo_file_path: String?, | ||
var file_abs_path: String, | ||
val file_line_range: ArrayList<Int>, | ||
val resource: String, | ||
val severity: String, | ||
val description: String?, | ||
val short_description: String?, | ||
val vulnerability_details: VulnerabilityDetails?, | ||
val guideline: String? = "\"No Guide\")", | ||
val code_block: List<List<Any>>, | ||
val fixed_definition: String? = "", | ||
val cwe: ArrayList<String>? = ArrayList(), | ||
val owasp: ArrayList<String>? = ArrayList(), | ||
val metadata: Metadata? = null | ||
) { | ||
lateinit var check_type: String | ||
} | ||
|
||
data class Metadata( | ||
val code_locations: List<DataFlow>?, | ||
val taint_mode: TaintMode? | ||
val code_locations: List<DataFlow>?, | ||
val taint_mode: TaintMode? | ||
) | ||
|
||
data class TaintMode( | ||
val data_flow: List<DataFlow>? | ||
val data_flow: List<DataFlow>? | ||
) | ||
|
||
data class DataFlow( | ||
val path: String, | ||
val start: CodePosition, | ||
val end: CodePosition, | ||
val code_block: String | ||
val path: String, | ||
val start: CodePosition, | ||
val end: CodePosition, | ||
val code_block: String | ||
) | ||
|
||
data class CodePosition( | ||
val row: Int, | ||
val column: Int | ||
val row: Int, | ||
val column: Int | ||
) |
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
56 changes: 28 additions & 28 deletions
56
src/main/kotlin/com/bridgecrew/results/IacCheckovResult.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 |
---|---|---|
@@ -1,31 +1,31 @@ | ||
package com.bridgecrew.results | ||
|
||
class IacCheckovResult( | ||
checkType: CheckType, | ||
filePath: String, | ||
resource: String, | ||
name: String, | ||
id: String, | ||
severity: Severity, | ||
description: String?, | ||
guideline: String?, | ||
absoluteFilePath: String, | ||
fileLineRange: List<Int>, | ||
fixDefinition: String?, | ||
codeBlock: List<List<Any>>, | ||
val checkName: String | ||
) : | ||
BaseCheckovResult( | ||
category = Category.IAC, | ||
checkType, | ||
filePath, | ||
resource, | ||
name, | ||
id, | ||
severity, | ||
description, | ||
guideline, | ||
absoluteFilePath, | ||
fileLineRange, | ||
fixDefinition, | ||
codeBlock) | ||
checkType: CheckType, | ||
filePath: String, | ||
resource: String, | ||
name: String, | ||
id: String, | ||
severity: Severity, | ||
description: String?, | ||
guideline: String?, | ||
absoluteFilePath: String, | ||
fileLineRange: List<Int>, | ||
fixDefinition: String?, | ||
codeBlock: List<List<Any>>, | ||
val checkName: String | ||
) : BaseCheckovResult( | ||
category = Category.IAC, | ||
checkType, | ||
filePath, | ||
resource, | ||
name, | ||
id, | ||
severity, | ||
description, | ||
guideline, | ||
absoluteFilePath, | ||
fileLineRange, | ||
fixDefinition, | ||
codeBlock | ||
) |
Oops, something went wrong.