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,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* Helpers for workflows that automate Dependabot pull requests.
|
|
4
|
+
*/
|
|
5
|
+
import type { AST } from "yaml-eslint-parser";
|
|
6
|
+
import type { WorkflowActionStep, WorkflowRunStep } from "./workflow-action-steps.js";
|
|
7
|
+
/**
|
|
8
|
+
* Determine whether a `uses` reference points to the Dependabot fetch-metadata
|
|
9
|
+
* action.
|
|
10
|
+
*/
|
|
11
|
+
export declare const isDependabotFetchMetadataReference: (usesReference: string) => boolean;
|
|
12
|
+
/** Determine whether a run step edits a pull request via `gh pr edit`. */
|
|
13
|
+
export declare const isGhPrEditRunScript: (runScript: string) => boolean;
|
|
14
|
+
/** Determine whether a run step reviews a pull request via `gh pr review`. */
|
|
15
|
+
export declare const isGhPrReviewRunScript: (runScript: string) => boolean;
|
|
16
|
+
/** Determine whether a run step merges a pull request via `gh pr merge`. */
|
|
17
|
+
export declare const isGhPrMergeRunScript: (runScript: string) => boolean;
|
|
18
|
+
/** Determine whether a run step automates a pull request via GitHub CLI. */
|
|
19
|
+
export declare const isDependabotAutomationRunScript: (runScript: string) => boolean;
|
|
20
|
+
/** Collect all Dependabot fetch-metadata action steps in a workflow. */
|
|
21
|
+
export declare const getDependabotFetchMetadataSteps: (root: AST.YAMLMapping) => readonly WorkflowActionStep[];
|
|
22
|
+
/** Collect all GitHub CLI run steps that automate pull requests. */
|
|
23
|
+
export declare const getDependabotAutomationRunSteps: (root: AST.YAMLMapping) => readonly WorkflowRunStep[];
|
|
24
|
+
/** Determine whether a workflow contains recognized Dependabot automation steps. */
|
|
25
|
+
export declare const hasDependabotAutomation: (root: AST.YAMLMapping) => boolean;
|
|
26
|
+
//# sourceMappingURL=dependabot-automation-workflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependabot-automation-workflow.d.ts","sourceRoot":"","sources":["../../src/_internal/dependabot-automation-workflow.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,KAAK,EACR,kBAAkB,EAClB,eAAe,EAClB,MAAM,4BAA4B,CAAC;AAQpC;;;GAGG;AACH,eAAO,MAAM,kCAAkC,GAC3C,eAAe,MAAM,KACtB,OAAwE,CAAC;AAE5E,0EAA0E;AAC1E,eAAO,MAAM,mBAAmB,GAAI,WAAW,MAAM,KAAG,OACf,CAAC;AAE1C,8EAA8E;AAC9E,eAAO,MAAM,qBAAqB,GAAI,WAAW,MAAM,KAAG,OACf,CAAC;AAE5C,4EAA4E;AAC5E,eAAO,MAAM,oBAAoB,GAAI,WAAW,MAAM,KAAG,OACf,CAAC;AAE3C,4EAA4E;AAC5E,eAAO,MAAM,+BAA+B,GAAI,WAAW,MAAM,KAAG,OAGjC,CAAC;AAEpC,wEAAwE;AACxE,eAAO,MAAM,+BAA+B,GACxC,MAAM,GAAG,CAAC,WAAW,KACtB,SAAS,kBAAkB,EACsC,CAAC;AAErE,oEAAoE;AACpE,eAAO,MAAM,+BAA+B,GACxC,MAAM,GAAG,CAAC,WAAW,KACtB,SAAS,eAAe,EACmC,CAAC;AAE/D,oFAAoF;AACpF,eAAO,MAAM,uBAAuB,GAAI,MAAM,GAAG,CAAC,WAAW,KAAG,OAEH,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getWorkflowActionSteps, getWorkflowRunSteps, hasWorkflowRunStep, } from "./workflow-action-steps.js";
|
|
2
|
+
/**
|
|
3
|
+
* Determine whether a `uses` reference points to the Dependabot fetch-metadata
|
|
4
|
+
* action.
|
|
5
|
+
*/
|
|
6
|
+
export const isDependabotFetchMetadataReference = (usesReference) => usesReference.trim().startsWith("dependabot/fetch-metadata@");
|
|
7
|
+
/** Determine whether a run step edits a pull request via `gh pr edit`. */
|
|
8
|
+
export const isGhPrEditRunScript = (runScript) => /\bgh\s+pr\s+edit\b/u.test(runScript);
|
|
9
|
+
/** Determine whether a run step reviews a pull request via `gh pr review`. */
|
|
10
|
+
export const isGhPrReviewRunScript = (runScript) => /\bgh\s+pr\s+review\b/u.test(runScript);
|
|
11
|
+
/** Determine whether a run step merges a pull request via `gh pr merge`. */
|
|
12
|
+
export const isGhPrMergeRunScript = (runScript) => /\bgh\s+pr\s+merge\b/u.test(runScript);
|
|
13
|
+
/** Determine whether a run step automates a pull request via GitHub CLI. */
|
|
14
|
+
export const isDependabotAutomationRunScript = (runScript) => isGhPrEditRunScript(runScript) ||
|
|
15
|
+
isGhPrReviewRunScript(runScript) ||
|
|
16
|
+
isGhPrMergeRunScript(runScript);
|
|
17
|
+
/** Collect all Dependabot fetch-metadata action steps in a workflow. */
|
|
18
|
+
export const getDependabotFetchMetadataSteps = (root) => getWorkflowActionSteps(root, isDependabotFetchMetadataReference);
|
|
19
|
+
/** Collect all GitHub CLI run steps that automate pull requests. */
|
|
20
|
+
export const getDependabotAutomationRunSteps = (root) => getWorkflowRunSteps(root, isDependabotAutomationRunScript);
|
|
21
|
+
/** Determine whether a workflow contains recognized Dependabot automation steps. */
|
|
22
|
+
export const hasDependabotAutomation = (root) => getDependabotFetchMetadataSteps(root).length > 0 ||
|
|
23
|
+
hasWorkflowRunStep(root, isDependabotAutomationRunScript);
|
|
24
|
+
/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Re-enable readonly-parameter checks outside parser AST helper signatures. */
|
|
25
|
+
//# sourceMappingURL=dependabot-automation-workflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependabot-automation-workflow.js","sourceRoot":"","sources":["../../src/_internal/dependabot-automation-workflow.ts"],"names":[],"mappings":"AAYA,OAAO,EACH,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,GACrB,MAAM,4BAA4B,CAAC;AAEpC;;;GAGG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAC9C,aAAqB,EACd,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,4BAA4B,CAAC,CAAC;AAE5E,0EAA0E;AAC1E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,SAAiB,EAAW,EAAE,CAC9D,qBAAqB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAE1C,8EAA8E;AAC9E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,SAAiB,EAAW,EAAE,CAChE,uBAAuB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAE5C,4EAA4E;AAC5E,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,SAAiB,EAAW,EAAE,CAC/D,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAE3C,4EAA4E;AAC5E,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,SAAiB,EAAW,EAAE,CAC1E,mBAAmB,CAAC,SAAS,CAAC;IAC9B,qBAAqB,CAAC,SAAS,CAAC;IAChC,oBAAoB,CAAC,SAAS,CAAC,CAAC;AAEpC,wEAAwE;AACxE,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAC3C,IAAqB,EACQ,EAAE,CAC/B,sBAAsB,CAAC,IAAI,EAAE,kCAAkC,CAAC,CAAC;AAErE,oEAAoE;AACpE,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAC3C,IAAqB,EACK,EAAE,CAC5B,mBAAmB,CAAC,IAAI,EAAE,+BAA+B,CAAC,CAAC;AAE/D,oFAAoF;AACpF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,IAAqB,EAAW,EAAE,CACtE,+BAA+B,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC;IAChD,kBAAkB,CAAC,IAAI,EAAE,+BAA+B,CAAC,CAAC;AAE9D,mJAAmJ"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* YAML helpers for `.github/dependabot.yml` configuration files.
|
|
4
|
+
*/
|
|
5
|
+
import type { Rule } from "eslint";
|
|
6
|
+
import type { AST } from "yaml-eslint-parser";
|
|
7
|
+
/** Directory selector entry declared by a Dependabot update block. */
|
|
8
|
+
export type DependabotDirectorySelectorEntry = {
|
|
9
|
+
readonly node: AST.YAMLNode;
|
|
10
|
+
readonly value: string;
|
|
11
|
+
};
|
|
12
|
+
/** String scalar entry contained in a YAML sequence. */
|
|
13
|
+
export type DependabotStringSequenceEntry = {
|
|
14
|
+
readonly node: AST.YAMLNode;
|
|
15
|
+
readonly value: string;
|
|
16
|
+
};
|
|
17
|
+
/** Dependabot update block paired with derived metadata useful for reporting. */
|
|
18
|
+
export type DependabotUpdateEntry = {
|
|
19
|
+
readonly index: number;
|
|
20
|
+
readonly mapping: AST.YAMLMapping;
|
|
21
|
+
readonly multiEcosystemGroup: null | string;
|
|
22
|
+
readonly node: AST.YAMLContent | AST.YAMLWithMeta;
|
|
23
|
+
readonly packageEcosystem: null | string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Normalize a scalar-like Dependabot string value into a trimmed non-empty
|
|
27
|
+
* string.
|
|
28
|
+
*/
|
|
29
|
+
export declare const getDependabotTrimmedStringValue: (node: AST.YAMLContent | AST.YAMLWithMeta | null | undefined) => null | string;
|
|
30
|
+
/** Read a trimmed non-empty string value from a mapping pair by key. */
|
|
31
|
+
export declare const getDependabotMappingStringValue: (mapping: AST.YAMLMapping, key: string) => null | string;
|
|
32
|
+
/** Resolve the root mapping for a Dependabot configuration file. */
|
|
33
|
+
export declare const getDependabotRoot: (context: Rule.RuleContext) => AST.YAMLMapping | null;
|
|
34
|
+
/** Collect every valid update mapping under the top-level `updates` sequence. */
|
|
35
|
+
export declare const getDependabotUpdateEntries: (root: AST.YAMLMapping) => readonly DependabotUpdateEntry[];
|
|
36
|
+
/** Resolve a named multi-ecosystem-group mapping by its declared group key. */
|
|
37
|
+
export declare const getDependabotMultiEcosystemGroup: (root: AST.YAMLMapping, groupName: string) => AST.YAMLMapping | null;
|
|
38
|
+
/** Resolve the referenced multi-ecosystem-group mapping for an update entry. */
|
|
39
|
+
export declare const getDependabotReferencedGroup: (root: AST.YAMLMapping, update: DependabotUpdateEntry) => AST.YAMLMapping | null;
|
|
40
|
+
/**
|
|
41
|
+
* Resolve an update-scoped value, falling back to the referenced group when
|
|
42
|
+
* present.
|
|
43
|
+
*/
|
|
44
|
+
export declare const getEffectiveDependabotUpdateValue: (root: AST.YAMLMapping, update: DependabotUpdateEntry, key: string) => AST.YAMLContent | AST.YAMLWithMeta | null;
|
|
45
|
+
/** Read a trimmed non-empty string value from an effective update-scoped key. */
|
|
46
|
+
export declare const getEffectiveDependabotStringValue: (root: AST.YAMLMapping, update: DependabotUpdateEntry, key: string) => null | string;
|
|
47
|
+
/**
|
|
48
|
+
* Resolve an update-scoped mapping value, honoring multi-ecosystem-group
|
|
49
|
+
* fallback.
|
|
50
|
+
*/
|
|
51
|
+
export declare const getEffectiveDependabotUpdateMapping: (root: AST.YAMLMapping, update: DependabotUpdateEntry, key: string) => AST.YAMLMapping | null;
|
|
52
|
+
/** Collect all non-empty string entries from a YAML sequence. */
|
|
53
|
+
export declare const getNonEmptyStringSequenceEntries: (node: AST.YAMLContent | AST.YAMLWithMeta | null | undefined) => readonly DependabotStringSequenceEntry[];
|
|
54
|
+
/** Describe an update entry for human-readable diagnostics. */
|
|
55
|
+
export declare const getDependabotUpdateLabel: (update: DependabotUpdateEntry) => string;
|
|
56
|
+
/**
|
|
57
|
+
* Resolve the effective target branch for an update, defaulting to the
|
|
58
|
+
* repository default branch.
|
|
59
|
+
*/
|
|
60
|
+
export declare const getEffectiveDependabotTargetBranch: (root: AST.YAMLMapping, update: DependabotUpdateEntry) => string;
|
|
61
|
+
/** Collect normalized directory selectors declared by a Dependabot update block. */
|
|
62
|
+
export declare const getDependabotDirectorySelectorEntries: (update: DependabotUpdateEntry) => readonly DependabotDirectorySelectorEntry[];
|
|
63
|
+
//# sourceMappingURL=dependabot-yaml.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependabot-yaml.d.ts","sourceRoot":"","sources":["../../src/_internal/dependabot-yaml.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAY9C,sEAAsE;AACtE,MAAM,MAAM,gCAAgC,GAAG;IAC3C,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,wDAAwD;AACxD,MAAM,MAAM,6BAA6B,GAAG;IACxC,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,iFAAiF;AACjF,MAAM,MAAM,qBAAqB,GAAG;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,WAAW,CAAC;IAClC,QAAQ,CAAC,mBAAmB,EAAE,IAAI,GAAG,MAAM,CAAC;IAC5C,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,WAAW,GAAG,GAAG,CAAC,YAAY,CAAC;IAClD,QAAQ,CAAC,gBAAgB,E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MAAM,KACZ,GAAG,CAAC,WAAW,GAAG,IAMpB,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,gCAAgC,GACzC,MAAM,GAAG,CAAC,WAAW,GAAG,GAAG,CAAC,YAAY,GAAG,IAAI,GAAG,SAAS,KAC5D,SAAS,6BAA6B,EA6BxC,CAAC;AAEF,+DAA+D;AAC/D,eAAO,MAAM,wBAAwB,GACjC,QAAQ,qBAAqB,KAC9B,MAGsE,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,kCAAkC,GAC3C,MAAM,GAAG,CAAC,WAAW,EACrB,QAAQ,qBAAqB,KAC9B,MAQF,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,qCAAqC,GAC9C,QAAQ,qBAAqB,KAC9B,SAAS,gCAAgC,EA6B3C,CAAC"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { isDependabotFile } from "./lint-targets.js";
|
|
2
|
+
import { getMappingPair, getMappingValueAsMapping, getMappingValueAsSequence, getScalarStringValue, getWorkflowRoot, unwrapYamlValue, } from "./workflow-yaml.js";
|
|
3
|
+
/**
|
|
4
|
+
* Normalize a scalar-like Dependabot string value into a trimmed non-empty
|
|
5
|
+
* string.
|
|
6
|
+
*/
|
|
7
|
+
export const getDependabotTrimmedStringValue = (node) => {
|
|
8
|
+
const stringValue = getScalarStringValue(node ?? null)?.trim();
|
|
9
|
+
return stringValue === undefined || stringValue.length === 0
|
|
10
|
+
? null
|
|
11
|
+
: stringValue;
|
|
12
|
+
};
|
|
13
|
+
/** Read a trimmed non-empty string value from a mapping pair by key. */
|
|
14
|
+
export const getDependabotMappingStringValue = (mapping, key) => getDependabotTrimmedStringValue(getMappingPair(mapping, key)?.value ?? null);
|
|
15
|
+
/** Resolve the root mapping for a Dependabot configuration file. */
|
|
16
|
+
export const getDependabotRoot = (context) => isDependabotFile(context.filename) ? getWorkflowRoot(context) : null;
|
|
17
|
+
/** Collect every valid update mapping under the top-level `updates` sequence. */
|
|
18
|
+
export const getDependabotUpdateEntries = (root) => {
|
|
19
|
+
const updatesSequence = getMappingValueAsSequence(root, "updates");
|
|
20
|
+
if (updatesSequence === null) {
|
|
21
|
+
return [];
|
|
22
|
+
}
|
|
23
|
+
const entries = [];
|
|
24
|
+
for (const [index, entry] of updatesSequence.entries.entries()) {
|
|
25
|
+
const updateMapping = unwrapYamlValue(entry);
|
|
26
|
+
if (entry === null || entry === undefined) {
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
if (updateMapping?.type !== "YAMLMapping") {
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
entries.push({
|
|
33
|
+
index: index + 1,
|
|
34
|
+
mapping: updateMapping,
|
|
35
|
+
multiEcosystemGroup: getScalarStringValue(getMappingPair(updateMapping, "multi-ecosystem-group")?.value),
|
|
36
|
+
node: entry,
|
|
37
|
+
packageEcosystem: getScalarStringValue(getMappingPair(updateMapping, "package-ecosystem")?.value),
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return entries;
|
|
41
|
+
};
|
|
42
|
+
/** Resolve a named multi-ecosystem-group mapping by its declared group key. */
|
|
43
|
+
export const getDependabotMultiEcosystemGroup = (root, groupName) => {
|
|
44
|
+
const groupsMapping = getMappingValueAsMapping(root, "multi-ecosystem-groups");
|
|
45
|
+
if (groupsMapping === null) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
for (const pair of groupsMapping.pairs) {
|
|
49
|
+
if (getScalarStringValue(pair.key) !== groupName) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
const groupMapping = unwrapYamlValue(pair.value);
|
|
53
|
+
return groupMapping?.type === "YAMLMapping" ? groupMapping : null;
|
|
54
|
+
}
|
|
55
|
+
return null;
|
|
56
|
+
};
|
|
57
|
+
/** Resolve the referenced multi-ecosystem-group mapping for an update entry. */
|
|
58
|
+
export const getDependabotReferencedGroup = (root, update) => update.multiEcosystemGroup === null
|
|
59
|
+
? null
|
|
60
|
+
: getDependabotMultiEcosystemGroup(root, update.multiEcosystemGroup);
|
|
61
|
+
/**
|
|
62
|
+
* Resolve an update-scoped value, falling back to the referenced group when
|
|
63
|
+
* present.
|
|
64
|
+
*/
|
|
65
|
+
export const getEffectiveDependabotUpdateValue = (root, update, key) => {
|
|
66
|
+
const directValue = getMappingPair(update.mapping, key)?.value ?? null;
|
|
67
|
+
if (directValue !== null) {
|
|
68
|
+
return directValue;
|
|
69
|
+
}
|
|
70
|
+
return (getMappingPair(getDependabotReferencedGroup(root, update) ?? update.mapping, key)?.value ?? null);
|
|
71
|
+
};
|
|
72
|
+
/** Read a trimmed non-empty string value from an effective update-scoped key. */
|
|
73
|
+
export const getEffectiveDependabotStringValue = (root, update, key) => getDependabotTrimmedStringValue(getEffectiveDependabotUpdateValue(root, update, key));
|
|
74
|
+
/**
|
|
75
|
+
* Resolve an update-scoped mapping value, honoring multi-ecosystem-group
|
|
76
|
+
* fallback.
|
|
77
|
+
*/
|
|
78
|
+
export const getEffectiveDependabotUpdateMapping = (root, update, key) => {
|
|
79
|
+
const value = unwrapYamlValue(getEffectiveDependabotUpdateValue(root, update, key));
|
|
80
|
+
return value?.type === "YAMLMapping" ? value : null;
|
|
81
|
+
};
|
|
82
|
+
/** Collect all non-empty string entries from a YAML sequence. */
|
|
83
|
+
export const getNonEmptyStringSequenceEntries = (node) => {
|
|
84
|
+
const sequence = unwrapYamlValue(node ?? null);
|
|
85
|
+
if (sequence?.type !== "YAMLSequence") {
|
|
86
|
+
return [];
|
|
87
|
+
}
|
|
88
|
+
const entries = [];
|
|
89
|
+
for (const entry of sequence.entries) {
|
|
90
|
+
const stringValue = getScalarStringValue(entry)?.trim();
|
|
91
|
+
if (stringValue === undefined ||
|
|
92
|
+
stringValue === null ||
|
|
93
|
+
stringValue.length === 0 ||
|
|
94
|
+
entry === null ||
|
|
95
|
+
entry === undefined) {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
entries.push({
|
|
99
|
+
node: entry,
|
|
100
|
+
value: stringValue,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
return entries;
|
|
104
|
+
};
|
|
105
|
+
/** Describe an update entry for human-readable diagnostics. */
|
|
106
|
+
export const getDependabotUpdateLabel = (update) => update.packageEcosystem === null
|
|
107
|
+
? `updates[${String(update.index)}]`
|
|
108
|
+
: `updates[${String(update.index)}] (${update.packageEcosystem})`;
|
|
109
|
+
/**
|
|
110
|
+
* Resolve the effective target branch for an update, defaulting to the
|
|
111
|
+
* repository default branch.
|
|
112
|
+
*/
|
|
113
|
+
export const getEffectiveDependabotTargetBranch = (root, update) => {
|
|
114
|
+
const targetBranch = getEffectiveDependabotStringValue(root, update, "target-branch");
|
|
115
|
+
return targetBranch === null ? "<default-branch>" : targetBranch;
|
|
116
|
+
};
|
|
117
|
+
/** Collect normalized directory selectors declared by a Dependabot update block. */
|
|
118
|
+
export const getDependabotDirectorySelectorEntries = (update) => {
|
|
119
|
+
const selectors = [];
|
|
120
|
+
const directoryPair = getMappingPair(update.mapping, "directory");
|
|
121
|
+
const directoryValue = getScalarStringValue(directoryPair?.value ?? null)?.trim();
|
|
122
|
+
if (directoryPair?.value !== null &&
|
|
123
|
+
directoryPair?.value !== undefined &&
|
|
124
|
+
directoryValue !== undefined &&
|
|
125
|
+
directoryValue !== null &&
|
|
126
|
+
directoryValue.length > 0) {
|
|
127
|
+
selectors.push({
|
|
128
|
+
node: directoryPair.value,
|
|
129
|
+
value: directoryValue,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
const directoriesPair = getMappingPair(update.mapping, "directories");
|
|
133
|
+
for (const entry of getNonEmptyStringSequenceEntries(directoriesPair?.value)) {
|
|
134
|
+
selectors.push(entry);
|
|
135
|
+
}
|
|
136
|
+
return selectors;
|
|
137
|
+
};
|
|
138
|
+
/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Re-enable readonly-parameter checks outside parser AST helper signatures. */
|
|
139
|
+
//# sourceMappingURL=dependabot-yaml.js.map
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I,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,YAAY,CAAC;AACrE,CAAC,CAAC;AAEF,oFAAoF;AACpF,MAAM,CAAC,MAAM,qCAAqC,GAAG,CACjD,MAA6B,EACc,EAAE;IAC7C,MAAM,SAAS,GAAuC,EAAE,CAAC;IACzD,MAAM,aAAa,GAAG,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAClE,MAAM,cAAc,GAAG,oBAAoB,CACvC,aAAa,EAAE,KAAK,IAAI,IAAI,CAC/B,EAAE,IAAI,EAAE,CAAC;IAEV,IACI,aAAa,EAAE,KAAK,KAAK,IAAI;QAC7B,aAAa,EAAE,KAAK,KAAK,SAAS;QAClC,cAAc,KAAK,SAAS;QAC5B,cAAc,KAAK,IAAI;QACvB,cAAc,CAAC,MAAM,GAAG,CAAC,EAC3B,CAAC;QACC,SAAS,CAAC,IAAI,CAAC;YACX,IAAI,EAAE,aAAa,CAAC,KAAK;YACzB,KAAK,EAAE,cAAc;SACxB,CAAC,CAAC;IACP,CAAC;IAED,MAAM,eAAe,GAAG,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IAEtE,KAAK,MAAM,KAAK,IAAI,gCAAgC,CAChD,eAAe,EAAE,KAAK,CACzB,EAAE,CAAC;QACA,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAED,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AAEF,mJAAmJ"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* Helpers for workflows that use `actions/dependency-review-action`.
|
|
4
|
+
*/
|
|
5
|
+
import type { AST } from "yaml-eslint-parser";
|
|
6
|
+
import type { WorkflowJobEntry } from "./workflow-yaml.js";
|
|
7
|
+
/** Workflow step using the dependency review action. */
|
|
8
|
+
export type DependencyReviewActionStep = {
|
|
9
|
+
readonly job: WorkflowJobEntry;
|
|
10
|
+
readonly stepMapping: AST.YAMLMapping;
|
|
11
|
+
readonly usesPair: AST.YAMLPair;
|
|
12
|
+
readonly usesReference: string;
|
|
13
|
+
};
|
|
14
|
+
/** Determine whether a `uses` reference points to the dependency review action. */
|
|
15
|
+
export declare const isDependencyReviewActionReference: (usesReference: string) => boolean;
|
|
16
|
+
/** Collect all workflow steps that use the dependency review action. */
|
|
17
|
+
export declare const getDependencyReviewActionSteps: (root: AST.YAMLMapping) => readonly DependencyReviewActionStep[];
|
|
18
|
+
/** Determine whether a workflow uses the dependency review action anywhere. */
|
|
19
|
+
export declare const hasDependencyReviewAction: (root: AST.YAMLMapping) => boolean;
|
|
20
|
+
//# sourceMappingURL=dependency-review-workflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependency-review-workflow.d.ts","sourceRoot":"","sources":["../../src/_internal/dependency-review-workflow.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI3D,wDAAwD;AACxD,MAAM,MAAM,0BAA0B,GAAG;IACrC,QAAQ,CAAC,GAAG,EAAE,gBAAgB,CAAC;IAC/B,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAClC,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,iCAAiC,GAC1C,eAAe,MAAM,KACtB,OACqE,CAAC;AAEzE,wEAAwE;AACxE,eAAO,MAAM,8BAA8B,GACvC,MAAM,GAAG,CAAC,WAAW,KACtB,SAAS,0BAA0B,EAC6B,CAAC;AAEpE,+EAA+E;AAC/E,eAAO,MAAM,yBAAyB,GAAI,MAAM,GAAG,CAAC,WAAW,KAAG,OACf,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getWorkflowActionSteps } from "./workflow-action-steps.js";
|
|
2
|
+
/** Determine whether a `uses` reference points to the dependency review action. */
|
|
3
|
+
export const isDependencyReviewActionReference = (usesReference) => usesReference.trim().startsWith("actions/dependency-review-action@");
|
|
4
|
+
/** Collect all workflow steps that use the dependency review action. */
|
|
5
|
+
export const getDependencyReviewActionSteps = (root) => getWorkflowActionSteps(root, isDependencyReviewActionReference);
|
|
6
|
+
/** Determine whether a workflow uses the dependency review action anywhere. */
|
|
7
|
+
export const hasDependencyReviewAction = (root) => getDependencyReviewActionSteps(root).length > 0;
|
|
8
|
+
/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Re-enable readonly-parameter checks outside parser AST helper signatures. */
|
|
9
|
+
//# sourceMappingURL=dependency-review-workflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependency-review-workflow.js","sourceRoot":"","sources":["../../src/_internal/dependency-review-workflow.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAUpE,mFAAmF;AACnF,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAC7C,aAAqB,EACd,EAAE,CACT,aAAa,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,mCAAmC,CAAC,CAAC;AAEzE,wEAAwE;AACxE,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAC1C,IAAqB,EACgB,EAAE,CACvC,sBAAsB,CAAC,IAAI,EAAE,iCAAiC,CAAC,CAAC;AAEpE,+EAA+E;AAC/E,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,IAAqB,EAAW,EAAE,CACxE,8BAA8B,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AAEpD,mJAAmJ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Ordered preset names exposed through `plugin.configs`. */
|
|
2
|
-
export declare const githubActionsConfigNames: readonly ["actionMetadata", "workflowTemplateProperties", "workflowTemplates", "recommended", "security", "strict", "all"];
|
|
2
|
+
export declare const githubActionsConfigNames: readonly ["actionMetadata", "codeScanning", "dependabot", "workflowTemplateProperties", "workflowTemplates", "recommended", "security", "strict", "all"];
|
|
3
3
|
/** Supported flat-config preset names exported by the plugin. */
|
|
4
4
|
export type GithubActionsConfigName = (typeof githubActionsConfigNames)[number];
|
|
5
5
|
/** String references used in rule docs metadata and generated docs tables. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-actions-config-references.d.ts","sourceRoot":"","sources":["../../src/_internal/github-actions-config-references.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github-actions-config-references.d.ts","sourceRoot":"","sources":["../../src/_internal/github-actions-config-references.ts"],"names":[],"mappings":"AAYA,6DAA6D;AAC7D,eAAO,MAAM,wBAAwB,0JAU3B,CAAC;AAEX,iEAAiE;AACjE,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhF,8EAA8E;AAC9E,eAAO,MAAM,kCAAkC,EAAE,QAAQ,CACrD,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAYiB,CAAC;AAE7D,gEAAgE;AAChE,MAAM,MAAM,4BAA4B,GACpC,MAAM,OAAO,kCAAkC,CAAC;AAEpD,yEAAyE;AACzE,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CACpD,MAAM,CACF,uBAAuB,EACvB;IACI,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACtB,CACJ,CAsEK,CAAC"}
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
* @packageDocumentation
|
|
3
3
|
* Canonical preset names and docs references used by eslint-plugin-github-actions-2.
|
|
4
4
|
*/
|
|
5
|
-
import { ACTION_METADATA_FILE_GLOBS, WORKFLOW_TEMPLATE_FILE_GLOBS, WORKFLOW_TEMPLATE_PROPERTIES_FILE_GLOBS, } from "./lint-targets.js";
|
|
5
|
+
import { ACTION_METADATA_FILE_GLOBS, DEPENDABOT_FILE_GLOBS, WORKFLOW_TEMPLATE_FILE_GLOBS, WORKFLOW_TEMPLATE_PROPERTIES_FILE_GLOBS, } from "./lint-targets.js";
|
|
6
6
|
import { WORKFLOW_FILE_GLOBS } from "./workflow-yaml.js";
|
|
7
7
|
/** Ordered preset names exposed through `plugin.configs`. */
|
|
8
8
|
export const githubActionsConfigNames = [
|
|
9
9
|
"actionMetadata",
|
|
10
|
+
"codeScanning",
|
|
11
|
+
"dependabot",
|
|
10
12
|
"workflowTemplateProperties",
|
|
11
13
|
"workflowTemplates",
|
|
12
14
|
"recommended",
|
|
@@ -18,6 +20,8 @@ export const githubActionsConfigNames = [
|
|
|
18
20
|
export const githubActionsConfigReferenceToName = {
|
|
19
21
|
"github-actions.configs.actionMetadata": "actionMetadata",
|
|
20
22
|
"github-actions.configs.all": "all",
|
|
23
|
+
"github-actions.configs.codeScanning": "codeScanning",
|
|
24
|
+
"github-actions.configs.dependabot": "dependabot",
|
|
21
25
|
"github-actions.configs.recommended": "recommended",
|
|
22
26
|
"github-actions.configs.security": "security",
|
|
23
27
|
"github-actions.configs.strict": "strict",
|
|
@@ -33,15 +37,28 @@ export const githubActionsConfigMetadataByName = {
|
|
|
33
37
|
presetName: "github-actions:action-metadata",
|
|
34
38
|
},
|
|
35
39
|
all: {
|
|
36
|
-
description: "Enables every available
|
|
40
|
+
description: "Enables every available rule published by this plugin across workflows, action metadata, workflow templates, and Dependabot configuration.",
|
|
37
41
|
files: [
|
|
38
42
|
...WORKFLOW_FILE_GLOBS,
|
|
39
43
|
...ACTION_METADATA_FILE_GLOBS,
|
|
44
|
+
...DEPENDABOT_FILE_GLOBS,
|
|
40
45
|
...WORKFLOW_TEMPLATE_FILE_GLOBS,
|
|
41
46
|
],
|
|
42
47
|
icon: "🟣",
|
|
43
48
|
presetName: "github-actions:all",
|
|
44
49
|
},
|
|
50
|
+
codeScanning: {
|
|
51
|
+
description: "Workflow security defaults for CodeQL, SARIF uploads, dependency review, and related code-scanning integrations.",
|
|
52
|
+
files: WORKFLOW_FILE_GLOBS,
|
|
53
|
+
icon: "🔎",
|
|
54
|
+
presetName: "github-actions:code-scanning",
|
|
55
|
+
},
|
|
56
|
+
dependabot: {
|
|
57
|
+
description: "Linting defaults for repository Dependabot configuration files (`.github/dependabot.yml`).",
|
|
58
|
+
files: DEPENDABOT_FILE_GLOBS,
|
|
59
|
+
icon: "🤖",
|
|
60
|
+
presetName: "github-actions:dependabot",
|
|
61
|
+
},
|
|
45
62
|
recommended: {
|
|
46
63
|
description: "Balanced defaults for most repositories authoring GitHub Actions workflows.",
|
|
47
64
|
files: WORKFLOW_FILE_GLOBS,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-actions-config-references.js","sourceRoot":"","sources":["../../src/_internal/github-actions-config-references.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACH,0BAA0B,EAC1B,4BAA4B,EAC5B,uCAAuC,GAC1C,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,6DAA6D;AAC7D,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACpC,gBAAgB;IAChB,4BAA4B;IAC5B,mBAAmB;IACnB,aAAa;IACb,UAAU;IACV,QAAQ;IACR,KAAK;CACC,CAAC;AAKX,8EAA8E;AAC9E,MAAM,CAAC,MAAM,kCAAkC,GAE3C;IACA,uCAAuC,EAAE,gBAAgB;IACzD,4BAA4B,EAAE,KAAK;IACnC,oCAAoC,EAAE,aAAa;IACnD,iCAAiC,EAAE,UAAU;IAC7C,+BAA+B,EAAE,QAAQ;IACzC,mDAAmD,EAC/C,4BAA4B;IAChC,0CAA0C,EAAE,mBAAmB;CACP,CAAC;AAM7D,yEAAyE;AACzE,MAAM,CAAC,MAAM,iCAAiC,GAU1C;IACA,cAAc,EAAE;QACZ,WAAW,EACP,mFAAmF;QACvF,KAAK,EAAE,0BAA0B;QACjC,IAAI,EAAE,IAAI;QACV,UAAU,EAAE,gCAAgC;KAC/C;IACD,GAAG,EAAE;QACD,WAAW,EACP,
|
|
1
|
+
{"version":3,"file":"github-actions-config-references.js","sourceRoot":"","sources":["../../src/_internal/github-actions-config-references.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACH,0BAA0B,EAC1B,qBAAqB,EACrB,4BAA4B,EAC5B,uCAAuC,GAC1C,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,6DAA6D;AAC7D,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACpC,gBAAgB;IAChB,cAAc;IACd,YAAY;IACZ,4BAA4B;IAC5B,mBAAmB;IACnB,aAAa;IACb,UAAU;IACV,QAAQ;IACR,KAAK;CACC,CAAC;AAKX,8EAA8E;AAC9E,MAAM,CAAC,MAAM,kCAAkC,GAE3C;IACA,uCAAuC,EAAE,gBAAgB;IACzD,4BAA4B,EAAE,KAAK;IACnC,qCAAqC,EAAE,cAAc;IACrD,mCAAmC,EAAE,YAAY;IACjD,oCAAoC,EAAE,aAAa;IACnD,iCAAiC,EAAE,UAAU;IAC7C,+BAA+B,EAAE,QAAQ;IACzC,mDAAmD,EAC/C,4BAA4B;IAChC,0CAA0C,EAAE,mBAAmB;CACP,CAAC;AAM7D,yEAAyE;AACzE,MAAM,CAAC,MAAM,iCAAiC,GAU1C;IACA,cAAc,EAAE;QACZ,WAAW,EACP,mFAAmF;QACvF,KAAK,EAAE,0BAA0B;QACjC,IAAI,EAAE,IAAI;QACV,UAAU,EAAE,gCAAgC;KAC/C;IACD,GAAG,EAAE;QACD,WAAW,EACP,4IAA4I;QAChJ,KAAK,EAAE;YACH,GAAG,mBAAmB;YACtB,GAAG,0BAA0B;YAC7B,GAAG,qBAAqB;YACxB,GAAG,4BAA4B;SAClC;QACD,IAAI,EAAE,IAAI;QACV,UAAU,EAAE,oBAAoB;KACnC;IACD,YAAY,EAAE;QACV,WAAW,EACP,kHAAkH;QACtH,KAAK,EAAE,mBAAmB;QAC1B,IAAI,EAAE,IAAI;QACV,UAAU,EAAE,8BAA8B;KAC7C;IACD,UAAU,EAAE;QACR,WAAW,EACP,4FAA4F;QAChG,KAAK,EAAE,qBAAqB;QAC5B,IAAI,EAAE,IAAI;QACV,UAAU,EAAE,2BAA2B;KAC1C;IACD,WAAW,EAAE;QACT,WAAW,EACP,6EAA6E;QACjF,KAAK,EAAE,mBAAmB;QAC1B,IAAI,EAAE,IAAI;QACV,UAAU,EAAE,4BAA4B;KAC3C;IACD,QAAQ,EAAE;QACN,WAAW,EACP,8EAA8E;QAClF,KAAK,EAAE,mBAAmB;QAC1B,IAAI,EAAE,KAAK;QACX,UAAU,EAAE,yBAAyB;KACxC;IACD,MAAM,EAAE;QACJ,WAAW,EACP,iEAAiE;QACrE,KAAK,EAAE,mBAAmB;QAC1B,IAAI,EAAE,IAAI;QACV,UAAU,EAAE,uBAAuB;KACtC;IACD,0BAA0B,EAAE;QACxB,WAAW,EACP,8EAA8E;QAClF,KAAK,EAAE,uCAAuC;QAC9C,IAAI,EAAE,KAAK;QACX,UAAU,EAAE,6CAA6C;KAC5D;IACD,iBAAiB,EAAE;QACf,WAAW,EACP,8EAA8E;QAClF,KAAK,EAAE,4BAA4B;QACnC,IAAI,EAAE,IAAI;QACV,UAAU,EAAE,mCAAmC;KAClD;CACK,CAAC"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/** Action metadata file globs. */
|
|
2
2
|
export declare const ACTION_METADATA_FILE_GLOBS: readonly string[];
|
|
3
|
+
/** Dependabot configuration file globs. */
|
|
4
|
+
export declare const DEPENDABOT_FILE_GLOBS: readonly string[];
|
|
5
|
+
/** Dependency review workflow file globs. */
|
|
6
|
+
export declare const DEPENDENCY_REVIEW_WORKFLOW_FILE_GLOBS: readonly string[];
|
|
3
7
|
/** Workflow template metadata (`.properties.json`) file globs. */
|
|
4
8
|
export declare const WORKFLOW_TEMPLATE_PROPERTIES_FILE_GLOBS: readonly string[];
|
|
5
9
|
/** Workflow template YAML file globs. */
|
|
@@ -8,6 +12,10 @@ export declare const WORKFLOW_TEMPLATE_YAML_FILE_GLOBS: readonly string[];
|
|
|
8
12
|
export declare const WORKFLOW_TEMPLATE_FILE_GLOBS: readonly string[];
|
|
9
13
|
/** Determine whether a filename is an action metadata file. */
|
|
10
14
|
export declare const isActionMetadataFile: (filePath: string) => boolean;
|
|
15
|
+
/** Determine whether a filename is the repository Dependabot config file. */
|
|
16
|
+
export declare const isDependabotFile: (filePath: string) => boolean;
|
|
17
|
+
/** Determine whether a filename is a dependency review workflow file. */
|
|
18
|
+
export declare const isDependencyReviewWorkflowFile: (filePath: string) => boolean;
|
|
11
19
|
/** Determine whether a filename is a workflow template metadata file. */
|
|
12
20
|
export declare const isWorkflowTemplatePropertiesFile: (filePath: string) => boolean;
|
|
13
21
|
/** Determine whether a filename is a workflow template YAML file. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint-targets.d.ts","sourceRoot":"","sources":["../../src/_internal/lint-targets.ts"],"names":[],"mappings":"AAMA,kCAAkC;AAClC,eAAO,MAAM,0BAA0B,EAAE,SAAS,MAAM,EAEvD,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,uCAAuC,EAAE,SAAS,MAAM,EAEpE,CAAC;AAEF,yCAAyC;AACzC,eAAO,MAAM,iCAAiC,EAAE,SAAS,MAAM,EAE9D,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,4BAA4B,EAAE,SAAS,MAAM,EAGzD,CAAC;AAMF,+DAA+D;AAC/D,eAAO,MAAM,oBAAoB,GAAI,UAAU,MAAM,KAAG,OAOvD,CAAC;AAEF,yEA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;AACrE,eAAO,MAAM,0BAA0B,GAAI,UAAU,MAAM,KAAG,OAQ7D,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,sBAAsB,GAAI,UAAU,MAAM,KAAG,OAElB,CAAC;AAEzC,oEAAoE;AACpE,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,KAAG,OACN,CAAC;AAEhD,+DAA+D;AAC/D,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,KAAG,MAgBlD,CAAC"}
|
|
@@ -7,6 +7,14 @@ import { basename, extname } from "node:path";
|
|
|
7
7
|
export const ACTION_METADATA_FILE_GLOBS = [
|
|
8
8
|
"**/action.{yml,yaml}",
|
|
9
9
|
];
|
|
10
|
+
/** Dependabot configuration file globs. */
|
|
11
|
+
export const DEPENDABOT_FILE_GLOBS = [
|
|
12
|
+
".github/dependabot.{yml,yaml}",
|
|
13
|
+
];
|
|
14
|
+
/** Dependency review workflow file globs. */
|
|
15
|
+
export const DEPENDENCY_REVIEW_WORKFLOW_FILE_GLOBS = [
|
|
16
|
+
".github/workflows/dependency-review*.{yml,yaml}",
|
|
17
|
+
];
|
|
10
18
|
/** Workflow template metadata (`.properties.json`) file globs. */
|
|
11
19
|
export const WORKFLOW_TEMPLATE_PROPERTIES_FILE_GLOBS = [
|
|
12
20
|
"**/workflow-templates/*.properties.json",
|
|
@@ -28,6 +36,24 @@ export const isActionMetadataFile = (filePath) => {
|
|
|
28
36
|
return (normalizedFilePath.endsWith("/action.yml") ||
|
|
29
37
|
normalizedFilePath.endsWith("/action.yaml"));
|
|
30
38
|
};
|
|
39
|
+
/** Determine whether a filename is the repository Dependabot config file. */
|
|
40
|
+
export const isDependabotFile = (filePath) => {
|
|
41
|
+
const normalizedFilePath = normalizePathForMatching(filePath);
|
|
42
|
+
return (normalizedFilePath.endsWith("/.github/dependabot.yml") ||
|
|
43
|
+
normalizedFilePath.endsWith("/.github/dependabot.yaml") ||
|
|
44
|
+
normalizedFilePath === ".github/dependabot.yml" ||
|
|
45
|
+
normalizedFilePath === ".github/dependabot.yaml");
|
|
46
|
+
};
|
|
47
|
+
/** Determine whether a filename is a dependency review workflow file. */
|
|
48
|
+
export const isDependencyReviewWorkflowFile = (filePath) => {
|
|
49
|
+
const normalizedFilePath = normalizePathForMatching(filePath);
|
|
50
|
+
return ((normalizedFilePath.includes("/.github/workflows/") ||
|
|
51
|
+
normalizedFilePath.startsWith(".github/workflows/")) &&
|
|
52
|
+
(normalizedFilePath.endsWith("dependency-review.yml") ||
|
|
53
|
+
normalizedFilePath.endsWith("dependency-review.yaml") ||
|
|
54
|
+
normalizedFilePath.includes("/dependency-review-") ||
|
|
55
|
+
normalizedFilePath.includes("/dependency-review.")));
|
|
56
|
+
};
|
|
31
57
|
/** Determine whether a filename is a workflow template metadata file. */
|
|
32
58
|
export const isWorkflowTemplatePropertiesFile = (filePath) => normalizePathForMatching(filePath).includes("/workflow-templates/") &&
|
|
33
59
|
normalizePathForMatching(filePath).endsWith(".properties.json");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint-targets.js","sourceRoot":"","sources":["../../src/_internal/lint-targets.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE9C,kCAAkC;AAClC,MAAM,CAAC,MAAM,0BAA0B,GAAsB;IACzD,sBAAsB;CACzB,CAAC;AAEF,kEAAkE;AAClE,MAAM,CAAC,MAAM,uCAAuC,GAAsB;IACtE,yCAAyC;CAC5C,CAAC;AAEF,yCAAyC;AACzC,MAAM,CAAC,MAAM,iCAAiC,GAAsB;IAChE,oCAAoC;CACvC,CAAC;AAEF,2EAA2E;AAC3E,MAAM,CAAC,MAAM,4BAA4B,GAAsB;IAC3D,GAAG,iCAAiC;IACpC,GAAG,uCAAuC;CAC7C,CAAC;AAEF,kEAAkE;AAClE,MAAM,wBAAwB,GAAG,CAAC,QAAgB,EAAU,EAAE,CAC1D,QAAQ,CAAC,U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