-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
database: feature - add RawQuery function on write_interface.go (#160)
Signed-off-by: Ian Cardoso <[email protected]>
- Loading branch information
1 parent
f6a11a5
commit 7c2ae24
Showing
5 changed files
with
135 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,17 +40,18 @@ type Vulnerability struct { | |
Language languages.Language `json:"language" gorm:"Column:language" example:"Leaks" enums:"Go,C#,Dart,Ruby,Python,Java,Kotlin,Javascript,Typescript,Leaks,HCL,C,PHP,HTML,Generic,YAML,Elixir,Shell,Nginx"` | ||
Severity severities.Severity `json:"severity" gorm:"Column:severity" example:"CRITICAL" enums:"CRITICAL, HIGH, MEDIUM, LOW, INFO"` | ||
Type vulnerability.Type `json:"type" gorm:"Column:type" example:"Vulnerability" enums:"Vulnerability, Risk Accepted, False Positive, Corrected"` | ||
CWEs []string `json:"-" gorm:"-" example:"[\"https://cwe.mitre.org/data/definitions/000.html\"]"` | ||
CVEs []string `json:"-" gorm:"-" example:"[\"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-0000-00000\"]"` | ||
Mitigation string `json:"-" gorm:"-" example:"Use a secret manager or environment variable"` | ||
Reference string `json:"-" gorm:"-" example:"https://example.com"` | ||
SafeExample string `json:"-" gorm:"-" example:"setPassword(env.get(\"HORUSEC_PASSWORD\"))"` | ||
UnsafeExample string `json:"-" gorm:"-" example:"setPassword(\"s@f3P@a$$w0rd\")"` | ||
CommitAuthor string `json:"commitAuthor" gorm:"Column:commit_author" example:"horusec"` | ||
CommitEmail string `json:"commitEmail" gorm:"Column:commit_email" example:"[email protected]"` | ||
CommitHash string `json:"commitHash" gorm:"Column:commit_hash" example:"a21fa164c00a15f3e91f5ee6659cb6a793b39a8d"` | ||
CommitMessage string `json:"commitMessage" gorm:"Column:commit_message" example:"Initial commit"` | ||
CommitDate string `json:"commitDate" gorm:"Column:commit_date" example:"2021-12-30"` | ||
|
||
CWEs []string `json:"-" gorm:"-" example:"[\"https://cwe.mitre.org/data/definitions/000.html\"]"` | ||
CVEs []string `json:"-" gorm:"-" example:"[\"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-0000-00000\"]"` | ||
Mitigation string `json:"-" gorm:"-" example:"Use a secret manager or environment variable"` | ||
Reference string `json:"-" gorm:"-" example:"https://example.com"` | ||
SafeExample string `json:"-" gorm:"-" example:"setPassword(env.get(\"HORUSEC_PASSWORD\"))"` | ||
UnsafeExample string `json:"-" gorm:"-" example:"setPassword(\"s@f3P@a$$w0rd\")"` | ||
CommitAuthor string `json:"commitAuthor" gorm:"Column:commit_author" example:"horusec"` | ||
CommitEmail string `json:"commitEmail" gorm:"Column:commit_email" example:"[email protected]"` | ||
CommitHash string `json:"commitHash" gorm:"Column:commit_hash" example:"a21fa164c00a15f3e91f5ee6659cb6a793b39a8d"` | ||
CommitMessage string `json:"commitMessage" gorm:"Column:commit_message" example:"Initial commit"` | ||
CommitDate string `json:"commitDate" gorm:"Column:commit_date" example:"2021-12-30"` | ||
|
||
// RuleID is the rule id used to generate Vulnerability. | ||
// This field can bem empty if Vulnerability was not generated from horusec-engine. | ||
|
@@ -66,8 +67,8 @@ type Vulnerability struct { | |
// TODO: This will be removed after the release v2.10.0 of the Horusec CLI be released. | ||
DeprecatedHashes []string `json:"deprecatedHashes" gorm:"-" example:""` | ||
|
||
SecurityToolVersion string `json:"securityToolVersion"` | ||
SecurityToolInfoURI string `json:"securityToolInfoUri"` | ||
SecurityToolVersion string `json:"securityToolVersion" gorm:"-"` | ||
SecurityToolInfoURI string `json:"securityToolInfoUri" gorm:"-"` | ||
} | ||
|
||
func (v *Vulnerability) GetTable() string { | ||
|
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