Skip to content

Commit

Permalink
added frog emoji to sast tool name
Browse files Browse the repository at this point in the history
  • Loading branch information
hadarshjfrog committed Oct 22, 2024
1 parent 6c07edc commit 3d8e770
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"tool": {
"driver": {
"name": "USAF",
"name": "🐸 JFrog SAST",
"rules": [
{
"id": "python-command-injection",
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/other/sast-scan/no-violations.sarif
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"tool": {
"driver": {
"name": "USAF",
"name": "🐸 JFrog SAST",
"rules": []
}
},
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/output/audit/audit_results.json
Original file line number Diff line number Diff line change
Expand Up @@ -2204,7 +2204,7 @@
"tool": {
"driver": {
"informationUri": "https://docs.jfrog-applications.jfrog.io/jfrog-security-features/sast",
"name": "USAF",
"name": "🐸 JFrog SAST",
"rules": [
{
"id": "js-express-without-helmet",
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/output/audit/audit_sarif.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
"tool": {
"driver": {
"informationUri": "https://docs.jfrog-applications.jfrog.io/jfrog-security-features/sast",
"name": "USAF",
"name": "🐸 JFrog SAST",
"rules": [
{
"id": "js-express-without-helmet",
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/projects/jas/jas-config/sast/result.sarif
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"tool": {
"driver": {
"name": "USAF",
"name": "🐸 JFrog SAST",
"rules": [
{
"id": "python-flask-debug",
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/projects/jas/jas/sast/result.sarif
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"tool": {
"driver": {
"name": "USAF",
"name": "🐸 JFrog SAST",
"rules": [
{
"id": "python-flask-debug",
Expand Down
10 changes: 6 additions & 4 deletions utils/validations/test_validate_sarif.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

const (
//TODO: Validate if we need a frog emoji before the name
//SastToolName has a 🐸 in the beginning - but the stdout of the IDE doesn't show it - so removed 🐸 for tests

Check failure on line 18 in utils/validations/test_validate_sarif.go

View workflow job for this annotation

GitHub Actions / Static-Check

commentFormatting: put a space between `//` and comment text (gocritic)
SastToolName = " JFrog SAST"
IacToolName = "JFrog Terraform scanner"
// #nosec G101 -- Not credentials.
Expand Down Expand Up @@ -93,9 +93,11 @@ func ValidateSarifIssuesCount(t *testing.T, params ValidationParams, report *sar

for _, run := range sastRuns {
for _, rule := range run.Tool.Driver.Rules {
ValidateContent(t, false,
StringValidation{Expected: params.SastDescSuffix, Actual: *rule.ShortDescription.Text, Msg: "rule description does not contain expected substring"},
)
if params.SastDescSuffix != "" {
ValidateContent(t, false,
StringValidation{Expected: params.SastDescSuffix, Actual: *rule.ShortDescription.Text, Msg: "rule description does not contain expected substring"},
)
}
}
}
ValidateContent(t, params.ExactResultsMatch,
Expand Down

0 comments on commit 3d8e770

Please sign in to comment.