From 298f8f771ff69d53ec2d1dfdd03c9af77f145f9a Mon Sep 17 00:00:00 2001 From: TylerJang27 <42743566+TylerJang27@users.noreply.github.com> Date: Fri, 10 Jul 2026 11:48:09 +0000 Subject: [PATCH] Auto add snapshots --- .../biome_v2.5.3_basic_check.check.shot | 62 ++++++ .../test_data/biome_v2.5.3_basic_fmt.fmt.shot | 22 ++ .../biome_v2.5.3_basic_json.fmt.shot | 7 + .../biome_v2.5.3_gitignore_check.check.shot | 40 ++++ .../biome_v2.5.3_warning_check.check.shot | 52 +++++ .../test_data/cspell_v10.0.1_basic.check.shot | 88 ++++++++ .../cspell_v10.0.1_dictionary.check.shot | 88 ++++++++ .../djlint_v1.40.4_logout.check.shot | 50 +++++ .../test_data/djlint_v1.40.4_logout.fmt.shot | 12 + .../grype_v0.115.0_fs-vuln.check.shot | 31 +++ ...markdownlint_cli2_v0.23.0_basic.check.shot | 44 ++++ .../7.26.0_CUSTOM.check.shot | 123 +++++++++++ .../prettier_v3.9.5_basic.check.shot | 31 +++ .../test_data/prettier_v3.9.5_basic.fmt.shot | 35 +++ .../prettier_v3.9.5_error.check.shot | 33 +++ .../test_data/prettier_v3.9.5_error.fmt.shot | 45 ++++ .../ruff_nbqa_v0.15.21_basic_nb.check.shot | 50 +++++ .../test_data/ruff_v0.15.21_basic.check.shot | 101 +++++++++ .../ruff_v0.15.21_basic_nb.check.shot | 55 +++++ .../test_data/ruff_v0.15.21_format.fmt.shot | 14 ++ .../ruff_v0.15.21_interface.check.shot | 209 ++++++++++++++++++ .../test_data/ruff_v0.15.21_syntax.check.shot | 44 ++++ .../trufflehog_git_v3.95.9_CUSTOM.check.shot | 43 ++++ .../trufflehog_v3.95.9_buff_size.check.shot | 31 +++ .../trufflehog_v3.95.9_secrets.check.shot | 43 ++++ ...lehog_v3.95.9_wrong_line_number.check.shot | 43 ++++ .../zizmor_v1.26.1_CUSTOM.check.shot | 112 ++++++++++ 27 files changed, 1508 insertions(+) create mode 100644 linters/biome/test_data/biome_v2.5.3_basic_check.check.shot create mode 100644 linters/biome/test_data/biome_v2.5.3_basic_fmt.fmt.shot create mode 100644 linters/biome/test_data/biome_v2.5.3_basic_json.fmt.shot create mode 100644 linters/biome/test_data/biome_v2.5.3_gitignore_check.check.shot create mode 100644 linters/biome/test_data/biome_v2.5.3_warning_check.check.shot create mode 100644 linters/cspell/test_data/cspell_v10.0.1_basic.check.shot create mode 100644 linters/cspell/test_data/cspell_v10.0.1_dictionary.check.shot create mode 100644 linters/djlint/test_data/djlint_v1.40.4_logout.check.shot create mode 100644 linters/djlint/test_data/djlint_v1.40.4_logout.fmt.shot create mode 100644 linters/grype/test_data/grype_v0.115.0_fs-vuln.check.shot create mode 100644 linters/markdownlint-cli2/test_data/markdownlint_cli2_v0.23.0_basic.check.shot create mode 100644 linters/pmd/test_data/pmd_vpmd_releases/7.26.0_CUSTOM.check.shot create mode 100644 linters/prettier/test_data/prettier_v3.9.5_basic.check.shot create mode 100644 linters/prettier/test_data/prettier_v3.9.5_basic.fmt.shot create mode 100644 linters/prettier/test_data/prettier_v3.9.5_error.check.shot create mode 100644 linters/prettier/test_data/prettier_v3.9.5_error.fmt.shot create mode 100644 linters/ruff/test_data/ruff_nbqa_v0.15.21_basic_nb.check.shot create mode 100644 linters/ruff/test_data/ruff_v0.15.21_basic.check.shot create mode 100644 linters/ruff/test_data/ruff_v0.15.21_basic_nb.check.shot create mode 100644 linters/ruff/test_data/ruff_v0.15.21_format.fmt.shot create mode 100644 linters/ruff/test_data/ruff_v0.15.21_interface.check.shot create mode 100644 linters/ruff/test_data/ruff_v0.15.21_syntax.check.shot create mode 100644 linters/trufflehog/test_data/trufflehog_git_v3.95.9_CUSTOM.check.shot create mode 100644 linters/trufflehog/test_data/trufflehog_v3.95.9_buff_size.check.shot create mode 100644 linters/trufflehog/test_data/trufflehog_v3.95.9_secrets.check.shot create mode 100644 linters/trufflehog/test_data/trufflehog_v3.95.9_wrong_line_number.check.shot create mode 100644 linters/zizmor/test_data/zizmor_v1.26.1_CUSTOM.check.shot diff --git a/linters/biome/test_data/biome_v2.5.3_basic_check.check.shot b/linters/biome/test_data/biome_v2.5.3_basic_check.check.shot new file mode 100644 index 000000000..ec61a6cfe --- /dev/null +++ b/linters/biome/test_data/biome_v2.5.3_basic_check.check.shot @@ -0,0 +1,62 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter biome test basic_check 1`] = ` +{ + "issues": [ + { + "code": "lint/correctness/noUnusedVariables", + "column": "7", + "file": "test_data/basic_check.in.ts", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "line": "6", + "linter": "biome", + "message": "This variable foo is unused.", + "targetType": "typescript", + }, + ], + "lintActions": [ + { + "command": "fmt", + "fileGroupName": "typescript", + "linter": "biome", + "paths": [ + "test_data/basic_check.in.ts", + ], + "verb": "TRUNK_VERB_FMT", + }, + { + "command": "lint", + "fileGroupName": "typescript", + "linter": "biome", + "paths": [ + "test_data/basic_check.in.ts", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "typescript", + "linter": "biome", + "paths": [ + "test_data/basic_check.in.ts", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [ + { + "column": "1", + "file": "test_data/basic_check.in.ts", + "issueClass": "ISSUE_CLASS_UNFORMATTED", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "biome", + "message": "Incorrect formatting, autoformat by running 'trunk fmt'", + }, + ], +} +`; diff --git a/linters/biome/test_data/biome_v2.5.3_basic_fmt.fmt.shot b/linters/biome/test_data/biome_v2.5.3_basic_fmt.fmt.shot new file mode 100644 index 000000000..40d711776 --- /dev/null +++ b/linters/biome/test_data/biome_v2.5.3_basic_fmt.fmt.shot @@ -0,0 +1,22 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing formatter biome test basic_fmt 1`] = ` +"const foobar = () => {}; +const barfoo = () => {}; + +enum Bar { + Baz, +} + +const foo = (bar: Bar) => { + switch (bar) { + case Bar.Baz: + foobar(); + barfoo(); + break; + } + !foo ? null : 1; +}; +" +`; diff --git a/linters/biome/test_data/biome_v2.5.3_basic_json.fmt.shot b/linters/biome/test_data/biome_v2.5.3_basic_json.fmt.shot new file mode 100644 index 000000000..d2f69a3ac --- /dev/null +++ b/linters/biome/test_data/biome_v2.5.3_basic_json.fmt.shot @@ -0,0 +1,7 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing formatter biome test basic_json 1`] = ` +"{ "a": "foo", "b": 1, "a": true } +" +`; diff --git a/linters/biome/test_data/biome_v2.5.3_gitignore_check.check.shot b/linters/biome/test_data/biome_v2.5.3_gitignore_check.check.shot new file mode 100644 index 000000000..1a3c40c70 --- /dev/null +++ b/linters/biome/test_data/biome_v2.5.3_gitignore_check.check.shot @@ -0,0 +1,40 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter biome test gitignore_check 1`] = ` +{ + "issues": [], + "lintActions": [ + { + "command": "fmt", + "fileGroupName": "typescript", + "linter": "biome", + "paths": [ + "test_data/gitignore_check.in.ts", + ], + "verb": "TRUNK_VERB_FMT", + }, + { + "command": "lint", + "fileGroupName": "typescript", + "linter": "biome", + "paths": [ + "test_data/gitignore_check.in.ts", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "typescript", + "linter": "biome", + "paths": [ + "test_data/gitignore_check.in.ts", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/biome/test_data/biome_v2.5.3_warning_check.check.shot b/linters/biome/test_data/biome_v2.5.3_warning_check.check.shot new file mode 100644 index 000000000..51897e004 --- /dev/null +++ b/linters/biome/test_data/biome_v2.5.3_warning_check.check.shot @@ -0,0 +1,52 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter biome test warning_check 1`] = ` +{ + "issues": [ + { + "code": "lint/style/noNonNullAssertion", + "column": "16", + "file": "test_data/warning_check.in.ts", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "line": "5", + "linter": "biome", + "message": "Forbidden non-null assertion.", + "targetType": "typescript", + }, + ], + "lintActions": [ + { + "command": "fmt", + "fileGroupName": "typescript", + "linter": "biome", + "paths": [ + "test_data/warning_check.in.ts", + ], + "verb": "TRUNK_VERB_FMT", + }, + { + "command": "lint", + "fileGroupName": "typescript", + "linter": "biome", + "paths": [ + "test_data/warning_check.in.ts", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "typescript", + "linter": "biome", + "paths": [ + "test_data/warning_check.in.ts", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/cspell/test_data/cspell_v10.0.1_basic.check.shot b/linters/cspell/test_data/cspell_v10.0.1_basic.check.shot new file mode 100644 index 000000000..415f44616 --- /dev/null +++ b/linters/cspell/test_data/cspell_v10.0.1_basic.check.shot @@ -0,0 +1,88 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter cspell test basic 1`] = ` +{ + "issues": [], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "cspell", + "paths": [ + "test_data/basic_md.in.md", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "cspell", + "paths": [ + "test_data/basic_py.in.py", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "cspell", + "paths": [ + "test_data/basic_ts.in.ts", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "cspell", + "paths": [ + "test_data/empty.in.txt", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "cspell", + "paths": [ + "test_data/basic_md.in.md", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "cspell", + "paths": [ + "test_data/basic_py.in.py", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "cspell", + "paths": [ + "test_data/basic_ts.in.ts", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "cspell", + "paths": [ + "test_data/empty.in.txt", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/cspell/test_data/cspell_v10.0.1_dictionary.check.shot b/linters/cspell/test_data/cspell_v10.0.1_dictionary.check.shot new file mode 100644 index 000000000..ea3d2014c --- /dev/null +++ b/linters/cspell/test_data/cspell_v10.0.1_dictionary.check.shot @@ -0,0 +1,88 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter cspell test dictionary 1`] = ` +{ + "issues": [], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "cspell", + "paths": [ + "test_data/basic_md.in.md", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "cspell", + "paths": [ + "test_data/basic_py.in.py", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "cspell", + "paths": [ + "test_data/basic_ts.in.ts", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "cspell", + "paths": [ + "test_data/empty.in.txt", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "cspell", + "paths": [ + "test_data/basic_md.in.md", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "cspell", + "paths": [ + "test_data/basic_py.in.py", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "cspell", + "paths": [ + "test_data/basic_ts.in.ts", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "ALL", + "linter": "cspell", + "paths": [ + "test_data/empty.in.txt", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/djlint/test_data/djlint_v1.40.4_logout.check.shot b/linters/djlint/test_data/djlint_v1.40.4_logout.check.shot new file mode 100644 index 000000000..e30ba05b4 --- /dev/null +++ b/linters/djlint/test_data/djlint_v1.40.4_logout.check.shot @@ -0,0 +1,50 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter djlint test logout 1`] = ` +{ + "issues": [], + "lintActions": [ + { + "command": "fmt", + "fileGroupName": "html", + "linter": "djlint", + "paths": [ + "test_data/logout.in.html", + ], + "verb": "TRUNK_VERB_FMT", + }, + { + "command": "lint", + "fileGroupName": "html", + "linter": "djlint", + "paths": [ + "test_data/logout.in.html", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "html", + "linter": "djlint", + "paths": [ + "test_data/logout.in.html", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [ + { + "column": "1", + "file": "test_data/logout.in.html", + "issueClass": "ISSUE_CLASS_UNFORMATTED", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "djlint", + "message": "Incorrect formatting, autoformat by running 'trunk fmt'", + }, + ], +} +`; diff --git a/linters/djlint/test_data/djlint_v1.40.4_logout.fmt.shot b/linters/djlint/test_data/djlint_v1.40.4_logout.fmt.shot new file mode 100644 index 000000000..aca179524 --- /dev/null +++ b/linters/djlint/test_data/djlint_v1.40.4_logout.fmt.shot @@ -0,0 +1,12 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing formatter djlint test logout 1`] = ` +"{% extends "base.html" %}{% load i18n %}{% block contentLoggedIn %}You are currently logged in.{% endblock %}{% block content %} + +

You are currently logged out.

+ +{% trans "Log in" %} +{% endblock %} +" +`; diff --git a/linters/grype/test_data/grype_v0.115.0_fs-vuln.check.shot b/linters/grype/test_data/grype_v0.115.0_fs-vuln.check.shot new file mode 100644 index 000000000..a7f4ac047 --- /dev/null +++ b/linters/grype/test_data/grype_v0.115.0_fs-vuln.check.shot @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter grype test fs-vuln 1`] = ` +{ + "issues": [], + "lintActions": [ + { + "command": "fs-vuln", + "fileGroupName": "lockfile", + "linter": "grype", + "paths": [ + "test_data/Gemfile.lock", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "fs-vuln", + "fileGroupName": "lockfile", + "linter": "grype", + "paths": [ + "test_data/Gemfile.lock", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/markdownlint-cli2/test_data/markdownlint_cli2_v0.23.0_basic.check.shot b/linters/markdownlint-cli2/test_data/markdownlint_cli2_v0.23.0_basic.check.shot new file mode 100644 index 000000000..bf011d69c --- /dev/null +++ b/linters/markdownlint-cli2/test_data/markdownlint_cli2_v0.23.0_basic.check.shot @@ -0,0 +1,44 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter markdownlint-cli2 test basic 1`] = ` +{ + "issues": [ + { + "code": "error", + "column": "1", + "file": "test_data/basic.in.md", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#error", + "level": "LEVEL_HIGH", + "line": "3", + "linter": "markdownlint-cli2", + "message": "MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "This file fails some rules"]", + "targetType": "markdown", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "markdown", + "linter": "markdownlint-cli2", + "paths": [ + "test_data/basic.in.md", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "markdown", + "linter": "markdownlint-cli2", + "paths": [ + "test_data/basic.in.md", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/pmd/test_data/pmd_vpmd_releases/7.26.0_CUSTOM.check.shot b/linters/pmd/test_data/pmd_vpmd_releases/7.26.0_CUSTOM.check.shot new file mode 100644 index 000000000..6721ef247 --- /dev/null +++ b/linters/pmd/test_data/pmd_vpmd_releases/7.26.0_CUSTOM.check.shot @@ -0,0 +1,123 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter pmd test CUSTOM 1`] = ` +{ + "issues": [ + { + "code": "ApexDoc", + "column": "8", + "file": "test_data/apex.in.cls", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_MEDIUM", + "line": "1", + "linter": "pmd", + "message": "Missing ApexDoc comment", + "ranges": [ + { + "filePath": "test_data/apex.in.cls", + "length": "69", + "offset": "7", + }, + ], + "targetType": "apex", + }, + { + "code": "AvoidGlobalModifier", + "column": "8", + "file": "test_data/apex.in.cls", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_MEDIUM", + "line": "1", + "linter": "pmd", + "message": "Avoid using global modifier", + "ranges": [ + { + "filePath": "test_data/apex.in.cls", + "length": "69", + "offset": "7", + }, + ], + "targetType": "apex", + }, + { + "code": "ApexDoc", + "column": "8", + "file": "test_data/apex.in.cls", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_MEDIUM", + "line": "2", + "linter": "pmd", + "message": "Missing ApexDoc comment", + "ranges": [ + { + "filePath": "test_data/apex.in.cls", + "length": "41", + "offset": "33", + }, + ], + "targetType": "apex", + }, + { + "code": "NoPackage", + "column": "7", + "file": "test_data/hello.in.java", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_MEDIUM", + "line": "3", + "linter": "pmd", + "message": "All classes, interfaces, enums and annotations must belong to a named package", + "ranges": [ + { + "filePath": "test_data/hello.in.java", + "length": "10", + "offset": "29", + }, + ], + "targetType": "java", + }, + ], + "lintActions": [ + { + "command": "lint-apex", + "fileGroupName": "apex", + "linter": "pmd", + "paths": [ + "test_data/apex.in.cls", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint-apex", + "fileGroupName": "apex", + "linter": "pmd", + "paths": [ + "test_data/apex.in.cls", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint-java", + "fileGroupName": "java", + "linter": "pmd", + "paths": [ + "test_data/hello.in.java", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint-java", + "fileGroupName": "java", + "linter": "pmd", + "paths": [ + "test_data/hello.in.java", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/prettier/test_data/prettier_v3.9.5_basic.check.shot b/linters/prettier/test_data/prettier_v3.9.5_basic.check.shot new file mode 100644 index 000000000..e4767283f --- /dev/null +++ b/linters/prettier/test_data/prettier_v3.9.5_basic.check.shot @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter prettier test basic 1`] = ` +{ + "issues": [], + "lintActions": [ + { + "command": "format", + "fileGroupName": "yaml", + "linter": "prettier", + "paths": [ + "test_data/basic.in.yaml", + ], + "verb": "TRUNK_VERB_FMT", + }, + ], + "taskFailures": [], + "unformattedFiles": [ + { + "column": "1", + "file": "test_data/basic.in.yaml", + "issueClass": "ISSUE_CLASS_UNFORMATTED", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "prettier", + "message": "Incorrect formatting, autoformat by running 'trunk fmt'", + }, + ], +} +`; diff --git a/linters/prettier/test_data/prettier_v3.9.5_basic.fmt.shot b/linters/prettier/test_data/prettier_v3.9.5_basic.fmt.shot new file mode 100644 index 000000000..c37741bd3 --- /dev/null +++ b/linters/prettier/test_data/prettier_v3.9.5_basic.fmt.shot @@ -0,0 +1,35 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing formatter prettier test basic 1`] = ` +"--- +invoice: 34843 +date: 2001-01-23 +bill-to: &id001 + given: Chris + family: Dumars + address: + lines: | + 458 Walkman Dr. + Suite #292 + city: Royal Oak + state: MI + postal: 48046 +ship-to: *id001 +product: + - sku: BL394D + quantity: 4 + description: Basketball + price: 450.00 + + - sku: BL4438H + quantity: 1 + description: Super Hoop + price: 2392.00 + +tax: 251.42 +total: 4443.52 +comments: > + Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338. +" +`; diff --git a/linters/prettier/test_data/prettier_v3.9.5_error.check.shot b/linters/prettier/test_data/prettier_v3.9.5_error.check.shot new file mode 100644 index 000000000..c08563d9d --- /dev/null +++ b/linters/prettier/test_data/prettier_v3.9.5_error.check.shot @@ -0,0 +1,33 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter prettier test error 1`] = ` +{ + "issues": [ + { + "code": "SyntaxError", + "column": "1", + "file": "test_data/error.in.yaml", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "line": "4", + "linter": "prettier", + "message": "Unexpected flow-seq-end token in YAML stream: "]"", + "targetType": "yaml", + }, + ], + "lintActions": [ + { + "command": "format", + "fileGroupName": "yaml", + "linter": "prettier", + "paths": [ + "test_data/error.in.yaml", + ], + "verb": "TRUNK_VERB_FMT", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/prettier/test_data/prettier_v3.9.5_error.fmt.shot b/linters/prettier/test_data/prettier_v3.9.5_error.fmt.shot new file mode 100644 index 000000000..ff251cdad --- /dev/null +++ b/linters/prettier/test_data/prettier_v3.9.5_error.fmt.shot @@ -0,0 +1,45 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing formatter prettier test error 1`] = ` +"--- +invoice : 34843 +date : 2001-01-23 +] +bill-to: &id001 + given : Chris + family : Dumars + address: + lines: | + 458 Walkman Dr. + Suite #292 + city : Royal Oak + state : MI + postal : 48046 +ship-to: *id001 +product: + - + + sku : BL394D + ? quantity + : 4 + description : Basketball + ? price + : 450.00 + + + - + sku : BL4438H + quantity : 1 + description: Super Hoop + price : 2392.00 + + +tax : 251.42 +total : 4443.52 +comments: > + Late afternoon is best. + Backup contact is Nancy + Billsmer @ 338-4338. +" +`; diff --git a/linters/ruff/test_data/ruff_nbqa_v0.15.21_basic_nb.check.shot b/linters/ruff/test_data/ruff_nbqa_v0.15.21_basic_nb.check.shot new file mode 100644 index 000000000..12ddd491d --- /dev/null +++ b/linters/ruff/test_data/ruff_nbqa_v0.15.21_basic_nb.check.shot @@ -0,0 +1,50 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter ruff-nbqa test basic_nb 1`] = ` +{ + "issues": [ + { + "code": "error", + "file": "test_data/basic_nb.in.ipynb", + "issueClass": "ISSUE_CLASS_EXISTING", + "level": "LEVEL_HIGH", + "linter": "ruff-nbqa", + "message": "F401 [*] \`os\` imported but unused + --> /tmp/plugins_/test_data/basic_nb.in.ipynb:2:8 + | +1 | # %%NBQA-CELL-SEP +2 | import os + | ^^ +3 | +4 | print("Hello World!") + | +help: Remove unused import: \`os\`", + "targetType": "jupyter", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "jupyter", + "linter": "ruff-nbqa", + "paths": [ + "test_data/basic_nb.in.ipynb", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "jupyter", + "linter": "ruff-nbqa", + "paths": [ + "test_data/basic_nb.in.ipynb", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/ruff/test_data/ruff_v0.15.21_basic.check.shot b/linters/ruff/test_data/ruff_v0.15.21_basic.check.shot new file mode 100644 index 000000000..43626df0b --- /dev/null +++ b/linters/ruff/test_data/ruff_v0.15.21_basic.check.shot @@ -0,0 +1,101 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter ruff test basic 1`] = ` +{ + "issues": [ + { + "code": "E402", + "column": "1", + "file": "test_data/basic.in.py", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://docs.astral.sh/ruff/rules/#E402", + "level": "LEVEL_HIGH", + "line": "7", + "linter": "ruff", + "message": "Module level import not at top of file", + "ranges": [ + { + "filePath": "test_data/basic.in.py", + "length": "10", + "offset": "83", + }, + ], + "targetType": "python", + }, + { + "autofixOptions": [ + { + "message": "Remove unused import: \`sys\`", + "replacements": [ + { + "filePath": "test_data/basic.in.py", + "length": "11", + "offset": "83", + }, + ], + }, + ], + "code": "F401", + "column": "8", + "file": "test_data/basic.in.py", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://docs.astral.sh/ruff/rules/#F401", + "level": "LEVEL_HIGH", + "line": "7", + "linter": "ruff", + "message": "\`sys\` imported but unused", + "ranges": [ + { + "filePath": "test_data/basic.in.py", + "length": "3", + "offset": "90", + }, + ], + "targetType": "python", + }, + { + "code": "E402", + "column": "1", + "file": "test_data/basic.in.py", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://docs.astral.sh/ruff/rules/#E402", + "level": "LEVEL_HIGH", + "line": "9", + "linter": "ruff", + "message": "Module level import not at top of file", + "ranges": [ + { + "filePath": "test_data/basic.in.py", + "length": "11", + "offset": "120", + }, + ], + "targetType": "python", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "python", + "linter": "ruff", + "paths": [ + "test_data/basic.in.py", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "python", + "linter": "ruff", + "paths": [ + "test_data/basic.in.py", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/ruff/test_data/ruff_v0.15.21_basic_nb.check.shot b/linters/ruff/test_data/ruff_v0.15.21_basic_nb.check.shot new file mode 100644 index 000000000..6622660ab --- /dev/null +++ b/linters/ruff/test_data/ruff_v0.15.21_basic_nb.check.shot @@ -0,0 +1,55 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter ruff test basic_nb 1`] = ` +{ + "issues": [ + { + "autofixOptions": [ + { + "message": "Remove unused import: \`os\`", + "replacements": [ + { + "filePath": "test_data/basic_nb.in.ipynb", + "length": "2", + }, + ], + }, + ], + "code": "F401", + "column": "1", + "file": "test_data/basic_nb.in.ipynb", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://docs.astral.sh/ruff/rules/#F401", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "ruff", + "message": "\`os\` imported but unused", + "targetType": "jupyter", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "jupyter", + "linter": "ruff", + "paths": [ + "test_data/basic_nb.in.ipynb", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "jupyter", + "linter": "ruff", + "paths": [ + "test_data/basic_nb.in.ipynb", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/ruff/test_data/ruff_v0.15.21_format.fmt.shot b/linters/ruff/test_data/ruff_v0.15.21_format.fmt.shot new file mode 100644 index 000000000..06ab53d44 --- /dev/null +++ b/linters/ruff/test_data/ruff_v0.15.21_format.fmt.shot @@ -0,0 +1,14 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing formatter ruff test format 1`] = ` +"# whitespace below vvv + +# A malindented comment +if __name__ == "__main__": + a = 4 + 1 + b = 2 * 7 + c = [1, 2, 3] + print(a / b) +" +`; diff --git a/linters/ruff/test_data/ruff_v0.15.21_interface.check.shot b/linters/ruff/test_data/ruff_v0.15.21_interface.check.shot new file mode 100644 index 000000000..85c96e44f --- /dev/null +++ b/linters/ruff/test_data/ruff_v0.15.21_interface.check.shot @@ -0,0 +1,209 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter ruff test interface 1`] = ` +{ + "issues": [ + { + "code": "F821", + "column": "2", + "file": "test_data/interface.in.pyi", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://docs.astral.sh/ruff/rules/#F821", + "level": "LEVEL_HIGH", + "line": "11", + "linter": "ruff", + "message": "Undefined name \`overload\`", + "ranges": [ + { + "filePath": "test_data/interface.in.pyi", + "length": "8", + "offset": "170", + }, + ], + "targetType": "python-interface", + }, + { + "code": "F811", + "column": "5", + "file": "test_data/interface.in.pyi", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://docs.astral.sh/ruff/rules/#F811", + "level": "LEVEL_HIGH", + "line": "12", + "linter": "ruff", + "message": "Redefinition of unused \`a\` from line 9: \`a\` redefined here", + "ranges": [ + { + "filePath": "test_data/interface.in.pyi", + "length": "1", + "offset": "183", + }, + ], + "targetType": "python-interface", + }, + { + "code": "F821", + "column": "2", + "file": "test_data/interface.in.pyi", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://docs.astral.sh/ruff/rules/#F821", + "level": "LEVEL_HIGH", + "line": "14", + "linter": "ruff", + "message": "Undefined name \`overload\`", + "ranges": [ + { + "filePath": "test_data/interface.in.pyi", + "length": "8", + "offset": "202", + }, + ], + "targetType": "python-interface", + }, + { + "code": "F811", + "column": "5", + "file": "test_data/interface.in.pyi", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://docs.astral.sh/ruff/rules/#F811", + "level": "LEVEL_HIGH", + "line": "15", + "linter": "ruff", + "message": "Redefinition of unused \`a\` from line 12: \`a\` redefined here", + "ranges": [ + { + "filePath": "test_data/interface.in.pyi", + "length": "1", + "offset": "215", + }, + ], + "targetType": "python-interface", + }, + { + "autofixOptions": [ + { + "message": "Remove unused import: \`json\`", + "replacements": [ + { + "filePath": "test_data/interface.in.pyi", + "length": "12", + "offset": "47", + }, + ], + }, + ], + "code": "F401", + "column": "8", + "file": "test_data/interface.in.pyi", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://docs.astral.sh/ruff/rules/#F401", + "level": "LEVEL_HIGH", + "line": "2", + "linter": "ruff", + "message": "\`json\` imported but unused", + "ranges": [ + { + "filePath": "test_data/interface.in.pyi", + "length": "4", + "offset": "54", + }, + ], + "targetType": "python-interface", + }, + { + "code": "F821", + "column": "6", + "file": "test_data/interface.in.pyi", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://docs.astral.sh/ruff/rules/#F821", + "level": "LEVEL_HIGH", + "line": "31", + "linter": "ruff", + "message": "Undefined name \`decorated\`", + "ranges": [ + { + "filePath": "test_data/interface.in.pyi", + "length": "9", + "offset": "479", + }, + ], + "targetType": "python-interface", + }, + { + "code": "F811", + "column": "1", + "file": "test_data/interface.in.pyi", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://docs.astral.sh/ruff/rules/#F811", + "level": "LEVEL_HIGH", + "line": "37", + "linter": "ruff", + "message": "Redefinition of unused \`a\` from line 15: \`a\` redefined here", + "ranges": [ + { + "filePath": "test_data/interface.in.pyi", + "length": "1", + "offset": "548", + }, + ], + "targetType": "python-interface", + }, + { + "autofixOptions": [ + { + "message": "Remove unused import: \`typing.Sequence\`", + "replacements": [ + { + "filePath": "test_data/interface.in.pyi", + "length": "32", + "offset": "60", + "replacementText": "from typing import Any", + }, + ], + }, + ], + "code": "F401", + "column": "25", + "file": "test_data/interface.in.pyi", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://docs.astral.sh/ruff/rules/#F401", + "level": "LEVEL_HIGH", + "line": "4", + "linter": "ruff", + "message": "\`typing.Sequence\` imported but unused", + "ranges": [ + { + "filePath": "test_data/interface.in.pyi", + "length": "8", + "offset": "84", + }, + ], + "targetType": "python-interface", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "python-interface", + "linter": "ruff", + "paths": [ + "test_data/interface.in.pyi", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "python-interface", + "linter": "ruff", + "paths": [ + "test_data/interface.in.pyi", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/ruff/test_data/ruff_v0.15.21_syntax.check.shot b/linters/ruff/test_data/ruff_v0.15.21_syntax.check.shot new file mode 100644 index 000000000..910835a5a --- /dev/null +++ b/linters/ruff/test_data/ruff_v0.15.21_syntax.check.shot @@ -0,0 +1,44 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter ruff test syntax 1`] = ` +{ + "issues": [ + { + "code": "invalid-syntax", + "column": "1", + "file": "test_data/syntax.in.py", + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://docs.astral.sh/ruff/rules/#invalid-syntax", + "level": "LEVEL_HIGH", + "line": "2", + "linter": "ruff", + "message": "unexpected EOF while parsing", + "targetType": "python", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "python", + "linter": "ruff", + "paths": [ + "test_data/syntax.in.py", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "python", + "linter": "ruff", + "paths": [ + "test_data/syntax.in.py", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/trufflehog/test_data/trufflehog_git_v3.95.9_CUSTOM.check.shot b/linters/trufflehog/test_data/trufflehog_git_v3.95.9_CUSTOM.check.shot new file mode 100644 index 000000000..e09657b97 --- /dev/null +++ b/linters/trufflehog/test_data/trufflehog_git_v3.95.9_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/basic_auth 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/basic_auth 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.95.9_buff_size.check.shot b/linters/trufflehog/test_data/trufflehog_v3.95.9_buff_size.check.shot new file mode 100644 index 000000000..da6cc9615 --- /dev/null +++ b/linters/trufflehog/test_data/trufflehog_v3.95.9_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.95.9_secrets.check.shot b/linters/trufflehog/test_data/trufflehog_v3.95.9_secrets.check.shot new file mode 100644 index 000000000..48b3993e9 --- /dev/null +++ b/linters/trufflehog/test_data/trufflehog_v3.95.9_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/basic_auth", + "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.95.9_wrong_line_number.check.shot b/linters/trufflehog/test_data/trufflehog_v3.95.9_wrong_line_number.check.shot new file mode 100644 index 000000000..e596d7fd8 --- /dev/null +++ b/linters/trufflehog/test_data/trufflehog_v3.95.9_wrong_line_number.check.shot @@ -0,0 +1,43 @@ +// 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/basic_auth", + "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": [], +} +`; diff --git a/linters/zizmor/test_data/zizmor_v1.26.1_CUSTOM.check.shot b/linters/zizmor/test_data/zizmor_v1.26.1_CUSTOM.check.shot new file mode 100644 index 000000000..81b6ccdc8 --- /dev/null +++ b/linters/zizmor/test_data/zizmor_v1.26.1_CUSTOM.check.shot @@ -0,0 +1,112 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter zizmor test CUSTOM 1`] = ` +{ + "issues": [ + { + "code": "zizmor/unpinned-uses", + "column": "15", + "file": ".github/workflows/bad.in.yaml", + "isSecurity": true, + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://docs.zizmor.sh/audits/", + "level": "LEVEL_HIGH", + "line": "12", + "linter": "zizmor", + "message": "unpinned action reference: action is not pinned to a hash (required by blanket policy)", + "ranges": [ + { + "filePath": ".github/workflows/bad.in.yaml", + "length": "19", + "offset": "129", + }, + ], + "targetType": "github-workflow", + }, + { + "code": "zizmor/artipacked", + "column": "9", + "file": ".github/workflows/bad.in.yaml", + "isSecurity": true, + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://docs.zizmor.sh/audits/", + "level": "LEVEL_MEDIUM", + "line": "12", + "linter": "zizmor", + "message": "credential persistence through GitHub Actions artifacts: does not set persist-credentials: false", + "ranges": [ + { + "filePath": ".github/workflows/bad.in.yaml", + "length": "25", + "offset": "123", + }, + ], + "targetType": "github-workflow", + }, + { + "code": "zizmor/template-injection", + "column": "24", + "file": ".github/workflows/bad.in.yaml", + "isSecurity": true, + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://docs.zizmor.sh/audits/", + "level": "LEVEL_HIGH", + "line": "13", + "linter": "zizmor", + "message": "code injection via template expansion: may expand into attacker-controllable code", + "ranges": [ + { + "filePath": ".github/workflows/bad.in.yaml", + "length": "31", + "offset": "172", + }, + ], + "targetType": "github-workflow", + }, + { + "code": "zizmor/dangerous-triggers", + "column": "1", + "file": ".github/workflows/bad.in.yaml", + "isSecurity": true, + "issueClass": "ISSUE_CLASS_EXISTING", + "issueUrl": "https://docs.zizmor.sh/audits/", + "level": "LEVEL_HIGH", + "line": "3", + "linter": "zizmor", + "message": "use of fundamentally insecure workflow trigger: pull_request_target is almost always used insecurely", + "ranges": [ + { + "filePath": ".github/workflows/bad.in.yaml", + "length": "26", + "offset": "11", + }, + ], + "targetType": "github-workflow", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "github-workflow", + "linter": "zizmor", + "paths": [ + ".github/workflows/bad.in.yaml", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "github-workflow", + "linter": "zizmor", + "paths": [ + ".github/workflows/bad.in.yaml", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`;