From a38b872ca7b0857985e897f3016370e60e9cc5b6 Mon Sep 17 00:00:00 2001 From: TylerJang27 <42743566+TylerJang27@users.noreply.github.com> Date: Wed, 3 Apr 2024 10:25:29 -0700 Subject: [PATCH] Auto add snapshots --- .../trufflehog_git_v3.72.0_CUSTOM.check.shot | 43 +++++++++++++++ .../trufflehog_v3.72.0_buff_size.check.shot | 31 +++++++++++ .../trufflehog_v3.72.0_secrets.check.shot | 43 +++++++++++++++ ...lehog_v3.72.0_wrong_line_number.check.shot | 54 +++++++++++++++++++ 4 files changed, 171 insertions(+) create mode 100644 linters/trufflehog/test_data/trufflehog_git_v3.72.0_CUSTOM.check.shot create mode 100644 linters/trufflehog/test_data/trufflehog_v3.72.0_buff_size.check.shot create mode 100644 linters/trufflehog/test_data/trufflehog_v3.72.0_secrets.check.shot create mode 100644 linters/trufflehog/test_data/trufflehog_v3.72.0_wrong_line_number.check.shot diff --git a/linters/trufflehog/test_data/trufflehog_git_v3.72.0_CUSTOM.check.shot b/linters/trufflehog/test_data/trufflehog_git_v3.72.0_CUSTOM.check.shot new file mode 100644 index 000000000..ef6b700b9 --- /dev/null +++ b/linters/trufflehog/test_data/trufflehog_git_v3.72.0_CUSTOM.check.shot @@ -0,0 +1,43 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter trufflehog-git test CUSTOM 1`] = ` +{ + "issues": [ + { + "code": "URI", + "file": ".", + "isSecurity": true, + "issueClass": "ISSUE_CLASS_NEW", + "level": "LEVEL_HIGH", + "linter": "trufflehog-git", + "message": "secrets.in.py:8: Secret detected: https://admin:********@the-internet.herokuapp.com on commit (file since deleted)", + "targetType": "ALL", + }, + { + "code": "URI", + "file": "secrets2.in.py", + "isSecurity": true, + "issueClass": "ISSUE_CLASS_NEW", + "level": "LEVEL_HIGH", + "line": "8", + "linter": "trufflehog-git", + "message": "Secret detected: https://admin:********@the-internet.herokuapp.com on commit ", + "targetType": "ALL", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "trufflehog-git", + "paths": [ + ".", + ], + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/trufflehog/test_data/trufflehog_v3.72.0_buff_size.check.shot b/linters/trufflehog/test_data/trufflehog_v3.72.0_buff_size.check.shot new file mode 100644 index 000000000..da6cc9615 --- /dev/null +++ b/linters/trufflehog/test_data/trufflehog_v3.72.0_buff_size.check.shot @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter trufflehog test buff_size 1`] = ` +{ + "issues": [], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "trufflehog", + "paths": [ + "test_data/buff_size.in.cc", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "trufflehog", + "paths": [ + "test_data/buff_size.in.cc", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/trufflehog/test_data/trufflehog_v3.72.0_secrets.check.shot b/linters/trufflehog/test_data/trufflehog_v3.72.0_secrets.check.shot new file mode 100644 index 000000000..76fde58b1 --- /dev/null +++ b/linters/trufflehog/test_data/trufflehog_v3.72.0_secrets.check.shot @@ -0,0 +1,43 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter trufflehog test secrets 1`] = ` +{ + "issues": [ + { + "code": "URI", + "file": "test_data/secrets.in.py", + "isSecurity": true, + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "line": "8", + "linter": "trufflehog", + "message": "Secret detected: https://admin:********@the-internet.herokuapp.com", + "targetType": "ALL", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "trufflehog", + "paths": [ + "test_data/secrets.in.py", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "trufflehog", + "paths": [ + "test_data/secrets.in.py", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/trufflehog/test_data/trufflehog_v3.72.0_wrong_line_number.check.shot b/linters/trufflehog/test_data/trufflehog_v3.72.0_wrong_line_number.check.shot new file mode 100644 index 000000000..97b99d614 --- /dev/null +++ b/linters/trufflehog/test_data/trufflehog_v3.72.0_wrong_line_number.check.shot @@ -0,0 +1,54 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter trufflehog test wrong_line_number 1`] = ` +{ + "issues": [ + { + "code": "URI", + "file": "test_data/wrong_line_number.in.ts", + "isSecurity": true, + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "line": "587", + "linter": "trufflehog", + "message": "Secret detected: https://admin:********@the-internet.herokuapp.com", + "targetType": "ALL", + }, + { + "code": "URI", + "file": "test_data/wrong_line_number.in.ts", + "isSecurity": true, + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "line": "592", + "linter": "trufflehog", + "message": "Secret detected: https://admin:********@the-internet.herokuapp.com", + "targetType": "ALL", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "trufflehog", + "paths": [ + "test_data/wrong_line_number.in.ts", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "trufflehog", + "paths": [ + "test_data/wrong_line_number.in.ts", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`;