diff --git a/tests/testdata/other/sast-scan/contains-sast-violations.sarif b/tests/testdata/other/sast-scan/contains-sast-violations.sarif index f6251a23..81c50172 100644 --- a/tests/testdata/other/sast-scan/contains-sast-violations.sarif +++ b/tests/testdata/other/sast-scan/contains-sast-violations.sarif @@ -3,7 +3,7 @@ { "tool": { "driver": { - "name": "USAF", + "name": "🐸 JFrog SAST", "rules": [ { "id": "python-command-injection", diff --git a/tests/testdata/other/sast-scan/no-violations.sarif b/tests/testdata/other/sast-scan/no-violations.sarif index f9534d60..8f36065b 100644 --- a/tests/testdata/other/sast-scan/no-violations.sarif +++ b/tests/testdata/other/sast-scan/no-violations.sarif @@ -3,7 +3,7 @@ { "tool": { "driver": { - "name": "USAF", + "name": "🐸 JFrog SAST", "rules": [] } }, diff --git a/tests/testdata/output/audit/audit_results.json b/tests/testdata/output/audit/audit_results.json index 65811aa2..8b381201 100644 --- a/tests/testdata/output/audit/audit_results.json +++ b/tests/testdata/output/audit/audit_results.json @@ -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", diff --git a/tests/testdata/output/audit/audit_sarif.json b/tests/testdata/output/audit/audit_sarif.json index 107ecbdf..2c54ce0e 100644 --- a/tests/testdata/output/audit/audit_sarif.json +++ b/tests/testdata/output/audit/audit_sarif.json @@ -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", diff --git a/tests/testdata/projects/jas/jas-config/sast/result.sarif b/tests/testdata/projects/jas/jas-config/sast/result.sarif index c499a4aa..89dea939 100644 --- a/tests/testdata/projects/jas/jas-config/sast/result.sarif +++ b/tests/testdata/projects/jas/jas-config/sast/result.sarif @@ -3,7 +3,7 @@ { "tool": { "driver": { - "name": "USAF", + "name": "🐸 JFrog SAST", "rules": [ { "id": "python-flask-debug", diff --git a/tests/testdata/projects/jas/jas/sast/result.sarif b/tests/testdata/projects/jas/jas/sast/result.sarif index c499a4aa..89dea939 100644 --- a/tests/testdata/projects/jas/jas/sast/result.sarif +++ b/tests/testdata/projects/jas/jas/sast/result.sarif @@ -3,7 +3,7 @@ { "tool": { "driver": { - "name": "USAF", + "name": "🐸 JFrog SAST", "rules": [ { "id": "python-flask-debug", diff --git a/utils/validations/test_validate_sarif.go b/utils/validations/test_validate_sarif.go index a53892c6..8074fffe 100644 --- a/utils/validations/test_validate_sarif.go +++ b/utils/validations/test_validate_sarif.go @@ -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 SastToolName = " JFrog SAST" IacToolName = "JFrog Terraform scanner" // #nosec G101 -- Not credentials. @@ -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,