From f365c86f8cfe0130b616db9cd3b3b4a46ca11e6f Mon Sep 17 00:00:00 2001 From: Tyler Jang Date: Tue, 7 Nov 2023 16:01:58 -0800 Subject: [PATCH] Bump trufflehog KGV (#551) Some older versions _can_ vary between platforms (wasn't seeing this locally, only in CI) in the issues they report for `--only-verified` (particularly SSH keys). See [here](https://github.com/trunk-io/plugins/actions/runs/6781616544/job/18432247238). The latest versions appear to pretty stable when it comes to this. Bump the KGV and remove old snapshots to get tests passing. --- linters/trufflehog/plugin.yaml | 6 +-- .../trufflehog_git_v3.40.0_CUSTOM.check.shot | 42 ------------------- .../trufflehog_git_v3.49.0_CUSTOM.check.shot | 42 ------------------- .../trufflehog_v3.31.3_buff_size.check.shot | 20 --------- .../trufflehog_v3.31.3_secrets.check.shot | 31 -------------- .../trufflehog_v3.40.0_buff_size.check.shot | 20 --------- .../trufflehog_v3.40.0_secrets.check.shot | 31 -------------- .../trufflehog_v3.49.0_buff_size.check.shot | 20 --------- .../trufflehog_v3.49.0_secrets.check.shot | 31 -------------- 9 files changed, 3 insertions(+), 240 deletions(-) delete mode 100644 linters/trufflehog/test_data/trufflehog_git_v3.40.0_CUSTOM.check.shot delete mode 100644 linters/trufflehog/test_data/trufflehog_git_v3.49.0_CUSTOM.check.shot delete mode 100644 linters/trufflehog/test_data/trufflehog_v3.31.3_buff_size.check.shot delete mode 100644 linters/trufflehog/test_data/trufflehog_v3.31.3_secrets.check.shot delete mode 100644 linters/trufflehog/test_data/trufflehog_v3.40.0_buff_size.check.shot delete mode 100644 linters/trufflehog/test_data/trufflehog_v3.40.0_secrets.check.shot delete mode 100644 linters/trufflehog/test_data/trufflehog_v3.49.0_buff_size.check.shot delete mode 100644 linters/trufflehog/test_data/trufflehog_v3.49.0_secrets.check.shot diff --git a/linters/trufflehog/plugin.yaml b/linters/trufflehog/plugin.yaml index 00f4f03a0..4ff554d74 100644 --- a/linters/trufflehog/plugin.yaml +++ b/linters/trufflehog/plugin.yaml @@ -15,13 +15,13 @@ tools: - name: trufflehog download: trufflehog shims: [trufflehog] - known_good_version: 3.31.3 + known_good_version: 3.59.0 lint: definitions: - name: trufflehog files: [ALL] tools: [trufflehog] - known_good_version: 3.31.3 + known_good_version: 3.59.0 known_bad_versions: [3.41.0, 3.45.0, 3.60.1, 3.60.2] commands: - name: lint @@ -47,7 +47,7 @@ lint: - name: trufflehog-git files: [ALL] download: trufflehog - known_good_version: 3.40.0 + known_good_version: 3.59.0 known_bad_versions: [3.41.0, 3.60.1, 3.60.2] hold_the_line: false commands: diff --git a/linters/trufflehog/test_data/trufflehog_git_v3.40.0_CUSTOM.check.shot b/linters/trufflehog/test_data/trufflehog_git_v3.40.0_CUSTOM.check.shot deleted file mode 100644 index 58b9a36af..000000000 --- a/linters/trufflehog/test_data/trufflehog_git_v3.40.0_CUSTOM.check.shot +++ /dev/null @@ -1,42 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -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_git_v3.49.0_CUSTOM.check.shot b/linters/trufflehog/test_data/trufflehog_git_v3.49.0_CUSTOM.check.shot deleted file mode 100644 index 58b9a36af..000000000 --- a/linters/trufflehog/test_data/trufflehog_git_v3.49.0_CUSTOM.check.shot +++ /dev/null @@ -1,42 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -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.31.3_buff_size.check.shot b/linters/trufflehog/test_data/trufflehog_v3.31.3_buff_size.check.shot deleted file mode 100644 index d5320b578..000000000 --- a/linters/trufflehog/test_data/trufflehog_v3.31.3_buff_size.check.shot +++ /dev/null @@ -1,20 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -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", - }, - ], - "taskFailures": [], - "unformattedFiles": [], -} -`; diff --git a/linters/trufflehog/test_data/trufflehog_v3.31.3_secrets.check.shot b/linters/trufflehog/test_data/trufflehog_v3.31.3_secrets.check.shot deleted file mode 100644 index e798aa71d..000000000 --- a/linters/trufflehog/test_data/trufflehog_v3.31.3_secrets.check.shot +++ /dev/null @@ -1,31 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Testing linter trufflehog test secrets 1`] = ` -{ - "issues": [ - { - "code": "URI", - "file": "test_data/secrets.in.py", - "isSecurity": true, - "level": "LEVEL_HIGH", - "line": "1", - "linter": "trufflehog", - "message": "Secret detected: https://********:********@the-internet.herokuapp.com", - "targetType": "ALL", - }, - ], - "lintActions": [ - { - "command": "lint", - "fileGroupName": "ALL", - "linter": "trufflehog", - "paths": [ - "test_data/secrets.in.py", - ], - "verb": "TRUNK_VERB_CHECK", - }, - ], - "taskFailures": [], - "unformattedFiles": [], -} -`; diff --git a/linters/trufflehog/test_data/trufflehog_v3.40.0_buff_size.check.shot b/linters/trufflehog/test_data/trufflehog_v3.40.0_buff_size.check.shot deleted file mode 100644 index d5320b578..000000000 --- a/linters/trufflehog/test_data/trufflehog_v3.40.0_buff_size.check.shot +++ /dev/null @@ -1,20 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -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", - }, - ], - "taskFailures": [], - "unformattedFiles": [], -} -`; diff --git a/linters/trufflehog/test_data/trufflehog_v3.40.0_secrets.check.shot b/linters/trufflehog/test_data/trufflehog_v3.40.0_secrets.check.shot deleted file mode 100644 index bce997576..000000000 --- a/linters/trufflehog/test_data/trufflehog_v3.40.0_secrets.check.shot +++ /dev/null @@ -1,31 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Testing linter trufflehog test secrets 1`] = ` -{ - "issues": [ - { - "code": "URI", - "file": "test_data/secrets.in.py", - "isSecurity": true, - "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", - }, - ], - "taskFailures": [], - "unformattedFiles": [], -} -`; diff --git a/linters/trufflehog/test_data/trufflehog_v3.49.0_buff_size.check.shot b/linters/trufflehog/test_data/trufflehog_v3.49.0_buff_size.check.shot deleted file mode 100644 index d5320b578..000000000 --- a/linters/trufflehog/test_data/trufflehog_v3.49.0_buff_size.check.shot +++ /dev/null @@ -1,20 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -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", - }, - ], - "taskFailures": [], - "unformattedFiles": [], -} -`; diff --git a/linters/trufflehog/test_data/trufflehog_v3.49.0_secrets.check.shot b/linters/trufflehog/test_data/trufflehog_v3.49.0_secrets.check.shot deleted file mode 100644 index bce997576..000000000 --- a/linters/trufflehog/test_data/trufflehog_v3.49.0_secrets.check.shot +++ /dev/null @@ -1,31 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Testing linter trufflehog test secrets 1`] = ` -{ - "issues": [ - { - "code": "URI", - "file": "test_data/secrets.in.py", - "isSecurity": true, - "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", - }, - ], - "taskFailures": [], - "unformattedFiles": [], -} -`;