diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 2bd79f48f..ff8d8b6f4 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -115,7 +115,9 @@ jobs: - name: Linter Tests Latest # Run tests on Latest with any modified linters (see filters.yaml). Don't run when cancelled. - if: (failure() || success()) && needs.detect_changes.outputs.linters == 'true' + if: + (failure() || success()) && needs.detect_changes.outputs.linters == 'true' && + needs.detect_changes.outputs.linters-files != '' uses: ./.github/actions/linter_tests with: linter-version: Latest diff --git a/actions/trunk/plugin.yaml b/actions/trunk/plugin.yaml index adc241c09..b6f0a8d64 100644 --- a/actions/trunk/plugin.yaml +++ b/actions/trunk/plugin.yaml @@ -9,14 +9,6 @@ actions: - git_hooks: [post-checkout, post-merge, pre-rebase] notify_on_error: false - - id: trunk-cache-prune - display_name: Trunk Cache Prune - description: Periodically prune cached trunk files that are no longer needed - triggers: - - schedule: 24h - run: trunk cache prune - notify_on_error: false - - id: trunk-fmt-pre-commit description: Run 'trunk fmt' whenever you run 'git commit' display_name: Trunk Fmt Pre-Commit Hook diff --git a/linters/ansible-lint/test_data/ansible_lint_v6.14.3_FQCN.check.shot b/linters/ansible-lint/test_data/ansible_lint_v6.14.3_FQCN.check.shot new file mode 100644 index 000000000..a408871c6 --- /dev/null +++ b/linters/ansible-lint/test_data/ansible_lint_v6.14.3_FQCN.check.shot @@ -0,0 +1,630 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter ansible-lint test FQCN 1`] = ` +{ + "issues": [ + { + "bucket": "ansible-lint", + "code": "fqcn[action-core]", + "column": "1", + "file": "jboss-standalone/demo-aws-launch.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "28", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.wait_for\` or \`ansible.legacy.wait_for\` instead.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "yaml[truthy]", + "column": "1", + "file": "jboss-standalone/demo-aws-launch.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[truthy]", + "level": "LEVEL_HIGH", + "line": "5", + "linter": "ansible-lint", + "message": "Truthy value should be one of [false, true]", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "name[play]", + "column": "1", + "file": "jboss-standalone/deploy-application.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#name[play]", + "level": "LEVEL_HIGH", + "line": "4", + "linter": "ansible-lint", + "message": "All plays should be named.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "role-name", + "column": "1", + "file": "jboss-standalone/roles/java-app", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#role-name", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "ansible-lint", + "message": "Role name java-app does not match \`\`^[a-z][a-z0-9_]*$\`\` pattern.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action-core]", + "column": "1", + "file": "jboss-standalone/roles/java-app/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "14", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.copy\` or \`ansible.legacy.copy\` instead.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "risky-file-permissions", + "column": "1", + "file": "jboss-standalone/roles/java-app/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#risky-file-permissions", + "level": "LEVEL_HIGH", + "line": "14", + "linter": "ansible-lint", + "message": "Task/Handler: Copy application WAR file to host", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action]", + "column": "1", + "file": "jboss-standalone/roles/java-app/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action]", + "level": "LEVEL_HIGH", + "line": "19", + "linter": "ansible-lint", + "message": "Action \`jboss\` is not FQCN.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action-core]", + "column": "1", + "file": "jboss-standalone/roles/java-app/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "2", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.copy\` or \`ansible.legacy.copy\` instead.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "risky-file-permissions", + "column": "1", + "file": "jboss-standalone/roles/java-app/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#risky-file-permissions", + "level": "LEVEL_HIGH", + "line": "2", + "linter": "ansible-lint", + "message": "Task/Handler: Copy application WAR file to host", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action]", + "column": "1", + "file": "jboss-standalone/roles/java-app/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action]", + "level": "LEVEL_HIGH", + "line": "7", + "linter": "ansible-lint", + "message": "Action \`jboss\` is not FQCN.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "role-name", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#role-name", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "ansible-lint", + "message": "Role name jboss-standalone does not match \`\`^[a-z][a-z0-9_]*$\`\` pattern.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action-core]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/handlers/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "2", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.service\` or \`ansible.legacy.service\` instead.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "name[casing]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/handlers/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#name[casing]", + "level": "LEVEL_HIGH", + "line": "2", + "linter": "ansible-lint", + "message": "Task/Handler: restart jboss", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action-core]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/handlers/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "7", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.service\` or \`ansible.legacy.service\` instead.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "name[casing]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/handlers/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#name[casing]", + "level": "LEVEL_HIGH", + "line": "7", + "linter": "ansible-lint", + "message": "Task/Handler: restart iptables", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action-core]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "12", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.get_url\` or \`ansible.legacy.get_url\` instead.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "risky-file-permissions", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#risky-file-permissions", + "level": "LEVEL_HIGH", + "line": "12", + "linter": "ansible-lint", + "message": "Task/Handler: Download JBoss from jboss.org", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action-core]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "17", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.unarchive\` or \`ansible.legacy.unarchive\` instead.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action-core]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "2", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.yum\` or \`ansible.legacy.yum\` instead.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "yaml[truthy]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[truthy]", + "level": "LEVEL_HIGH", + "line": "22", + "linter": "ansible-lint", + "message": "Truthy value should be one of [false, true]", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action-core]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "25", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.command\` or \`ansible.legacy.command\` instead.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action-core]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "31", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.template\` or \`ansible.legacy.template\` instead.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "risky-file-permissions", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#risky-file-permissions", + "level": "LEVEL_HIGH", + "line": "31", + "linter": "ansible-lint", + "message": "Task/Handler: Copying standalone.xml configuration file", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action-core]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "37", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.group\` or \`ansible.legacy.group\` instead.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action-core]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "41", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.user\` or \`ansible.legacy.user\` instead.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action-core]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "47", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.file\` or \`ansible.legacy.file\` instead.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "yaml[truthy]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[truthy]", + "level": "LEVEL_HIGH", + "line": "53", + "linter": "ansible-lint", + "message": "Truthy value should be one of [false, true]", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action-core]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "55", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.copy\` or \`ansible.legacy.copy\` instead.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "yaml[octal-values]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[octal-values]", + "level": "LEVEL_HIGH", + "line": "59", + "linter": "ansible-lint", + "message": "Forbidden implicit octal value "0755"", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "command-instead-of-module", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#command-instead-of-module", + "level": "LEVEL_HIGH", + "line": "61", + "linter": "ansible-lint", + "message": "Task/Handler: Workaround for systemd bug", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action-core]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "61", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.shell\` or \`ansible.legacy.shell\` instead.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "ignore-errors", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#ignore-errors", + "level": "LEVEL_HIGH", + "line": "61", + "linter": "ansible-lint", + "message": "Task/Handler: Workaround for systemd bug", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "no-changed-when", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#no-changed-when", + "level": "LEVEL_HIGH", + "line": "61", + "linter": "ansible-lint", + "message": "Task/Handler: Workaround for systemd bug", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "yaml[truthy]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[truthy]", + "level": "LEVEL_HIGH", + "line": "63", + "linter": "ansible-lint", + "message": "Truthy value should be one of [false, true]", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action-core]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "65", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.service\` or \`ansible.legacy.service\` instead.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "yaml[truthy]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[truthy]", + "level": "LEVEL_HIGH", + "line": "68", + "linter": "ansible-lint", + "message": "Truthy value should be one of [false, true]", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action-core]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "71", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.template\` or \`ansible.legacy.template\` instead.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "name[casing]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#name[casing]", + "level": "LEVEL_HIGH", + "line": "71", + "linter": "ansible-lint", + "message": "Task/Handler: deploy iptables rules", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "risky-file-permissions", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#risky-file-permissions", + "level": "LEVEL_HIGH", + "line": "71", + "linter": "ansible-lint", + "message": "Task/Handler: deploy iptables rules", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action-core]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "78", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.yum\` or \`ansible.legacy.yum\` instead.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action-core]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action-core]", + "level": "LEVEL_HIGH", + "line": "84", + "linter": "ansible-lint", + "message": "Use \`ansible.builtin.service\` or \`ansible.legacy.service\` instead.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "fqcn[action]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#fqcn[action]", + "level": "LEVEL_HIGH", + "line": "90", + "linter": "ansible-lint", + "message": "Action \`firewalld\` is not FQCN.", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "name[casing]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#name[casing]", + "level": "LEVEL_HIGH", + "line": "90", + "linter": "ansible-lint", + "message": "Task/Handler: deploy firewalld rules", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "yaml[truthy]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[truthy]", + "level": "LEVEL_HIGH", + "line": "92", + "linter": "ansible-lint", + "message": "Truthy value should be one of [false, true]", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "yaml[truthy]", + "column": "1", + "file": "jboss-standalone/roles/jboss-standalone/tasks/main.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#yaml[truthy]", + "level": "LEVEL_HIGH", + "line": "95", + "linter": "ansible-lint", + "message": "Truthy value should be one of [false, true]", + "targetType": "custom", + }, + { + "bucket": "ansible-lint", + "code": "name[play]", + "column": "1", + "file": "jboss-standalone/site.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#name[play]", + "level": "LEVEL_HIGH", + "line": "4", + "linter": "ansible-lint", + "message": "All plays should be named.", + "targetType": "custom", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "custom", + "linter": "ansible-lint", + "paths": [ + "jboss-standalone", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "custom", + "linter": "ansible-lint", + "paths": [ + "jboss-standalone", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/ansible-lint/test_data/ansible_lint_v6.14.3_non_FQCN.check.shot b/linters/ansible-lint/test_data/ansible_lint_v6.14.3_non_FQCN.check.shot new file mode 100644 index 000000000..680c1551a --- /dev/null +++ b/linters/ansible-lint/test_data/ansible_lint_v6.14.3_non_FQCN.check.shot @@ -0,0 +1,45 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter ansible-lint test non_FQCN 1`] = ` +{ + "issues": [ + { + "bucket": "ansible-lint", + "code": "syntax-check[specific]", + "column": "7", + "file": "jboss-standalone/demo-aws-launch.yml", + "issueClass": "ISSUE_CLASS_NEW", + "issueUrl": "https://ansible-lint.readthedocs.io/en/latest/default_rules.html#syntax-check[specific]", + "level": "LEVEL_HIGH", + "line": "12", + "linter": "ansible-lint", + "message": "couldn't resolve module/action 'ec2'. This often indicates a misspelling, missing collection, or incorrect module path.", + "targetType": "custom", + }, + ], + "lintActions": [ + { + "command": "lint", + "fileGroupName": "custom", + "linter": "ansible-lint", + "paths": [ + "jboss-standalone", + ], + "verb": "TRUNK_VERB_CHECK", + }, + { + "command": "lint", + "fileGroupName": "custom", + "linter": "ansible-lint", + "paths": [ + "jboss-standalone", + ], + "upstream": true, + "verb": "TRUNK_VERB_CHECK", + }, + ], + "taskFailures": [], + "unformattedFiles": [], +} +`; diff --git a/linters/osv-scanner/test_data/osv_scanner_v1.2.0_CUSTOM.check.shot b/linters/osv-scanner/test_data/osv_scanner_v1.2.0_CUSTOM.check.shot index 91818533b..8a7d6108d 100644 --- a/linters/osv-scanner/test_data/osv_scanner_v1.2.0_CUSTOM.check.shot +++ b/linters/osv-scanner/test_data/osv_scanner_v1.2.0_CUSTOM.check.shot @@ -1,4 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE exports[`Testing linter osv-scanner test CUSTOM 1`] = ` { @@ -113,6 +114,16 @@ exports[`Testing linter osv-scanner test CUSTOM 1`] = ` "message": "Cross Site Request Forgery in Gitea", "targetType": "osv-lockfiles", }, + { + "bucket": "osv-scanner", + "code": "GHSA-55m9-hm92-xm8j", + "file": "test_data/go.mod", + "isSecurity": true, + "level": "LEVEL_HIGH", + "linter": "osv-scanner", + "message": "Gophish vulnerable to Cross-site Scripting via crafted landing page", + "targetType": "osv-lockfiles", + }, { "bucket": "osv-scanner", "code": "GHSA-69cg-p879-7622", @@ -153,6 +164,16 @@ exports[`Testing linter osv-scanner test CUSTOM 1`] = ` "message": "Use of a Broken or Risky Cryptographic Algorithm in golang.org/x/crypto/ssh", "targetType": "osv-lockfiles", }, + { + "bucket": "osv-scanner", + "code": "GHSA-8gg8-wr4j-v2wr", + "file": "test_data/go.mod", + "isSecurity": true, + "level": "LEVEL_HIGH", + "linter": "osv-scanner", + "message": "Gophish vulnerable to Denial of Service via crafted payload involving autofocus", + "targetType": "osv-lockfiles", + }, { "bucket": "osv-scanner", "code": "GHSA-8h8p-x289-vvqr", diff --git a/linters/plugin.yaml b/linters/plugin.yaml index 4de2ac3fd..6c4255fed 100644 --- a/linters/plugin.yaml +++ b/linters/plugin.yaml @@ -530,3 +530,33 @@ lint: - zsh comments: - hash + + ignore: + - linters: [ALL] + paths: + # the trunk launcher + - "**/trunk" + + - linters: [ALL] + security: false + paths: + # lockfiles + - "**/.terraform.lock.hcl" + - "**/*gradle.lockfile" + - "**/Berksfile.lock" + - "**/Cargo.lock" + - "**/Gemfile.lock" + - "**/go.sum" + - "**/package-lock.json" + - "**/pnpm-lock.yaml" + - "**/requirements.lock" + - "**/vendor/**" + - "**/yarn.lock" + + # TODO(Tyler): Once we bump required_trunk_version to merge plugin lint ignores, we can rmeove the osv-lockfiles type. + - linters: [osv-scanner] + paths: ["**/go.sum"] + + - linters: [eslint] + paths: + - "**/svgo.config.*js" diff --git a/plugin.yaml b/plugin.yaml index 4ed764f06..3eaa2a42b 100644 --- a/plugin.yaml +++ b/plugin.yaml @@ -2,3 +2,9 @@ version: 0.1 # IfChange required_trunk_version: ">1.6.2-beta.1" # ThenChange tests/repo_tests/config_check.test.ts + +environments: + - name: SYSTEM + environment: + - name: PATH + list: ["${path}"]