eslint-plugin-github-actions-2 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +149 -101
- package/dist/_internal/code-scanning-workflow.d.ts +37 -0
- package/dist/_internal/code-scanning-workflow.d.ts.map +1 -0
- package/dist/_internal/code-scanning-workflow.js +73 -0
- package/dist/_internal/code-scanning-workflow.js.map +1 -0
- package/dist/_internal/dependabot-automation-workflow.d.ts +26 -0
- package/dist/_internal/dependabot-automation-workflow.d.ts.map +1 -0
- package/dist/_internal/dependabot-automation-workflow.js +25 -0
- package/dist/_internal/dependabot-automation-workflow.js.map +1 -0
- package/dist/_internal/dependabot-yaml.d.ts +63 -0
- package/dist/_internal/dependabot-yaml.d.ts.map +1 -0
- package/dist/_internal/dependabot-yaml.js +139 -0
- package/dist/_internal/dependabot-yaml.js.map +1 -0
- package/dist/_internal/dependency-review-workflow.d.ts +20 -0
- package/dist/_internal/dependency-review-workflow.d.ts.map +1 -0
- package/dist/_internal/dependency-review-workflow.js +9 -0
- package/dist/_internal/dependency-review-workflow.js.map +1 -0
- package/dist/_internal/github-actions-config-references.d.ts +1 -1
- package/dist/_internal/github-actions-config-references.d.ts.map +1 -1
- package/dist/_internal/github-actions-config-references.js +19 -2
- package/dist/_internal/github-actions-config-references.js.map +1 -1
- package/dist/_internal/lint-targets.d.ts +8 -0
- package/dist/_internal/lint-targets.d.ts.map +1 -1
- package/dist/_internal/lint-targets.js +26 -0
- package/dist/_internal/lint-targets.js.map +1 -1
- package/dist/_internal/rules-registry.d.ts +90 -0
- package/dist/_internal/rules-registry.d.ts.map +1 -1
- package/dist/_internal/rules-registry.js +90 -0
- package/dist/_internal/rules-registry.js.map +1 -1
- package/dist/_internal/secret-scanning-workflow.d.ts +24 -0
- package/dist/_internal/secret-scanning-workflow.d.ts.map +1 -0
- package/dist/_internal/secret-scanning-workflow.js +21 -0
- package/dist/_internal/secret-scanning-workflow.js.map +1 -0
- package/dist/_internal/workflow-action-steps.d.ts +35 -0
- package/dist/_internal/workflow-action-steps.d.ts.map +1 -0
- package/dist/_internal/workflow-action-steps.js +75 -0
- package/dist/_internal/workflow-action-steps.js.map +1 -0
- package/dist/_internal/workflow-permissions.d.ts +11 -0
- package/dist/_internal/workflow-permissions.d.ts.map +1 -0
- package/dist/_internal/workflow-permissions.js +50 -0
- package/dist/_internal/workflow-permissions.js.map +1 -0
- package/dist/_internal/yaml-fixes.d.ts +13 -0
- package/dist/_internal/yaml-fixes.d.ts.map +1 -0
- package/dist/_internal/yaml-fixes.js +77 -0
- package/dist/_internal/yaml-fixes.js.map +1 -0
- package/dist/plugin.cjs +3524 -292
- package/dist/plugin.cjs.map +4 -4
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +2 -0
- package/dist/plugin.js.map +1 -1
- package/dist/rules/action-name-casing.d.ts.map +1 -1
- package/dist/rules/action-name-casing.js +3 -0
- package/dist/rules/action-name-casing.js.map +1 -1
- package/dist/rules/job-id-casing.d.ts.map +1 -1
- package/dist/rules/job-id-casing.js +3 -0
- package/dist/rules/job-id-casing.js.map +1 -1
- package/dist/rules/max-jobs-per-action.d.ts.map +1 -1
- package/dist/rules/max-jobs-per-action.js +3 -0
- package/dist/rules/max-jobs-per-action.js.map +1 -1
- package/dist/rules/no-case-insensitive-input-id-collision.d.ts.map +1 -1
- package/dist/rules/no-case-insensitive-input-id-collision.js +3 -0
- package/dist/rules/no-case-insensitive-input-id-collision.js.map +1 -1
- package/dist/rules/no-codeql-autobuild-for-javascript-typescript.d.ts +9 -0
- package/dist/rules/no-codeql-autobuild-for-javascript-typescript.d.ts.map +1 -0
- package/dist/rules/no-codeql-autobuild-for-javascript-typescript.js +54 -0
- package/dist/rules/no-codeql-autobuild-for-javascript-typescript.js.map +1 -0
- package/dist/rules/no-codeql-javascript-typescript-split-language-matrix.d.ts +9 -0
- package/dist/rules/no-codeql-javascript-typescript-split-language-matrix.d.ts.map +1 -0
- package/dist/rules/no-codeql-javascript-typescript-split-language-matrix.js +50 -0
- package/dist/rules/no-codeql-javascript-typescript-split-language-matrix.js.map +1 -0
- package/dist/rules/no-composite-input-env-access.d.ts.map +1 -1
- package/dist/rules/no-composite-input-env-access.js +3 -0
- package/dist/rules/no-composite-input-env-access.js.map +1 -1
- package/dist/rules/no-deprecated-node-runtime.d.ts.map +1 -1
- package/dist/rules/no-deprecated-node-runtime.js +3 -0
- package/dist/rules/no-deprecated-node-runtime.js.map +1 -1
- package/dist/rules/no-duplicate-composite-step-id.d.ts.map +1 -1
- package/dist/rules/no-duplicate-composite-step-id.js +3 -0
- package/dist/rules/no-duplicate-composite-step-id.js.map +1 -1
- package/dist/rules/no-empty-template-file-pattern.d.ts.map +1 -1
- package/dist/rules/no-empty-template-file-pattern.js +6 -0
- package/dist/rules/no-empty-template-file-pattern.js.map +1 -1
- package/dist/rules/no-external-job.d.ts.map +1 -1
- package/dist/rules/no-external-job.js +3 -0
- package/dist/rules/no-external-job.js.map +1 -1
- package/dist/rules/no-hardcoded-default-branch-in-template.d.ts.map +1 -1
- package/dist/rules/no-hardcoded-default-branch-in-template.js +3 -0
- package/dist/rules/no-hardcoded-default-branch-in-template.js.map +1 -1
- package/dist/rules/no-icon-file-extension-in-template-icon-name.d.ts.map +1 -1
- package/dist/rules/no-icon-file-extension-in-template-icon-name.js +13 -3
- package/dist/rules/no-icon-file-extension-in-template-icon-name.js.map +1 -1
- package/dist/rules/no-inherit-secrets.d.ts.map +1 -1
- package/dist/rules/no-inherit-secrets.js +3 -0
- package/dist/rules/no-inherit-secrets.js.map +1 -1
- package/dist/rules/no-invalid-concurrency-context.d.ts.map +1 -1
- package/dist/rules/no-invalid-concurrency-context.js +3 -0
- package/dist/rules/no-invalid-concurrency-context.js.map +1 -1
- package/dist/rules/no-invalid-key.d.ts.map +1 -1
- package/dist/rules/no-invalid-key.js +3 -0
- package/dist/rules/no-invalid-key.js.map +1 -1
- package/dist/rules/no-invalid-reusable-workflow-job-key.d.ts.map +1 -1
- package/dist/rules/no-invalid-reusable-workflow-job-key.js +3 -0
- package/dist/rules/no-invalid-reusable-workflow-job-key.js.map +1 -1
- package/dist/rules/no-invalid-template-file-pattern-regex.d.ts.map +1 -1
- package/dist/rules/no-invalid-template-file-pattern-regex.js +3 -0
- package/dist/rules/no-invalid-template-file-pattern-regex.js.map +1 -1
- package/dist/rules/no-invalid-workflow-call-output-value.d.ts.map +1 -1
- package/dist/rules/no-invalid-workflow-call-output-value.js +3 -0
- package/dist/rules/no-invalid-workflow-call-output-value.js.map +1 -1
- package/dist/rules/no-overlapping-dependabot-directories.d.ts +9 -0
- package/dist/rules/no-overlapping-dependabot-directories.d.ts.map +1 -0
- package/dist/rules/no-overlapping-dependabot-directories.js +151 -0
- package/dist/rules/no-overlapping-dependabot-directories.js.map +1 -0
- package/dist/rules/no-path-separators-in-template-icon-name.d.ts.map +1 -1
- package/dist/rules/no-path-separators-in-template-icon-name.js +26 -3
- package/dist/rules/no-path-separators-in-template-icon-name.js.map +1 -1
- package/dist/rules/no-post-if-without-post.d.ts.map +1 -1
- package/dist/rules/no-post-if-without-post.js +6 -0
- package/dist/rules/no-post-if-without-post.js.map +1 -1
- package/dist/rules/no-pr-head-checkout-in-pull-request-target.d.ts.map +1 -1
- package/dist/rules/no-pr-head-checkout-in-pull-request-target.js +3 -0
- package/dist/rules/no-pr-head-checkout-in-pull-request-target.js.map +1 -1
- package/dist/rules/no-pre-if-without-pre.d.ts.map +1 -1
- package/dist/rules/no-pre-if-without-pre.js +6 -0
- package/dist/rules/no-pre-if-without-pre.js.map +1 -1
- package/dist/rules/no-required-input-with-default.d.ts.map +1 -1
- package/dist/rules/no-required-input-with-default.js +23 -0
- package/dist/rules/no-required-input-with-default.js.map +1 -1
- package/dist/rules/no-secrets-in-if.d.ts.map +1 -1
- package/dist/rules/no-secrets-in-if.js +3 -0
- package/dist/rules/no-secrets-in-if.js.map +1 -1
- package/dist/rules/no-self-hosted-runner-on-fork-pr-events.d.ts.map +1 -1
- package/dist/rules/no-self-hosted-runner-on-fork-pr-events.js +3 -0
- package/dist/rules/no-self-hosted-runner-on-fork-pr-events.js.map +1 -1
- package/dist/rules/no-subdirectory-template-file-pattern.d.ts.map +1 -1
- package/dist/rules/no-subdirectory-template-file-pattern.js +3 -0
- package/dist/rules/no-subdirectory-template-file-pattern.js.map +1 -1
- package/dist/rules/no-template-placeholder-in-non-template-workflow.d.ts.map +1 -1
- package/dist/rules/no-template-placeholder-in-non-template-workflow.js +3 -0
- package/dist/rules/no-template-placeholder-in-non-template-workflow.js.map +1 -1
- package/dist/rules/no-top-level-env.d.ts.map +1 -1
- package/dist/rules/no-top-level-env.js +3 -0
- package/dist/rules/no-top-level-env.js.map +1 -1
- package/dist/rules/no-top-level-permissions.d.ts.map +1 -1
- package/dist/rules/no-top-level-permissions.js +3 -0
- package/dist/rules/no-top-level-permissions.js.map +1 -1
- package/dist/rules/no-universal-template-file-pattern.d.ts.map +1 -1
- package/dist/rules/no-universal-template-file-pattern.js +3 -0
- package/dist/rules/no-universal-template-file-pattern.js.map +1 -1
- package/dist/rules/no-unknown-dependabot-multi-ecosystem-group.d.ts +9 -0
- package/dist/rules/no-unknown-dependabot-multi-ecosystem-group.d.ts.map +1 -0
- package/dist/rules/no-unknown-dependabot-multi-ecosystem-group.js +58 -0
- package/dist/rules/no-unknown-dependabot-multi-ecosystem-group.js.map +1 -0
- package/dist/rules/no-unknown-input-reference-in-composite.d.ts.map +1 -1
- package/dist/rules/no-unknown-input-reference-in-composite.js +3 -0
- package/dist/rules/no-unknown-input-reference-in-composite.js.map +1 -1
- package/dist/rules/no-unknown-job-output-reference.d.ts.map +1 -1
- package/dist/rules/no-unknown-job-output-reference.js +3 -0
- package/dist/rules/no-unknown-job-output-reference.js.map +1 -1
- package/dist/rules/no-unknown-step-reference.d.ts.map +1 -1
- package/dist/rules/no-unknown-step-reference.js +3 -0
- package/dist/rules/no-unknown-step-reference.js.map +1 -1
- package/dist/rules/no-untrusted-input-in-run.d.ts.map +1 -1
- package/dist/rules/no-untrusted-input-in-run.js +3 -0
- package/dist/rules/no-untrusted-input-in-run.js.map +1 -1
- package/dist/rules/no-unused-dependabot-enable-beta-ecosystems.d.ts +9 -0
- package/dist/rules/no-unused-dependabot-enable-beta-ecosystems.d.ts.map +1 -0
- package/dist/rules/no-unused-dependabot-enable-beta-ecosystems.js +51 -0
- package/dist/rules/no-unused-dependabot-enable-beta-ecosystems.js.map +1 -0
- package/dist/rules/no-unused-input-in-composite.d.ts.map +1 -1
- package/dist/rules/no-unused-input-in-composite.js +3 -0
- package/dist/rules/no-unused-input-in-composite.js.map +1 -1
- package/dist/rules/no-write-all-permissions.d.ts.map +1 -1
- package/dist/rules/no-write-all-permissions.js +3 -0
- package/dist/rules/no-write-all-permissions.js.map +1 -1
- package/dist/rules/pin-action-shas.d.ts.map +1 -1
- package/dist/rules/pin-action-shas.js +3 -0
- package/dist/rules/pin-action-shas.js.map +1 -1
- package/dist/rules/prefer-action-yml.d.ts.map +1 -1
- package/dist/rules/prefer-action-yml.js +3 -0
- package/dist/rules/prefer-action-yml.js.map +1 -1
- package/dist/rules/prefer-fail-fast.d.ts.map +1 -1
- package/dist/rules/prefer-fail-fast.js +3 -0
- package/dist/rules/prefer-fail-fast.js.map +1 -1
- package/dist/rules/prefer-file-extension.d.ts.map +1 -1
- package/dist/rules/prefer-file-extension.js +3 -0
- package/dist/rules/prefer-file-extension.js.map +1 -1
- package/dist/rules/prefer-inputs-context.d.ts.map +1 -1
- package/dist/rules/prefer-inputs-context.js +3 -0
- package/dist/rules/prefer-inputs-context.js.map +1 -1
- package/dist/rules/prefer-step-uses-style.d.ts.map +1 -1
- package/dist/rules/prefer-step-uses-style.js +3 -0
- package/dist/rules/prefer-step-uses-style.js.map +1 -1
- package/dist/rules/prefer-template-yml-extension.d.ts.map +1 -1
- package/dist/rules/prefer-template-yml-extension.js +3 -0
- package/dist/rules/prefer-template-yml-extension.js.map +1 -1
- package/dist/rules/require-action-name.d.ts.map +1 -1
- package/dist/rules/require-action-name.js +3 -0
- package/dist/rules/require-action-name.js.map +1 -1
- package/dist/rules/require-action-run-name.d.ts.map +1 -1
- package/dist/rules/require-action-run-name.js +3 -0
- package/dist/rules/require-action-run-name.js.map +1 -1
- package/dist/rules/require-checkout-before-local-action.d.ts.map +1 -1
- package/dist/rules/require-checkout-before-local-action.js +3 -0
- package/dist/rules/require-checkout-before-local-action.js.map +1 -1
- package/dist/rules/require-codeql-actions-read.d.ts +9 -0
- package/dist/rules/require-codeql-actions-read.d.ts.map +1 -0
- package/dist/rules/require-codeql-actions-read.js +63 -0
- package/dist/rules/require-codeql-actions-read.js.map +1 -0
- package/dist/rules/require-codeql-branch-filters.d.ts +12 -0
- package/dist/rules/require-codeql-branch-filters.d.ts.map +1 -0
- package/dist/rules/require-codeql-branch-filters.js +83 -0
- package/dist/rules/require-codeql-branch-filters.js.map +1 -0
- package/dist/rules/require-codeql-category-when-language-matrix.d.ts +12 -0
- package/dist/rules/require-codeql-category-when-language-matrix.d.ts.map +1 -0
- package/dist/rules/require-codeql-category-when-language-matrix.js +68 -0
- package/dist/rules/require-codeql-category-when-language-matrix.js.map +1 -0
- package/dist/rules/require-codeql-pull-request-trigger.d.ts +9 -0
- package/dist/rules/require-codeql-pull-request-trigger.d.ts.map +1 -0
- package/dist/rules/require-codeql-pull-request-trigger.js +46 -0
- package/dist/rules/require-codeql-pull-request-trigger.js.map +1 -0
- package/dist/rules/require-codeql-schedule.d.ts +9 -0
- package/dist/rules/require-codeql-schedule.d.ts.map +1 -0
- package/dist/rules/require-codeql-schedule.js +46 -0
- package/dist/rules/require-codeql-schedule.js.map +1 -0
- package/dist/rules/require-codeql-security-events-write.d.ts +9 -0
- package/dist/rules/require-codeql-security-events-write.d.ts.map +1 -0
- package/dist/rules/require-codeql-security-events-write.js +53 -0
- package/dist/rules/require-codeql-security-events-write.js.map +1 -0
- package/dist/rules/require-composite-step-name.d.ts.map +1 -1
- package/dist/rules/require-composite-step-name.js +3 -0
- package/dist/rules/require-composite-step-name.js.map +1 -1
- package/dist/rules/require-dependabot-assignees.d.ts +9 -0
- package/dist/rules/require-dependabot-assignees.d.ts.map +1 -0
- package/dist/rules/require-dependabot-assignees.js +53 -0
- package/dist/rules/require-dependabot-assignees.js.map +1 -0
- package/dist/rules/require-dependabot-automation-permissions.d.ts +9 -0
- package/dist/rules/require-dependabot-automation-permissions.d.ts.map +1 -0
- package/dist/rules/require-dependabot-automation-permissions.js +68 -0
- package/dist/rules/require-dependabot-automation-permissions.js.map +1 -0
- package/dist/rules/require-dependabot-automation-pull-request-trigger.d.ts +12 -0
- package/dist/rules/require-dependabot-automation-pull-request-trigger.d.ts.map +1 -0
- package/dist/rules/require-dependabot-automation-pull-request-trigger.js +49 -0
- package/dist/rules/require-dependabot-automation-pull-request-trigger.js.map +1 -0
- package/dist/rules/require-dependabot-bot-actor-guard.d.ts +9 -0
- package/dist/rules/require-dependabot-bot-actor-guard.d.ts.map +1 -0
- package/dist/rules/require-dependabot-bot-actor-guard.js +64 -0
- package/dist/rules/require-dependabot-bot-actor-guard.js.map +1 -0
- package/dist/rules/require-dependabot-commit-message-include-scope.d.ts +9 -0
- package/dist/rules/require-dependabot-commit-message-include-scope.d.ts.map +1 -0
- package/dist/rules/require-dependabot-commit-message-include-scope.js +60 -0
- package/dist/rules/require-dependabot-commit-message-include-scope.js.map +1 -0
- package/dist/rules/require-dependabot-commit-message-prefix-development.d.ts +9 -0
- package/dist/rules/require-dependabot-commit-message-prefix-development.d.ts.map +1 -0
- package/dist/rules/require-dependabot-commit-message-prefix-development.js +75 -0
- package/dist/rules/require-dependabot-commit-message-prefix-development.js.map +1 -0
- package/dist/rules/require-dependabot-commit-message-prefix.d.ts +9 -0
- package/dist/rules/require-dependabot-commit-message-prefix.d.ts.map +1 -0
- package/dist/rules/require-dependabot-commit-message-prefix.js +60 -0
- package/dist/rules/require-dependabot-commit-message-prefix.js.map +1 -0
- package/dist/rules/require-dependabot-cooldown.d.ts +9 -0
- package/dist/rules/require-dependabot-cooldown.d.ts.map +1 -0
- package/dist/rules/require-dependabot-cooldown.js +52 -0
- package/dist/rules/require-dependabot-cooldown.js.map +1 -0
- package/dist/rules/require-dependabot-directory.d.ts +9 -0
- package/dist/rules/require-dependabot-directory.d.ts.map +1 -0
- package/dist/rules/require-dependabot-directory.js +68 -0
- package/dist/rules/require-dependabot-directory.js.map +1 -0
- package/dist/rules/require-dependabot-github-actions-directory-root.d.ts +9 -0
- package/dist/rules/require-dependabot-github-actions-directory-root.d.ts.map +1 -0
- package/dist/rules/require-dependabot-github-actions-directory-root.js +76 -0
- package/dist/rules/require-dependabot-github-actions-directory-root.js.map +1 -0
- package/dist/rules/require-dependabot-labels.d.ts +9 -0
- package/dist/rules/require-dependabot-labels.d.ts.map +1 -0
- package/dist/rules/require-dependabot-labels.js +52 -0
- package/dist/rules/require-dependabot-labels.js.map +1 -0
- package/dist/rules/require-dependabot-open-pull-requests-limit.d.ts +9 -0
- package/dist/rules/require-dependabot-open-pull-requests-limit.d.ts.map +1 -0
- package/dist/rules/require-dependabot-open-pull-requests-limit.js +55 -0
- package/dist/rules/require-dependabot-open-pull-requests-limit.js.map +1 -0
- package/dist/rules/require-dependabot-package-ecosystem.d.ts +9 -0
- package/dist/rules/require-dependabot-package-ecosystem.d.ts.map +1 -0
- package/dist/rules/require-dependabot-package-ecosystem.js +79 -0
- package/dist/rules/require-dependabot-package-ecosystem.js.map +1 -0
- package/dist/rules/require-dependabot-patterns-for-multi-ecosystem-group.d.ts +9 -0
- package/dist/rules/require-dependabot-patterns-for-multi-ecosystem-group.d.ts.map +1 -0
- package/dist/rules/require-dependabot-patterns-for-multi-ecosystem-group.js +58 -0
- package/dist/rules/require-dependabot-patterns-for-multi-ecosystem-group.js.map +1 -0
- package/dist/rules/require-dependabot-schedule-cronjob.d.ts +9 -0
- package/dist/rules/require-dependabot-schedule-cronjob.d.ts.map +1 -0
- package/dist/rules/require-dependabot-schedule-cronjob.js +82 -0
- package/dist/rules/require-dependabot-schedule-cronjob.js.map +1 -0
- package/dist/rules/require-dependabot-schedule-interval.d.ts +9 -0
- package/dist/rules/require-dependabot-schedule-interval.d.ts.map +1 -0
- package/dist/rules/require-dependabot-schedule-interval.js +73 -0
- package/dist/rules/require-dependabot-schedule-interval.js.map +1 -0
- package/dist/rules/require-dependabot-schedule-time.d.ts +9 -0
- package/dist/rules/require-dependabot-schedule-time.d.ts.map +1 -0
- package/dist/rules/require-dependabot-schedule-time.js +68 -0
- package/dist/rules/require-dependabot-schedule-time.js.map +1 -0
- package/dist/rules/require-dependabot-schedule-timezone.d.ts +9 -0
- package/dist/rules/require-dependabot-schedule-timezone.d.ts.map +1 -0
- package/dist/rules/require-dependabot-schedule-timezone.js +69 -0
- package/dist/rules/require-dependabot-schedule-timezone.js.map +1 -0
- package/dist/rules/require-dependabot-target-branch.d.ts +9 -0
- package/dist/rules/require-dependabot-target-branch.d.ts.map +1 -0
- package/dist/rules/require-dependabot-target-branch.js +53 -0
- package/dist/rules/require-dependabot-target-branch.js.map +1 -0
- package/dist/rules/require-dependabot-updates.d.ts +9 -0
- package/dist/rules/require-dependabot-updates.d.ts.map +1 -0
- package/dist/rules/require-dependabot-updates.js +54 -0
- package/dist/rules/require-dependabot-updates.js.map +1 -0
- package/dist/rules/require-dependabot-version.d.ts +9 -0
- package/dist/rules/require-dependabot-version.d.ts.map +1 -0
- package/dist/rules/require-dependabot-version.js +62 -0
- package/dist/rules/require-dependabot-version.js.map +1 -0
- package/dist/rules/require-dependabot-versioning-strategy-for-npm.d.ts +9 -0
- package/dist/rules/require-dependabot-versioning-strategy-for-npm.d.ts.map +1 -0
- package/dist/rules/require-dependabot-versioning-strategy-for-npm.js +58 -0
- package/dist/rules/require-dependabot-versioning-strategy-for-npm.js.map +1 -0
- package/dist/rules/require-dependency-review-action.d.ts +9 -0
- package/dist/rules/require-dependency-review-action.d.ts.map +1 -0
- package/dist/rules/require-dependency-review-action.js +51 -0
- package/dist/rules/require-dependency-review-action.js.map +1 -0
- package/dist/rules/require-dependency-review-fail-on-severity.d.ts +9 -0
- package/dist/rules/require-dependency-review-fail-on-severity.d.ts.map +1 -0
- package/dist/rules/require-dependency-review-fail-on-severity.js +62 -0
- package/dist/rules/require-dependency-review-fail-on-severity.js.map +1 -0
- package/dist/rules/require-dependency-review-permissions-contents-read.d.ts +9 -0
- package/dist/rules/require-dependency-review-permissions-contents-read.d.ts.map +1 -0
- package/dist/rules/require-dependency-review-permissions-contents-read.js +55 -0
- package/dist/rules/require-dependency-review-permissions-contents-read.js.map +1 -0
- package/dist/rules/require-dependency-review-pull-request-trigger.d.ts +9 -0
- package/dist/rules/require-dependency-review-pull-request-trigger.d.ts.map +1 -0
- package/dist/rules/require-dependency-review-pull-request-trigger.js +47 -0
- package/dist/rules/require-dependency-review-pull-request-trigger.js.map +1 -0
- package/dist/rules/require-fetch-metadata-github-token.d.ts +9 -0
- package/dist/rules/require-fetch-metadata-github-token.d.ts.map +1 -0
- package/dist/rules/require-fetch-metadata-github-token.js +57 -0
- package/dist/rules/require-fetch-metadata-github-token.js.map +1 -0
- package/dist/rules/require-job-name.d.ts.map +1 -1
- package/dist/rules/require-job-name.js +35 -0
- package/dist/rules/require-job-name.js.map +1 -1
- package/dist/rules/require-job-step-name.d.ts.map +1 -1
- package/dist/rules/require-job-step-name.js +76 -0
- package/dist/rules/require-job-step-name.js.map +1 -1
- package/dist/rules/require-job-timeout-minutes.d.ts.map +1 -1
- package/dist/rules/require-job-timeout-minutes.js +3 -0
- package/dist/rules/require-job-timeout-minutes.js.map +1 -1
- package/dist/rules/require-merge-group-trigger.d.ts.map +1 -1
- package/dist/rules/require-merge-group-trigger.js +3 -0
- package/dist/rules/require-merge-group-trigger.js.map +1 -1
- package/dist/rules/require-pull-request-target-branches.d.ts.map +1 -1
- package/dist/rules/require-pull-request-target-branches.js +3 -0
- package/dist/rules/require-pull-request-target-branches.js.map +1 -1
- package/dist/rules/require-run-step-shell.d.ts.map +1 -1
- package/dist/rules/require-run-step-shell.js +3 -0
- package/dist/rules/require-run-step-shell.js.map +1 -1
- package/dist/rules/require-sarif-upload-security-events-write.d.ts +9 -0
- package/dist/rules/require-sarif-upload-security-events-write.d.ts.map +1 -0
- package/dist/rules/require-sarif-upload-security-events-write.js +51 -0
- package/dist/rules/require-sarif-upload-security-events-write.js.map +1 -0
- package/dist/rules/require-scorecard-results-format-sarif.d.ts +9 -0
- package/dist/rules/require-scorecard-results-format-sarif.d.ts.map +1 -0
- package/dist/rules/require-scorecard-results-format-sarif.js +57 -0
- package/dist/rules/require-scorecard-results-format-sarif.js.map +1 -0
- package/dist/rules/require-scorecard-upload-sarif-step.d.ts +9 -0
- package/dist/rules/require-scorecard-upload-sarif-step.d.ts.map +1 -0
- package/dist/rules/require-scorecard-upload-sarif-step.js +46 -0
- package/dist/rules/require-scorecard-upload-sarif-step.js.map +1 -0
- package/dist/rules/require-secret-scan-contents-read.d.ts +12 -0
- package/dist/rules/require-secret-scan-contents-read.d.ts.map +1 -0
- package/dist/rules/require-secret-scan-contents-read.js +53 -0
- package/dist/rules/require-secret-scan-contents-read.js.map +1 -0
- package/dist/rules/require-secret-scan-fetch-depth-zero.d.ts +9 -0
- package/dist/rules/require-secret-scan-fetch-depth-zero.d.ts.map +1 -0
- package/dist/rules/require-secret-scan-fetch-depth-zero.js +77 -0
- package/dist/rules/require-secret-scan-fetch-depth-zero.js.map +1 -0
- package/dist/rules/require-secret-scan-schedule.d.ts +9 -0
- package/dist/rules/require-secret-scan-schedule.d.ts.map +1 -0
- package/dist/rules/require-secret-scan-schedule.js +46 -0
- package/dist/rules/require-secret-scan-schedule.js.map +1 -0
- package/dist/rules/require-template-categories.d.ts.map +1 -1
- package/dist/rules/require-template-categories.js +3 -0
- package/dist/rules/require-template-categories.js.map +1 -1
- package/dist/rules/require-template-file-patterns.d.ts.map +1 -1
- package/dist/rules/require-template-file-patterns.js +3 -0
- package/dist/rules/require-template-file-patterns.js.map +1 -1
- package/dist/rules/require-template-icon-file-exists.d.ts.map +1 -1
- package/dist/rules/require-template-icon-file-exists.js +3 -0
- package/dist/rules/require-template-icon-file-exists.js.map +1 -1
- package/dist/rules/require-template-icon-name.d.ts.map +1 -1
- package/dist/rules/require-template-icon-name.js +3 -0
- package/dist/rules/require-template-icon-name.js.map +1 -1
- package/dist/rules/require-template-workflow-name.d.ts.map +1 -1
- package/dist/rules/require-template-workflow-name.js +3 -0
- package/dist/rules/require-template-workflow-name.js.map +1 -1
- package/dist/rules/require-trigger-types.d.ts.map +1 -1
- package/dist/rules/require-trigger-types.js +3 -0
- package/dist/rules/require-trigger-types.js.map +1 -1
- package/dist/rules/require-trufflehog-verified-results-mode.d.ts +9 -0
- package/dist/rules/require-trufflehog-verified-results-mode.d.ts.map +1 -0
- package/dist/rules/require-trufflehog-verified-results-mode.js +59 -0
- package/dist/rules/require-trufflehog-verified-results-mode.js.map +1 -0
- package/dist/rules/require-workflow-call-input-type.d.ts.map +1 -1
- package/dist/rules/require-workflow-call-input-type.js +3 -0
- package/dist/rules/require-workflow-call-input-type.js.map +1 -1
- package/dist/rules/require-workflow-call-output-value.d.ts.map +1 -1
- package/dist/rules/require-workflow-call-output-value.js +3 -0
- package/dist/rules/require-workflow-call-output-value.js.map +1 -1
- package/dist/rules/require-workflow-concurrency.d.ts.map +1 -1
- package/dist/rules/require-workflow-concurrency.js +3 -0
- package/dist/rules/require-workflow-concurrency.js.map +1 -1
- package/dist/rules/require-workflow-dispatch-input-type.d.ts.map +1 -1
- package/dist/rules/require-workflow-dispatch-input-type.js +3 -0
- package/dist/rules/require-workflow-dispatch-input-type.js.map +1 -1
- package/dist/rules/require-workflow-interface-description.d.ts.map +1 -1
- package/dist/rules/require-workflow-interface-description.js +3 -0
- package/dist/rules/require-workflow-interface-description.js.map +1 -1
- package/dist/rules/require-workflow-permissions.d.ts.map +1 -1
- package/dist/rules/require-workflow-permissions.js +3 -0
- package/dist/rules/require-workflow-permissions.js.map +1 -1
- package/dist/rules/require-workflow-run-branches.d.ts.map +1 -1
- package/dist/rules/require-workflow-run-branches.js +3 -0
- package/dist/rules/require-workflow-run-branches.js.map +1 -1
- package/dist/rules/require-workflow-template-pair.d.ts.map +1 -1
- package/dist/rules/require-workflow-template-pair.js +3 -0
- package/dist/rules/require-workflow-template-pair.js.map +1 -1
- package/dist/rules/require-workflow-template-properties-pair.d.ts.map +1 -1
- package/dist/rules/require-workflow-template-properties-pair.js +3 -0
- package/dist/rules/require-workflow-template-properties-pair.js.map +1 -1
- package/dist/rules/valid-timeout-minutes.d.ts.map +1 -1
- package/dist/rules/valid-timeout-minutes.js +3 -0
- package/dist/rules/valid-timeout-minutes.js.map +1 -1
- package/dist/rules/valid-trigger-events.d.ts.map +1 -1
- package/dist/rules/valid-trigger-events.js +3 -0
- package/dist/rules/valid-trigger-events.js.map +1 -1
- package/docs/rules/action-name-casing.md +6 -2
- package/docs/rules/no-codeql-autobuild-for-javascript-typescript.md +55 -0
- package/docs/rules/no-codeql-javascript-typescript-split-language-matrix.md +51 -0
- package/docs/rules/no-empty-template-file-pattern.md +5 -1
- package/docs/rules/no-icon-file-extension-in-template-icon-name.md +5 -1
- package/docs/rules/no-overlapping-dependabot-directories.md +87 -0
- package/docs/rules/no-path-separators-in-template-icon-name.md +5 -1
- package/docs/rules/no-post-if-without-post.md +5 -1
- package/docs/rules/no-pre-if-without-pre.md +5 -1
- package/docs/rules/no-required-input-with-default.md +10 -1
- package/docs/rules/no-unknown-dependabot-multi-ecosystem-group.md +62 -0
- package/docs/rules/no-unused-dependabot-enable-beta-ecosystems.md +63 -0
- package/docs/rules/overview.md +47 -1
- package/docs/rules/prefer-inputs-context.md +6 -2
- package/docs/rules/presets/action-metadata.md +22 -11
- package/docs/rules/presets/all.md +125 -69
- package/docs/rules/presets/code-scanning.md +33 -0
- package/docs/rules/presets/dependabot.md +40 -0
- package/docs/rules/presets/index.md +139 -81
- package/docs/rules/presets/recommended.md +30 -19
- package/docs/rules/presets/security.md +35 -9
- package/docs/rules/presets/strict.md +52 -41
- package/docs/rules/presets/workflow-template-properties.md +22 -11
- package/docs/rules/presets/workflow-templates.md +26 -15
- package/docs/rules/require-codeql-actions-read.md +50 -0
- package/docs/rules/require-codeql-branch-filters.md +53 -0
- package/docs/rules/require-codeql-category-when-language-matrix.md +49 -0
- package/docs/rules/require-codeql-pull-request-trigger.md +53 -0
- package/docs/rules/require-codeql-schedule.md +57 -0
- package/docs/rules/require-codeql-security-events-write.md +50 -0
- package/docs/rules/require-dependabot-assignees.md +64 -0
- package/docs/rules/require-dependabot-automation-permissions.md +53 -0
- package/docs/rules/require-dependabot-automation-pull-request-trigger.md +49 -0
- package/docs/rules/require-dependabot-bot-actor-guard.md +52 -0
- package/docs/rules/require-dependabot-commit-message-include-scope.md +58 -0
- package/docs/rules/require-dependabot-commit-message-prefix-development.md +60 -0
- package/docs/rules/require-dependabot-commit-message-prefix.md +64 -0
- package/docs/rules/require-dependabot-cooldown.md +59 -0
- package/docs/rules/require-dependabot-directory.md +79 -0
- package/docs/rules/require-dependabot-github-actions-directory-root.md +62 -0
- package/docs/rules/require-dependabot-labels.md +65 -0
- package/docs/rules/require-dependabot-open-pull-requests-limit.md +58 -0
- package/docs/rules/require-dependabot-package-ecosystem.md +57 -0
- package/docs/rules/require-dependabot-patterns-for-multi-ecosystem-group.md +67 -0
- package/docs/rules/require-dependabot-schedule-cronjob.md +74 -0
- package/docs/rules/require-dependabot-schedule-interval.md +66 -0
- package/docs/rules/require-dependabot-schedule-time.md +60 -0
- package/docs/rules/require-dependabot-schedule-timezone.md +61 -0
- package/docs/rules/require-dependabot-target-branch.md +63 -0
- package/docs/rules/require-dependabot-updates.md +58 -0
- package/docs/rules/require-dependabot-version.md +70 -0
- package/docs/rules/require-dependabot-versioning-strategy-for-npm.md +58 -0
- package/docs/rules/require-dependency-review-action.md +60 -0
- package/docs/rules/require-dependency-review-fail-on-severity.md +57 -0
- package/docs/rules/require-dependency-review-permissions-contents-read.md +62 -0
- package/docs/rules/require-dependency-review-pull-request-trigger.md +57 -0
- package/docs/rules/require-fetch-metadata-github-token.md +49 -0
- package/docs/rules/require-job-name.md +6 -2
- package/docs/rules/require-job-step-name.md +11 -2
- package/docs/rules/require-sarif-upload-security-events-write.md +50 -0
- package/docs/rules/require-scorecard-results-format-sarif.md +49 -0
- package/docs/rules/require-scorecard-upload-sarif-step.md +55 -0
- package/docs/rules/require-secret-scan-contents-read.md +48 -0
- package/docs/rules/require-secret-scan-fetch-depth-zero.md +50 -0
- package/docs/rules/require-secret-scan-schedule.md +50 -0
- package/docs/rules/require-trufflehog-verified-results-mode.md +49 -0
- package/package.json +50 -57
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { getDependabotAutomationRunSteps } from "../_internal/dependabot-automation-workflow.js";
|
|
2
|
+
import { hasRequiredWorkflowPermission } from "../_internal/workflow-permissions.js";
|
|
3
|
+
import { getWorkflowRoot } from "../_internal/workflow-yaml.js";
|
|
4
|
+
/** Rule implementation for Dependabot automation permission requirements. */
|
|
5
|
+
const rule = {
|
|
6
|
+
create(context) {
|
|
7
|
+
return {
|
|
8
|
+
Program() {
|
|
9
|
+
const root = getWorkflowRoot(context);
|
|
10
|
+
if (root === null) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
for (const step of getDependabotAutomationRunSteps(root)) {
|
|
14
|
+
if (!hasRequiredWorkflowPermission(root, step.job, "pull-requests", "write")) {
|
|
15
|
+
context.report({
|
|
16
|
+
data: { jobId: step.job.id },
|
|
17
|
+
messageId: "missingPullRequestsWrite",
|
|
18
|
+
node: step.job.idNode,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
if (step.runScript.includes("gh pr edit") &&
|
|
22
|
+
step.runScript.includes("--add-label") &&
|
|
23
|
+
!hasRequiredWorkflowPermission(root, step.job, "issues", "write")) {
|
|
24
|
+
context.report({
|
|
25
|
+
data: { jobId: step.job.id },
|
|
26
|
+
messageId: "missingIssuesWrite",
|
|
27
|
+
node: step.job.idNode,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
if (step.runScript.includes("gh pr merge") &&
|
|
31
|
+
!hasRequiredWorkflowPermission(root, step.job, "contents", "write")) {
|
|
32
|
+
context.report({
|
|
33
|
+
data: { jobId: step.job.id },
|
|
34
|
+
messageId: "missingContentsWrite",
|
|
35
|
+
node: step.job.idNode,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
meta: {
|
|
43
|
+
deprecated: false,
|
|
44
|
+
docs: {
|
|
45
|
+
configs: [
|
|
46
|
+
"github-actions.configs.all",
|
|
47
|
+
"github-actions.configs.security",
|
|
48
|
+
],
|
|
49
|
+
description: "require minimum GitHub token permissions for Dependabot pull request automation steps.",
|
|
50
|
+
dialects: ["GitHub Actions workflow"],
|
|
51
|
+
frozen: false,
|
|
52
|
+
recommended: true,
|
|
53
|
+
requiresTypeChecking: false,
|
|
54
|
+
ruleId: "R111",
|
|
55
|
+
ruleNumber: 111,
|
|
56
|
+
url: "https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-automation-permissions",
|
|
57
|
+
},
|
|
58
|
+
messages: {
|
|
59
|
+
missingContentsWrite: "Job '{{jobId}}' uses `gh pr merge` and should grant `contents: write`.",
|
|
60
|
+
missingIssuesWrite: "Job '{{jobId}}' edits pull request labels and should grant `issues: write`.",
|
|
61
|
+
missingPullRequestsWrite: "Job '{{jobId}}' automates pull requests and should grant `pull-requests: write`.",
|
|
62
|
+
},
|
|
63
|
+
schema: [],
|
|
64
|
+
type: "problem",
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
export default rule;
|
|
68
|
+
//# sourceMappingURL=require-dependabot-automation-permissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-dependabot-automation-permissions.js","sourceRoot":"","sources":["../../src/rules/require-dependabot-automation-permissions.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,+BAA+B,EAAE,MAAM,gDAAgD,CAAC;AACjG,OAAO,EAAE,6BAA6B,EAAE,MAAM,sCAAsC,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,6EAA6E;AAC7E,MAAM,IAAI,GAAoB;IAC1B,MAAM,CAAC,OAAO;QACV,OAAO;YACH,OAAO;gBACH,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;gBAEtC,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;oBAChB,OAAO;gBACX,CAAC;gBAED,KAAK,MAAM,IAAI,IAAI,+BAA+B,CAAC,IAAI,CAAC,EAAE,CAAC;oBACvD,IACI,CAAC,6BAA6B,CAC1B,IAAI,EACJ,IAAI,CAAC,GAAG,EACR,eAAe,EACf,OAAO,CACV,EACH,CAAC;wBACC,OAAO,CAAC,MAAM,CAAC;4BACX,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE;4BAC5B,SAAS,EAAE,0BAA0B;4BACrC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,MAA8B;yBAChD,CAAC,CAAC;oBACP,CAAC;oBAED,IACI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC;wBACrC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC;wBACtC,CAAC,6BAA6B,CAC1B,IAAI,EACJ,IAAI,CAAC,GAAG,EACR,QAAQ,EACR,OAAO,CACV,EACH,CAAC;wBACC,OAAO,CAAC,MAAM,CAAC;4BACX,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE;4BAC5B,SAAS,EAAE,oBAAoB;4BAC/B,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,MAA8B;yBAChD,CAAC,CAAC;oBACP,CAAC;oBAED,IACI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC;wBACtC,CAAC,6BAA6B,CAC1B,IAAI,EACJ,IAAI,CAAC,GAAG,EACR,UAAU,EACV,OAAO,CACV,EACH,CAAC;wBACC,OAAO,CAAC,MAAM,CAAC;4BACX,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE;4BAC5B,SAAS,EAAE,sBAAsB;4BACjC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,MAA8B;yBAChD,CAAC,CAAC;oBACP,CAAC;gBACL,CAAC;YACL,CAAC;SACJ,CAAC;IACN,CAAC;IACD,IAAI,EAAE;QACF,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE;YACF,OAAO,EAAE;gBACL,4BAA4B;gBAC5B,iCAAiC;aACpC;YACD,WAAW,EACP,wFAAwF;YAC5F,QAAQ,EAAE,CAAC,yBAAyB,CAAC;YACrC,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,IAAI;YACjB,oBAAoB,EAAE,KAAK;YAC3B,MAAM,EAAE,MAAM;YACd,UAAU,EAAE,GAAG;YACf,GAAG,EAAE,kHAAkH;SAC1H;QACD,QAAQ,EAAE;YACN,oBAAoB,EAChB,wEAAwE;YAC5E,kBAAkB,EACd,6EAA6E;YACjF,wBAAwB,EACpB,kFAAkF;SACzF;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,SAAS;KACG;CACzB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* Require Dependabot pull request automation workflows to run on pull_request.
|
|
4
|
+
*/
|
|
5
|
+
import type { Rule } from "eslint";
|
|
6
|
+
/**
|
|
7
|
+
* Rule implementation for requiring pull_request on Dependabot automation
|
|
8
|
+
* workflows.
|
|
9
|
+
*/
|
|
10
|
+
declare const rule: Rule.RuleModule;
|
|
11
|
+
export default rule;
|
|
12
|
+
//# sourceMappingURL=require-dependabot-automation-pull-request-trigger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-dependabot-automation-pull-request-trigger.d.ts","sourceRoot":"","sources":["../../src/rules/require-dependabot-automation-pull-request-trigger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAQnC;;;GAGG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UA6ChB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { hasDependabotAutomation } from "../_internal/dependabot-automation-workflow.js";
|
|
2
|
+
import { getWorkflowEventNames, getWorkflowRoot, } from "../_internal/workflow-yaml.js";
|
|
3
|
+
/**
|
|
4
|
+
* Rule implementation for requiring pull_request on Dependabot automation
|
|
5
|
+
* workflows.
|
|
6
|
+
*/
|
|
7
|
+
const rule = {
|
|
8
|
+
create(context) {
|
|
9
|
+
return {
|
|
10
|
+
Program(node) {
|
|
11
|
+
const root = getWorkflowRoot(context);
|
|
12
|
+
if (root === null || !hasDependabotAutomation(root)) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
if (getWorkflowEventNames(root).has("pull_request")) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
context.report({
|
|
19
|
+
messageId: "missingPullRequestTrigger",
|
|
20
|
+
node: node,
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
meta: {
|
|
26
|
+
deprecated: false,
|
|
27
|
+
docs: {
|
|
28
|
+
configs: [
|
|
29
|
+
"github-actions.configs.all",
|
|
30
|
+
"github-actions.configs.security",
|
|
31
|
+
],
|
|
32
|
+
description: "require Dependabot pull request automation workflows to listen for `pull_request`.",
|
|
33
|
+
dialects: ["GitHub Actions workflow"],
|
|
34
|
+
frozen: false,
|
|
35
|
+
recommended: true,
|
|
36
|
+
requiresTypeChecking: false,
|
|
37
|
+
ruleId: "R112",
|
|
38
|
+
ruleNumber: 112,
|
|
39
|
+
url: "https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-automation-pull-request-trigger",
|
|
40
|
+
},
|
|
41
|
+
messages: {
|
|
42
|
+
missingPullRequestTrigger: "Dependabot pull request automation workflows should listen for `pull_request`.",
|
|
43
|
+
},
|
|
44
|
+
schema: [],
|
|
45
|
+
type: "problem",
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
export default rule;
|
|
49
|
+
//# sourceMappingURL=require-dependabot-automation-pull-request-trigger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-dependabot-automation-pull-request-trigger.js","sourceRoot":"","sources":["../../src/rules/require-dependabot-automation-pull-request-trigger.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AACzF,OAAO,EACH,qBAAqB,EACrB,eAAe,GAClB,MAAM,+BAA+B,CAAC;AAEvC;;;GAGG;AACH,MAAM,IAAI,GAAoB;IAC1B,MAAM,CAAC,OAAO;QACV,OAAO;YACH,OAAO,CAAC,IAAI;gBACR,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;gBAEtC,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,EAAE,CAAC;oBAClD,OAAO;gBACX,CAAC;gBAED,IAAI,qBAAqB,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC;oBAClD,OAAO;gBACX,CAAC;gBAED,OAAO,CAAC,MAAM,CAAC;oBACX,SAAS,EAAE,2BAA2B;oBACtC,IAAI,EAAE,IAA4B;iBACrC,CAAC,CAAC;YACP,CAAC;SACJ,CAAC;IACN,CAAC;IACD,IAAI,EAAE;QACF,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE;YACF,OAAO,EAAE;gBACL,4BAA4B;gBAC5B,iCAAiC;aACpC;YACD,WAAW,EACP,oFAAoF;YACxF,QAAQ,EAAE,CAAC,yBAAyB,CAAC;YACrC,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,IAAI;YACjB,oBAAoB,EAAE,KAAK;YAC3B,MAAM,EAAE,MAAM;YACd,UAAU,EAAE,GAAG;YACf,GAAG,EAAE,2HAA2H;SACnI;QACD,QAAQ,EAAE;YACN,yBAAyB,EACrB,gFAAgF;SACvF;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,SAAS;KACG;CACzB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* Require Dependabot automation jobs or steps to guard on the Dependabot bot actor.
|
|
4
|
+
*/
|
|
5
|
+
import type { Rule } from "eslint";
|
|
6
|
+
/** Rule implementation for Dependabot bot guard requirements. */
|
|
7
|
+
declare const rule: Rule.RuleModule;
|
|
8
|
+
export default rule;
|
|
9
|
+
//# sourceMappingURL=require-dependabot-bot-actor-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-dependabot-bot-actor-guard.d.ts","sourceRoot":"","sources":["../../src/rules/require-dependabot-bot-actor-guard.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAgBnC,iEAAiE;AACjE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UA0EhB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { getDependabotAutomationRunSteps, getDependabotFetchMetadataSteps, hasDependabotAutomation, } from "../_internal/dependabot-automation-workflow.js";
|
|
2
|
+
import { getMappingPair, getScalarStringValue, getWorkflowRoot, } from "../_internal/workflow-yaml.js";
|
|
3
|
+
const hasDependabotBotGuard = (value) => typeof value === "string" && value.includes("dependabot[bot]");
|
|
4
|
+
/** Rule implementation for Dependabot bot guard requirements. */
|
|
5
|
+
const rule = {
|
|
6
|
+
create(context) {
|
|
7
|
+
return {
|
|
8
|
+
Program() {
|
|
9
|
+
const root = getWorkflowRoot(context);
|
|
10
|
+
if (root === null || !hasDependabotAutomation(root)) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const runStepsByJobId = new Map(getDependabotAutomationRunSteps(root).map((step) => [
|
|
14
|
+
step.job.id,
|
|
15
|
+
step,
|
|
16
|
+
]));
|
|
17
|
+
for (const step of getDependabotFetchMetadataSteps(root)) {
|
|
18
|
+
const jobIfValue = getScalarStringValue(getMappingPair(step.job.mapping, "if")?.value ?? null);
|
|
19
|
+
if (hasDependabotBotGuard(jobIfValue)) {
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
const pairedRunStep = runStepsByJobId.get(step.job.id);
|
|
23
|
+
const runStepIfValue = getScalarStringValue(pairedRunStep
|
|
24
|
+
? (getMappingPair(pairedRunStep.stepMapping, "if")
|
|
25
|
+
?.value ?? null)
|
|
26
|
+
: null);
|
|
27
|
+
if (pairedRunStep !== undefined &&
|
|
28
|
+
hasDependabotBotGuard(runStepIfValue)) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
context.report({
|
|
32
|
+
data: { jobId: step.job.id },
|
|
33
|
+
messageId: "missingDependabotBotGuard",
|
|
34
|
+
node: step.job.idNode,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
meta: {
|
|
41
|
+
deprecated: false,
|
|
42
|
+
docs: {
|
|
43
|
+
configs: [
|
|
44
|
+
"github-actions.configs.all",
|
|
45
|
+
"github-actions.configs.security",
|
|
46
|
+
],
|
|
47
|
+
description: "require Dependabot automation jobs to guard execution on `dependabot[bot]`.",
|
|
48
|
+
dialects: ["GitHub Actions workflow"],
|
|
49
|
+
frozen: false,
|
|
50
|
+
recommended: true,
|
|
51
|
+
requiresTypeChecking: false,
|
|
52
|
+
ruleId: "R109",
|
|
53
|
+
ruleNumber: 109,
|
|
54
|
+
url: "https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-bot-actor-guard",
|
|
55
|
+
},
|
|
56
|
+
messages: {
|
|
57
|
+
missingDependabotBotGuard: "Job '{{jobId}}' automates Dependabot pull requests and should guard execution on `dependabot[bot]`.",
|
|
58
|
+
},
|
|
59
|
+
schema: [],
|
|
60
|
+
type: "problem",
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
export default rule;
|
|
64
|
+
//# sourceMappingURL=require-dependabot-bot-actor-guard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-dependabot-bot-actor-guard.js","sourceRoot":"","sources":["../../src/rules/require-dependabot-bot-actor-guard.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,+BAA+B,EAC/B,+BAA+B,EAC/B,uBAAuB,GAC1B,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACH,cAAc,EACd,oBAAoB,EACpB,eAAe,GAClB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,qBAAqB,GAAG,CAAC,KAAgC,EAAW,EAAE,CACxE,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AAEnE,iEAAiE;AACjE,MAAM,IAAI,GAAoB;IAC1B,MAAM,CAAC,OAAO;QACV,OAAO;YACH,OAAO;gBACH,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;gBAEtC,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,EAAE,CAAC;oBAClD,OAAO;gBACX,CAAC;gBAED,MAAM,eAAe,GAAG,IAAI,GAAG,CAC3B,+BAA+B,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;oBAChD,IAAI,CAAC,GAAG,CAAC,EAAE;oBACX,IAAI;iBACP,CAAC,CACL,CAAC;gBAEF,KAAK,MAAM,IAAI,IAAI,+BAA+B,CAAC,IAAI,CAAC,EAAE,CAAC;oBACvD,MAAM,UAAU,GAAG,oBAAoB,CACnC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,KAAK,IAAI,IAAI,CACxD,CAAC;oBAEF,IAAI,qBAAqB,CAAC,UAAU,CAAC,EAAE,CAAC;wBACpC,SAAS;oBACb,CAAC;oBAED,MAAM,aAAa,GAAG,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;oBACvD,MAAM,cAAc,GAAG,oBAAoB,CACvC,aAAa;wBACT,CAAC,CAAC,CAAC,cAAc,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,CAAC;4BAC5C,EAAE,KAAK,IAAI,IAAI,CAAC;wBACtB,CAAC,CAAC,IAAI,CACb,CAAC;oBAEF,IACI,aAAa,KAAK,SAAS;wBAC3B,qBAAqB,CAAC,cAAc,CAAC,EACvC,CAAC;wBACC,SAAS;oBACb,CAAC;oBAED,OAAO,CAAC,MAAM,CAAC;wBACX,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE;wBAC5B,SAAS,EAAE,2BAA2B;wBACtC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,MAA8B;qBAChD,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;SACJ,CAAC;IACN,CAAC;IACD,IAAI,EAAE;QACF,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE;YACF,OAAO,EAAE;gBACL,4BAA4B;gBAC5B,iCAAiC;aACpC;YACD,WAAW,EACP,6EAA6E;YACjF,QAAQ,EAAE,CAAC,yBAAyB,CAAC;YACrC,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,IAAI;YACjB,oBAAoB,EAAE,KAAK;YAC3B,MAAM,EAAE,MAAM;YACd,UAAU,EAAE,GAAG;YACf,GAAG,EAAE,2GAA2G;SACnH;QACD,QAAQ,EAAE;YACN,yBAAyB,EACrB,qGAAqG;SAC5G;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,SAAS;KACG;CACzB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* Require Dependabot commit messages to include dependency scope information.
|
|
4
|
+
*/
|
|
5
|
+
import type { Rule } from "eslint";
|
|
6
|
+
/** Rule implementation for commit-message.include requirements. */
|
|
7
|
+
declare const rule: Rule.RuleModule;
|
|
8
|
+
export default rule;
|
|
9
|
+
//# sourceMappingURL=require-dependabot-commit-message-include-scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-dependabot-commit-message-include-scope.d.ts","sourceRoot":"","sources":["../../src/rules/require-dependabot-commit-message-include-scope.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAWnC,mEAAmE;AACnE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAsEhB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { getDependabotMappingStringValue, getDependabotRoot, getDependabotUpdateEntries, getDependabotUpdateLabel, getEffectiveDependabotUpdateMapping, } from "../_internal/dependabot-yaml.js";
|
|
2
|
+
import { getMappingPair } from "../_internal/workflow-yaml.js";
|
|
3
|
+
/** Rule implementation for commit-message.include requirements. */
|
|
4
|
+
const rule = {
|
|
5
|
+
create(context) {
|
|
6
|
+
return {
|
|
7
|
+
Program() {
|
|
8
|
+
const root = getDependabotRoot(context);
|
|
9
|
+
if (root === null) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
for (const update of getDependabotUpdateEntries(root)) {
|
|
13
|
+
const commitMessageMapping = getEffectiveDependabotUpdateMapping(root, update, "commit-message");
|
|
14
|
+
const includePair = commitMessageMapping === null
|
|
15
|
+
? null
|
|
16
|
+
: getMappingPair(commitMessageMapping, "include");
|
|
17
|
+
const includeValue = commitMessageMapping === null
|
|
18
|
+
? null
|
|
19
|
+
: getDependabotMappingStringValue(commitMessageMapping, "include");
|
|
20
|
+
if (includeValue === "scope") {
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
context.report({
|
|
24
|
+
data: {
|
|
25
|
+
updateLabel: getDependabotUpdateLabel(update),
|
|
26
|
+
},
|
|
27
|
+
messageId: "missingCommitMessageIncludeScope",
|
|
28
|
+
node: (includePair?.value ??
|
|
29
|
+
includePair ??
|
|
30
|
+
update.node),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
meta: {
|
|
37
|
+
deprecated: false,
|
|
38
|
+
docs: {
|
|
39
|
+
configs: [
|
|
40
|
+
"github-actions.configs.all",
|
|
41
|
+
"github-actions.configs.dependabot",
|
|
42
|
+
],
|
|
43
|
+
description: 'require Dependabot commit messages to set `commit-message.include: "scope"`.',
|
|
44
|
+
dialects: ["Dependabot configuration"],
|
|
45
|
+
frozen: false,
|
|
46
|
+
recommended: true,
|
|
47
|
+
requiresTypeChecking: false,
|
|
48
|
+
ruleId: "R089",
|
|
49
|
+
ruleNumber: 89,
|
|
50
|
+
url: "https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-commit-message-include-scope",
|
|
51
|
+
},
|
|
52
|
+
messages: {
|
|
53
|
+
missingCommitMessageIncludeScope: '{{updateLabel}} should set `commit-message.include: "scope"` so Dependabot pull request titles indicate dependency scope clearly.',
|
|
54
|
+
},
|
|
55
|
+
schema: [],
|
|
56
|
+
type: "suggestion",
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
export default rule;
|
|
60
|
+
//# sourceMappingURL=require-dependabot-commit-message-include-scope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-dependabot-commit-message-include-scope.js","sourceRoot":"","sources":["../../src/rules/require-dependabot-commit-message-include-scope.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,+BAA+B,EAC/B,iBAAiB,EACjB,0BAA0B,EAC1B,wBAAwB,EACxB,mCAAmC,GACtC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,mEAAmE;AACnE,MAAM,IAAI,GAAoB;IAC1B,MAAM,CAAC,OAAO;QACV,OAAO;YACH,OAAO;gBACH,MAAM,IAAI,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;gBAExC,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;oBAChB,OAAO;gBACX,CAAC;gBAED,KAAK,MAAM,MAAM,IAAI,0BAA0B,CAAC,IAAI,CAAC,EAAE,CAAC;oBACpD,MAAM,oBAAoB,GACtB,mCAAmC,CAC/B,IAAI,EACJ,MAAM,EACN,gBAAgB,CACnB,CAAC;oBACN,MAAM,WAAW,GACb,oBAAoB,KAAK,IAAI;wBACzB,CAAC,CAAC,IAAI;wBACN,CAAC,CAAC,cAAc,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC;oBAC1D,MAAM,YAAY,GACd,oBAAoB,KAAK,IAAI;wBACzB,CAAC,CAAC,IAAI;wBACN,CAAC,CAAC,+BAA+B,CAC3B,oBAAoB,EACpB,SAAS,CACZ,CAAC;oBAEZ,IAAI,YAAY,KAAK,OAAO,EAAE,CAAC;wBAC3B,SAAS;oBACb,CAAC;oBAED,OAAO,CAAC,MAAM,CAAC;wBACX,IAAI,EAAE;4BACF,WAAW,EAAE,wBAAwB,CAAC,MAAM,CAAC;yBAChD;wBACD,SAAS,EAAE,kCAAkC;wBAC7C,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK;4BACrB,WAAW;4BACX,MAAM,CAAC,IAAI,CAAyB;qBAC3C,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;SACJ,CAAC;IACN,CAAC;IACD,IAAI,EAAE;QACF,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE;YACF,OAAO,EAAE;gBACL,4BAA4B;gBAC5B,mCAAmC;aACtC;YACD,WAAW,EACP,8EAA8E;YAClF,QAAQ,EAAE,CAAC,0BAA0B,CAAC;YACtC,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,IAAI;YACjB,oBAAoB,EAAE,KAAK;YAC3B,MAAM,EAAE,MAAM;YACd,UAAU,EAAE,EAAE;YACd,GAAG,EAAE,wHAAwH;SAChI;QACD,QAAQ,EAAE;YACN,gCAAgC,EAC5B,mIAAmI;SAC1I;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,YAAY;KACA;CACzB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* Require npm-like Dependabot update entries to define commit-message.prefix-development.
|
|
4
|
+
*/
|
|
5
|
+
import type { Rule } from "eslint";
|
|
6
|
+
/** Rule implementation for commit-message.prefix-development requirements. */
|
|
7
|
+
declare const rule: Rule.RuleModule;
|
|
8
|
+
export default rule;
|
|
9
|
+
//# sourceMappingURL=require-dependabot-commit-message-prefix-development.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-dependabot-commit-message-prefix-development.d.ts","sourceRoot":"","sources":["../../src/rules/require-dependabot-commit-message-prefix-development.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAqBnC,8EAA8E;AAC9E,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAqFhB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { getDependabotMappingStringValue, getDependabotRoot, getDependabotUpdateEntries, getDependabotUpdateLabel, getEffectiveDependabotUpdateMapping, } from "../_internal/dependabot-yaml.js";
|
|
2
|
+
import { getMappingPair } from "../_internal/workflow-yaml.js";
|
|
3
|
+
const ecosystemsSupportingPrefixDevelopment = new Set([
|
|
4
|
+
"bundler",
|
|
5
|
+
"composer",
|
|
6
|
+
"maven",
|
|
7
|
+
"mix",
|
|
8
|
+
"npm",
|
|
9
|
+
"pip",
|
|
10
|
+
"uv",
|
|
11
|
+
]);
|
|
12
|
+
/** Rule implementation for commit-message.prefix-development requirements. */
|
|
13
|
+
const rule = {
|
|
14
|
+
create(context) {
|
|
15
|
+
return {
|
|
16
|
+
Program() {
|
|
17
|
+
const root = getDependabotRoot(context);
|
|
18
|
+
if (root === null) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
for (const update of getDependabotUpdateEntries(root)) {
|
|
22
|
+
const packageEcosystem = update.packageEcosystem?.trim();
|
|
23
|
+
if (packageEcosystem === undefined ||
|
|
24
|
+
packageEcosystem === null ||
|
|
25
|
+
!ecosystemsSupportingPrefixDevelopment.has(packageEcosystem)) {
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
const commitMessageMapping = getEffectiveDependabotUpdateMapping(root, update, "commit-message");
|
|
29
|
+
const prefixDevelopmentPair = commitMessageMapping === null
|
|
30
|
+
? null
|
|
31
|
+
: getMappingPair(commitMessageMapping, "prefix-development");
|
|
32
|
+
const prefixDevelopmentValue = commitMessageMapping === null
|
|
33
|
+
? null
|
|
34
|
+
: getDependabotMappingStringValue(commitMessageMapping, "prefix-development");
|
|
35
|
+
if (prefixDevelopmentValue !== null) {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
context.report({
|
|
39
|
+
data: {
|
|
40
|
+
updateLabel: getDependabotUpdateLabel(update),
|
|
41
|
+
},
|
|
42
|
+
messageId: "missingPrefixDevelopment",
|
|
43
|
+
node: (prefixDevelopmentPair?.value ??
|
|
44
|
+
prefixDevelopmentPair ??
|
|
45
|
+
update.node),
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
meta: {
|
|
52
|
+
deprecated: false,
|
|
53
|
+
docs: {
|
|
54
|
+
configs: [
|
|
55
|
+
"github-actions.configs.all",
|
|
56
|
+
"github-actions.configs.dependabot",
|
|
57
|
+
],
|
|
58
|
+
description: "require npm-like Dependabot update entries to define `commit-message.prefix-development`.",
|
|
59
|
+
dialects: ["Dependabot configuration"],
|
|
60
|
+
frozen: false,
|
|
61
|
+
recommended: true,
|
|
62
|
+
requiresTypeChecking: false,
|
|
63
|
+
ruleId: "R090",
|
|
64
|
+
ruleNumber: 90,
|
|
65
|
+
url: "https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-commit-message-prefix-development",
|
|
66
|
+
},
|
|
67
|
+
messages: {
|
|
68
|
+
missingPrefixDevelopment: "{{updateLabel}} should define `commit-message.prefix-development` so development dependency updates have a distinct title convention.",
|
|
69
|
+
},
|
|
70
|
+
schema: [],
|
|
71
|
+
type: "suggestion",
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
export default rule;
|
|
75
|
+
//# sourceMappingURL=require-dependabot-commit-message-prefix-development.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-dependabot-commit-message-prefix-development.js","sourceRoot":"","sources":["../../src/rules/require-dependabot-commit-message-prefix-development.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,+BAA+B,EAC/B,iBAAiB,EACjB,0BAA0B,EAC1B,wBAAwB,EACxB,mCAAmC,GACtC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,MAAM,qCAAqC,GAAG,IAAI,GAAG,CAAC;IAClD,SAAS;IACT,UAAU;IACV,OAAO;IACP,KAAK;IACL,KAAK;IACL,KAAK;IACL,IAAI;CACP,CAAC,CAAC;AAEH,8EAA8E;AAC9E,MAAM,IAAI,GAAoB;IAC1B,MAAM,CAAC,OAAO;QACV,OAAO;YACH,OAAO;gBACH,MAAM,IAAI,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;gBAExC,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;oBAChB,OAAO;gBACX,CAAC;gBAED,KAAK,MAAM,MAAM,IAAI,0BAA0B,CAAC,IAAI,CAAC,EAAE,CAAC;oBACpD,MAAM,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,EAAE,IAAI,EAAE,CAAC;oBAEzD,IACI,gBAAgB,KAAK,SAAS;wBAC9B,gBAAgB,KAAK,IAAI;wBACzB,CAAC,qCAAqC,CAAC,GAAG,CACtC,gBAAgB,CACnB,EACH,CAAC;wBACC,SAAS;oBACb,CAAC;oBAED,MAAM,oBAAoB,GACtB,mCAAmC,CAC/B,IAAI,EACJ,MAAM,EACN,gBAAgB,CACnB,CAAC;oBACN,MAAM,qBAAqB,GACvB,oBAAoB,KAAK,IAAI;wBACzB,CAAC,CAAC,IAAI;wBACN,CAAC,CAAC,cAAc,CACV,oBAAoB,EACpB,oBAAoB,CACvB,CAAC;oBACZ,MAAM,sBAAsB,GACxB,oBAAoB,KAAK,IAAI;wBACzB,CAAC,CAAC,IAAI;wBACN,CAAC,CAAC,+BAA+B,CAC3B,oBAAoB,EACpB,oBAAoB,CACvB,CAAC;oBAEZ,IAAI,sBAAsB,KAAK,IAAI,EAAE,CAAC;wBAClC,SAAS;oBACb,CAAC;oBAED,OAAO,CAAC,MAAM,CAAC;wBACX,IAAI,EAAE;4BACF,WAAW,EAAE,wBAAwB,CAAC,MAAM,CAAC;yBAChD;wBACD,SAAS,EAAE,0BAA0B;wBACrC,IAAI,EAAE,CAAC,qBAAqB,EAAE,KAAK;4BAC/B,qBAAqB;4BACrB,MAAM,CAAC,IAAI,CAAyB;qBAC3C,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;SACJ,CAAC;IACN,CAAC;IACD,IAAI,EAAE;QACF,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE;YACF,OAAO,EAAE;gBACL,4BAA4B;gBAC5B,mCAAmC;aACtC;YACD,WAAW,EACP,2FAA2F;YAC/F,QAAQ,EAAE,CAAC,0BAA0B,CAAC;YACtC,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,IAAI;YACjB,oBAAoB,EAAE,KAAK;YAC3B,MAAM,EAAE,MAAM;YACd,UAAU,EAAE,EAAE;YACd,GAAG,EAAE,6HAA6H;SACrI;QACD,QAAQ,EAAE;YACN,wBAAwB,EACpB,uIAAuI;SAC9I;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,YAAY;KACA;CACzB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* Require Dependabot update entries to define an effective commit message prefix.
|
|
4
|
+
*/
|
|
5
|
+
import type { Rule } from "eslint";
|
|
6
|
+
/** Rule implementation for requiring effective commit-message prefixes. */
|
|
7
|
+
declare const rule: Rule.RuleModule;
|
|
8
|
+
export default rule;
|
|
9
|
+
//# sourceMappingURL=require-dependabot-commit-message-prefix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-dependabot-commit-message-prefix.d.ts","sourceRoot":"","sources":["../../src/rules/require-dependabot-commit-message-prefix.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAWnC,2EAA2E;AAC3E,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAsEhB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { getDependabotMappingStringValue, getDependabotRoot, getDependabotUpdateEntries, getDependabotUpdateLabel, getEffectiveDependabotUpdateMapping, } from "../_internal/dependabot-yaml.js";
|
|
2
|
+
import { getMappingPair } from "../_internal/workflow-yaml.js";
|
|
3
|
+
/** Rule implementation for requiring effective commit-message prefixes. */
|
|
4
|
+
const rule = {
|
|
5
|
+
create(context) {
|
|
6
|
+
return {
|
|
7
|
+
Program() {
|
|
8
|
+
const root = getDependabotRoot(context);
|
|
9
|
+
if (root === null) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
for (const update of getDependabotUpdateEntries(root)) {
|
|
13
|
+
const commitMessageMapping = getEffectiveDependabotUpdateMapping(root, update, "commit-message");
|
|
14
|
+
const prefixPair = commitMessageMapping === null
|
|
15
|
+
? null
|
|
16
|
+
: getMappingPair(commitMessageMapping, "prefix");
|
|
17
|
+
const prefixValue = commitMessageMapping === null
|
|
18
|
+
? null
|
|
19
|
+
: getDependabotMappingStringValue(commitMessageMapping, "prefix");
|
|
20
|
+
if (prefixValue !== null) {
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
context.report({
|
|
24
|
+
data: {
|
|
25
|
+
updateLabel: getDependabotUpdateLabel(update),
|
|
26
|
+
},
|
|
27
|
+
messageId: "missingCommitMessagePrefix",
|
|
28
|
+
node: (prefixPair?.value ??
|
|
29
|
+
prefixPair ??
|
|
30
|
+
update.node),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
meta: {
|
|
37
|
+
deprecated: false,
|
|
38
|
+
docs: {
|
|
39
|
+
configs: [
|
|
40
|
+
"github-actions.configs.all",
|
|
41
|
+
"github-actions.configs.dependabot",
|
|
42
|
+
],
|
|
43
|
+
description: "require Dependabot update entries to define an effective `commit-message.prefix` directly or via a multi-ecosystem group.",
|
|
44
|
+
dialects: ["Dependabot configuration"],
|
|
45
|
+
frozen: false,
|
|
46
|
+
recommended: true,
|
|
47
|
+
requiresTypeChecking: false,
|
|
48
|
+
ruleId: "R079",
|
|
49
|
+
ruleNumber: 79,
|
|
50
|
+
url: "https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-commit-message-prefix",
|
|
51
|
+
},
|
|
52
|
+
messages: {
|
|
53
|
+
missingCommitMessagePrefix: "{{updateLabel}} should define `commit-message.prefix` so Dependabot pull requests follow a predictable title convention.",
|
|
54
|
+
},
|
|
55
|
+
schema: [],
|
|
56
|
+
type: "suggestion",
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
export default rule;
|
|
60
|
+
//# sourceMappingURL=require-dependabot-commit-message-prefix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-dependabot-commit-message-prefix.js","sourceRoot":"","sources":["../../src/rules/require-dependabot-commit-message-prefix.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,+BAA+B,EAC/B,iBAAiB,EACjB,0BAA0B,EAC1B,wBAAwB,EACxB,mCAAmC,GACtC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,2EAA2E;AAC3E,MAAM,IAAI,GAAoB;IAC1B,MAAM,CAAC,OAAO;QACV,OAAO;YACH,OAAO;gBACH,MAAM,IAAI,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;gBAExC,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;oBAChB,OAAO;gBACX,CAAC;gBAED,KAAK,MAAM,MAAM,IAAI,0BAA0B,CAAC,IAAI,CAAC,EAAE,CAAC;oBACpD,MAAM,oBAAoB,GACtB,mCAAmC,CAC/B,IAAI,EACJ,MAAM,EACN,gBAAgB,CACnB,CAAC;oBACN,MAAM,UAAU,GACZ,oBAAoB,KAAK,IAAI;wBACzB,CAAC,CAAC,IAAI;wBACN,CAAC,CAAC,cAAc,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;oBACzD,MAAM,WAAW,GACb,oBAAoB,KAAK,IAAI;wBACzB,CAAC,CAAC,IAAI;wBACN,CAAC,CAAC,+BAA+B,CAC3B,oBAAoB,EACpB,QAAQ,CACX,CAAC;oBAEZ,IAAI,WAAW,KAAK,IAAI,EAAE,CAAC;wBACvB,SAAS;oBACb,CAAC;oBAED,OAAO,CAAC,MAAM,CAAC;wBACX,IAAI,EAAE;4BACF,WAAW,EAAE,wBAAwB,CAAC,MAAM,CAAC;yBAChD;wBACD,SAAS,EAAE,4BAA4B;wBACvC,IAAI,EAAE,CAAC,UAAU,EAAE,KAAK;4BACpB,UAAU;4BACV,MAAM,CAAC,IAAI,CAAyB;qBAC3C,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;SACJ,CAAC;IACN,CAAC;IACD,IAAI,EAAE;QACF,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE;YACF,OAAO,EAAE;gBACL,4BAA4B;gBAC5B,mCAAmC;aACtC;YACD,WAAW,EACP,2HAA2H;YAC/H,QAAQ,EAAE,CAAC,0BAA0B,CAAC;YACtC,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,IAAI;YACjB,oBAAoB,EAAE,KAAK;YAC3B,MAAM,EAAE,MAAM;YACd,UAAU,EAAE,EAAE;YACd,GAAG,EAAE,iHAAiH;SACzH;QACD,QAAQ,EAAE;YACN,0BAA0B,EACtB,0HAA0H;SACjI;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,YAAY;KACA;CACzB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* Require Dependabot update entries to declare cooldown settings.
|
|
4
|
+
*/
|
|
5
|
+
import type { Rule } from "eslint";
|
|
6
|
+
/** Rule implementation for requiring cooldown settings. */
|
|
7
|
+
declare const rule: Rule.RuleModule;
|
|
8
|
+
export default rule;
|
|
9
|
+
//# sourceMappingURL=require-dependabot-cooldown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-dependabot-cooldown.d.ts","sourceRoot":"","sources":["../../src/rules/require-dependabot-cooldown.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AASnC,2DAA2D;AAC3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAuDhB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { getDependabotRoot, getDependabotUpdateEntries, getDependabotUpdateLabel, } from "../_internal/dependabot-yaml.js";
|
|
2
|
+
import { getMappingPair } from "../_internal/workflow-yaml.js";
|
|
3
|
+
/** Rule implementation for requiring cooldown settings. */
|
|
4
|
+
const rule = {
|
|
5
|
+
create(context) {
|
|
6
|
+
return {
|
|
7
|
+
Program() {
|
|
8
|
+
const root = getDependabotRoot(context);
|
|
9
|
+
if (root === null) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
for (const update of getDependabotUpdateEntries(root)) {
|
|
13
|
+
const cooldownPair = getMappingPair(update.mapping, "cooldown");
|
|
14
|
+
if (cooldownPair !== null) {
|
|
15
|
+
continue;
|
|
16
|
+
}
|
|
17
|
+
context.report({
|
|
18
|
+
data: {
|
|
19
|
+
updateLabel: getDependabotUpdateLabel(update),
|
|
20
|
+
},
|
|
21
|
+
messageId: "missingCooldown",
|
|
22
|
+
node: update.node,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
meta: {
|
|
29
|
+
deprecated: false,
|
|
30
|
+
docs: {
|
|
31
|
+
configs: [
|
|
32
|
+
"github-actions.configs.all",
|
|
33
|
+
"github-actions.configs.dependabot",
|
|
34
|
+
],
|
|
35
|
+
description: "require Dependabot update entries to declare a `cooldown` policy.",
|
|
36
|
+
dialects: ["Dependabot configuration"],
|
|
37
|
+
frozen: false,
|
|
38
|
+
recommended: true,
|
|
39
|
+
requiresTypeChecking: false,
|
|
40
|
+
ruleId: "R086",
|
|
41
|
+
ruleNumber: 86,
|
|
42
|
+
url: "https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-cooldown",
|
|
43
|
+
},
|
|
44
|
+
messages: {
|
|
45
|
+
missingCooldown: "{{updateLabel}} should declare `cooldown` so version update churn is intentionally throttled.",
|
|
46
|
+
},
|
|
47
|
+
schema: [],
|
|
48
|
+
type: "suggestion",
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
export default rule;
|
|
52
|
+
//# sourceMappingURL=require-dependabot-cooldown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-dependabot-cooldown.js","sourceRoot":"","sources":["../../src/rules/require-dependabot-cooldown.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,iBAAiB,EACjB,0BAA0B,EAC1B,wBAAwB,GAC3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,2DAA2D;AAC3D,MAAM,IAAI,GAAoB;IAC1B,MAAM,CAAC,OAAO;QACV,OAAO;YACH,OAAO;gBACH,MAAM,IAAI,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;gBAExC,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;oBAChB,OAAO;gBACX,CAAC;gBAED,KAAK,MAAM,MAAM,IAAI,0BAA0B,CAAC,IAAI,CAAC,EAAE,CAAC;oBACpD,MAAM,YAAY,GAAG,cAAc,CAC/B,MAAM,CAAC,OAAO,EACd,UAAU,CACb,CAAC;oBAEF,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;wBACxB,SAAS;oBACb,CAAC;oBAED,OAAO,CAAC,MAAM,CAAC;wBACX,IAAI,EAAE;4BACF,WAAW,EAAE,wBAAwB,CAAC,MAAM,CAAC;yBAChD;wBACD,SAAS,EAAE,iBAAiB;wBAC5B,IAAI,EAAE,MAAM,CAAC,IAA4B;qBAC5C,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;SACJ,CAAC;IACN,CAAC;IACD,IAAI,EAAE;QACF,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE;YACF,OAAO,EAAE;gBACL,4BAA4B;gBAC5B,mCAAmC;aACtC;YACD,WAAW,EACP,mEAAmE;YACvE,QAAQ,EAAE,CAAC,0BAA0B,CAAC;YACtC,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,IAAI;YACjB,oBAAoB,EAAE,KAAK;YAC3B,MAAM,EAAE,MAAM;YACd,UAAU,EAAE,EAAE;YACd,GAAG,EAAE,oGAAoG;SAC5G;QACD,QAAQ,EAAE;YACN,eAAe,EACX,+FAA+F;SACtG;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,YAAY;KACA;CACzB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* Require every Dependabot update entry to define `directory` or `directories`.
|
|
4
|
+
*/
|
|
5
|
+
import type { Rule } from "eslint";
|
|
6
|
+
/** Rule implementation for requiring `directory` or `directories`. */
|
|
7
|
+
declare const rule: Rule.RuleModule;
|
|
8
|
+
export default rule;
|
|
9
|
+
//# sourceMappingURL=require-dependabot-directory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-dependabot-directory.d.ts","sourceRoot":"","sources":["../../src/rules/require-dependabot-directory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AA2BnC,sEAAsE;AACtE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAyEhB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|