eslint-plugin-github-actions-2 1.0.0
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/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/README.md +164 -0
- package/dist/_internal/case-police-dictionary.d.ts +10 -0
- package/dist/_internal/case-police-dictionary.d.ts.map +1 -0
- package/dist/_internal/case-police-dictionary.js +486 -0
- package/dist/_internal/case-police-dictionary.js.map +1 -0
- package/dist/_internal/casing.d.ts +17 -0
- package/dist/_internal/casing.d.ts.map +1 -0
- package/dist/_internal/casing.js +197 -0
- package/dist/_internal/casing.js.map +1 -0
- package/dist/_internal/github-actions-config-references.d.ts +16 -0
- package/dist/_internal/github-actions-config-references.d.ts.map +1 -0
- package/dist/_internal/github-actions-config-references.js +76 -0
- package/dist/_internal/github-actions-config-references.js.map +1 -0
- package/dist/_internal/github-actions-trigger-events.d.ts +13 -0
- package/dist/_internal/github-actions-trigger-events.d.ts.map +1 -0
- package/dist/_internal/github-actions-trigger-events.js +47 -0
- package/dist/_internal/github-actions-trigger-events.js.map +1 -0
- package/dist/_internal/github-expressions.d.ts +9 -0
- package/dist/_internal/github-expressions.d.ts.map +1 -0
- package/dist/_internal/github-expressions.js +87 -0
- package/dist/_internal/github-expressions.js.map +1 -0
- package/dist/_internal/lint-targets.d.ts +21 -0
- package/dist/_internal/lint-targets.d.ts.map +1 -0
- package/dist/_internal/lint-targets.js +60 -0
- package/dist/_internal/lint-targets.js.map +1 -0
- package/dist/_internal/rule-docs.d.ts +16 -0
- package/dist/_internal/rule-docs.d.ts.map +1 -0
- package/dist/_internal/rule-docs.js +2 -0
- package/dist/_internal/rule-docs.js.map +1 -0
- package/dist/_internal/rules-registry.d.ts +145 -0
- package/dist/_internal/rules-registry.d.ts.map +1 -0
- package/dist/_internal/rules-registry.js +144 -0
- package/dist/_internal/rules-registry.js.map +1 -0
- package/dist/_internal/workflow-template-properties.d.ts +20 -0
- package/dist/_internal/workflow-template-properties.d.ts.map +1 -0
- package/dist/_internal/workflow-template-properties.js +44 -0
- package/dist/_internal/workflow-template-properties.js.map +1 -0
- package/dist/_internal/workflow-yaml.d.ts +47 -0
- package/dist/_internal/workflow-yaml.d.ts.map +1 -0
- package/dist/_internal/workflow-yaml.js +140 -0
- package/dist/_internal/workflow-yaml.js.map +1 -0
- package/dist/_internal/yaml-traversal.d.ts +10 -0
- package/dist/_internal/yaml-traversal.d.ts.map +1 -0
- package/dist/_internal/yaml-traversal.js +38 -0
- package/dist/_internal/yaml-traversal.js.map +1 -0
- package/dist/plugin.cjs +7107 -0
- package/dist/plugin.cjs.map +7 -0
- package/dist/plugin.d.cts +34 -0
- package/dist/plugin.d.ts +34 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +122 -0
- package/dist/plugin.js.map +1 -0
- package/dist/rules/action-name-casing.d.ts +9 -0
- package/dist/rules/action-name-casing.d.ts.map +1 -0
- package/dist/rules/action-name-casing.js +141 -0
- package/dist/rules/action-name-casing.js.map +1 -0
- package/dist/rules/job-id-casing.d.ts +9 -0
- package/dist/rules/job-id-casing.d.ts.map +1 -0
- package/dist/rules/job-id-casing.js +123 -0
- package/dist/rules/job-id-casing.js.map +1 -0
- package/dist/rules/max-jobs-per-action.d.ts +9 -0
- package/dist/rules/max-jobs-per-action.d.ts.map +1 -0
- package/dist/rules/max-jobs-per-action.js +61 -0
- package/dist/rules/max-jobs-per-action.js.map +1 -0
- package/dist/rules/no-case-insensitive-input-id-collision.d.ts +9 -0
- package/dist/rules/no-case-insensitive-input-id-collision.d.ts.map +1 -0
- package/dist/rules/no-case-insensitive-input-id-collision.js +66 -0
- package/dist/rules/no-case-insensitive-input-id-collision.js.map +1 -0
- package/dist/rules/no-composite-input-env-access.d.ts +9 -0
- package/dist/rules/no-composite-input-env-access.d.ts.map +1 -0
- package/dist/rules/no-composite-input-env-access.js +62 -0
- package/dist/rules/no-composite-input-env-access.js.map +1 -0
- package/dist/rules/no-deprecated-node-runtime.d.ts +9 -0
- package/dist/rules/no-deprecated-node-runtime.d.ts.map +1 -0
- package/dist/rules/no-deprecated-node-runtime.js +59 -0
- package/dist/rules/no-deprecated-node-runtime.js.map +1 -0
- package/dist/rules/no-duplicate-composite-step-id.d.ts +9 -0
- package/dist/rules/no-duplicate-composite-step-id.d.ts.map +1 -0
- package/dist/rules/no-duplicate-composite-step-id.js +74 -0
- package/dist/rules/no-duplicate-composite-step-id.js.map +1 -0
- package/dist/rules/no-empty-template-file-pattern.d.ts +9 -0
- package/dist/rules/no-empty-template-file-pattern.d.ts.map +1 -0
- package/dist/rules/no-empty-template-file-pattern.js +49 -0
- package/dist/rules/no-empty-template-file-pattern.js.map +1 -0
- package/dist/rules/no-external-job.d.ts +9 -0
- package/dist/rules/no-external-job.d.ts.map +1 -0
- package/dist/rules/no-external-job.js +49 -0
- package/dist/rules/no-external-job.js.map +1 -0
- package/dist/rules/no-hardcoded-default-branch-in-template.d.ts +9 -0
- package/dist/rules/no-hardcoded-default-branch-in-template.d.ts.map +1 -0
- package/dist/rules/no-hardcoded-default-branch-in-template.js +54 -0
- package/dist/rules/no-hardcoded-default-branch-in-template.js.map +1 -0
- package/dist/rules/no-icon-file-extension-in-template-icon-name.d.ts +9 -0
- package/dist/rules/no-icon-file-extension-in-template-icon-name.d.ts.map +1 -0
- package/dist/rules/no-icon-file-extension-in-template-icon-name.js +54 -0
- package/dist/rules/no-icon-file-extension-in-template-icon-name.js.map +1 -0
- package/dist/rules/no-inherit-secrets.d.ts +9 -0
- package/dist/rules/no-inherit-secrets.d.ts.map +1 -0
- package/dist/rules/no-inherit-secrets.js +57 -0
- package/dist/rules/no-inherit-secrets.js.map +1 -0
- package/dist/rules/no-invalid-concurrency-context.d.ts +9 -0
- package/dist/rules/no-invalid-concurrency-context.d.ts.map +1 -0
- package/dist/rules/no-invalid-concurrency-context.js +141 -0
- package/dist/rules/no-invalid-concurrency-context.js.map +1 -0
- package/dist/rules/no-invalid-key.d.ts +9 -0
- package/dist/rules/no-invalid-key.d.ts.map +1 -0
- package/dist/rules/no-invalid-key.js +152 -0
- package/dist/rules/no-invalid-key.js.map +1 -0
- package/dist/rules/no-invalid-reusable-workflow-job-key.d.ts +9 -0
- package/dist/rules/no-invalid-reusable-workflow-job-key.d.ts.map +1 -0
- package/dist/rules/no-invalid-reusable-workflow-job-key.js +73 -0
- package/dist/rules/no-invalid-reusable-workflow-job-key.js.map +1 -0
- package/dist/rules/no-invalid-template-file-pattern-regex.d.ts +9 -0
- package/dist/rules/no-invalid-template-file-pattern-regex.d.ts.map +1 -0
- package/dist/rules/no-invalid-template-file-pattern-regex.js +58 -0
- package/dist/rules/no-invalid-template-file-pattern-regex.js.map +1 -0
- package/dist/rules/no-invalid-workflow-call-output-value.d.ts +9 -0
- package/dist/rules/no-invalid-workflow-call-output-value.d.ts.map +1 -0
- package/dist/rules/no-invalid-workflow-call-output-value.js +99 -0
- package/dist/rules/no-invalid-workflow-call-output-value.js.map +1 -0
- package/dist/rules/no-path-separators-in-template-icon-name.d.ts +9 -0
- package/dist/rules/no-path-separators-in-template-icon-name.d.ts.map +1 -0
- package/dist/rules/no-path-separators-in-template-icon-name.js +52 -0
- package/dist/rules/no-path-separators-in-template-icon-name.js.map +1 -0
- package/dist/rules/no-post-if-without-post.d.ts +9 -0
- package/dist/rules/no-post-if-without-post.d.ts.map +1 -0
- package/dist/rules/no-post-if-without-post.js +52 -0
- package/dist/rules/no-post-if-without-post.js.map +1 -0
- package/dist/rules/no-pr-head-checkout-in-pull-request-target.d.ts +12 -0
- package/dist/rules/no-pr-head-checkout-in-pull-request-target.d.ts.map +1 -0
- package/dist/rules/no-pr-head-checkout-in-pull-request-target.js +89 -0
- package/dist/rules/no-pr-head-checkout-in-pull-request-target.js.map +1 -0
- package/dist/rules/no-pre-if-without-pre.d.ts +9 -0
- package/dist/rules/no-pre-if-without-pre.d.ts.map +1 -0
- package/dist/rules/no-pre-if-without-pre.js +51 -0
- package/dist/rules/no-pre-if-without-pre.js.map +1 -0
- package/dist/rules/no-required-input-with-default.d.ts +9 -0
- package/dist/rules/no-required-input-with-default.d.ts.map +1 -0
- package/dist/rules/no-required-input-with-default.js +68 -0
- package/dist/rules/no-required-input-with-default.js.map +1 -0
- package/dist/rules/no-secrets-in-if.d.ts +9 -0
- package/dist/rules/no-secrets-in-if.d.ts.map +1 -0
- package/dist/rules/no-secrets-in-if.js +84 -0
- package/dist/rules/no-secrets-in-if.js.map +1 -0
- package/dist/rules/no-self-hosted-runner-on-fork-pr-events.d.ts +9 -0
- package/dist/rules/no-self-hosted-runner-on-fork-pr-events.d.ts.map +1 -0
- package/dist/rules/no-self-hosted-runner-on-fork-pr-events.js +93 -0
- package/dist/rules/no-self-hosted-runner-on-fork-pr-events.js.map +1 -0
- package/dist/rules/no-subdirectory-template-file-pattern.d.ts +9 -0
- package/dist/rules/no-subdirectory-template-file-pattern.d.ts.map +1 -0
- package/dist/rules/no-subdirectory-template-file-pattern.js +52 -0
- package/dist/rules/no-subdirectory-template-file-pattern.js.map +1 -0
- package/dist/rules/no-template-placeholder-in-non-template-workflow.d.ts +9 -0
- package/dist/rules/no-template-placeholder-in-non-template-workflow.d.ts.map +1 -0
- package/dist/rules/no-template-placeholder-in-non-template-workflow.js +55 -0
- package/dist/rules/no-template-placeholder-in-non-template-workflow.js.map +1 -0
- package/dist/rules/no-top-level-env.d.ts +9 -0
- package/dist/rules/no-top-level-env.d.ts.map +1 -0
- package/dist/rules/no-top-level-env.js +42 -0
- package/dist/rules/no-top-level-env.js.map +1 -0
- package/dist/rules/no-top-level-permissions.d.ts +9 -0
- package/dist/rules/no-top-level-permissions.d.ts.map +1 -0
- package/dist/rules/no-top-level-permissions.js +39 -0
- package/dist/rules/no-top-level-permissions.js.map +1 -0
- package/dist/rules/no-universal-template-file-pattern.d.ts +9 -0
- package/dist/rules/no-universal-template-file-pattern.d.ts.map +1 -0
- package/dist/rules/no-universal-template-file-pattern.js +60 -0
- package/dist/rules/no-universal-template-file-pattern.js.map +1 -0
- package/dist/rules/no-unknown-input-reference-in-composite.d.ts +9 -0
- package/dist/rules/no-unknown-input-reference-in-composite.d.ts.map +1 -0
- package/dist/rules/no-unknown-input-reference-in-composite.js +80 -0
- package/dist/rules/no-unknown-input-reference-in-composite.js.map +1 -0
- package/dist/rules/no-unknown-job-output-reference.d.ts +9 -0
- package/dist/rules/no-unknown-job-output-reference.d.ts.map +1 -0
- package/dist/rules/no-unknown-job-output-reference.js +229 -0
- package/dist/rules/no-unknown-job-output-reference.js.map +1 -0
- package/dist/rules/no-unknown-step-reference.d.ts +9 -0
- package/dist/rules/no-unknown-step-reference.d.ts.map +1 -0
- package/dist/rules/no-unknown-step-reference.js +133 -0
- package/dist/rules/no-unknown-step-reference.js.map +1 -0
- package/dist/rules/no-untrusted-input-in-run.d.ts +9 -0
- package/dist/rules/no-untrusted-input-in-run.d.ts.map +1 -0
- package/dist/rules/no-untrusted-input-in-run.js +115 -0
- package/dist/rules/no-untrusted-input-in-run.js.map +1 -0
- package/dist/rules/no-unused-input-in-composite.d.ts +9 -0
- package/dist/rules/no-unused-input-in-composite.d.ts.map +1 -0
- package/dist/rules/no-unused-input-in-composite.js +78 -0
- package/dist/rules/no-unused-input-in-composite.js.map +1 -0
- package/dist/rules/no-write-all-permissions.d.ts +9 -0
- package/dist/rules/no-write-all-permissions.d.ts.map +1 -0
- package/dist/rules/no-write-all-permissions.js +61 -0
- package/dist/rules/no-write-all-permissions.js.map +1 -0
- package/dist/rules/pin-action-shas.d.ts +12 -0
- package/dist/rules/pin-action-shas.d.ts.map +1 -0
- package/dist/rules/pin-action-shas.js +100 -0
- package/dist/rules/pin-action-shas.js.map +1 -0
- package/dist/rules/prefer-action-yml.d.ts +9 -0
- package/dist/rules/prefer-action-yml.d.ts.map +1 -0
- package/dist/rules/prefer-action-yml.js +37 -0
- package/dist/rules/prefer-action-yml.js.map +1 -0
- package/dist/rules/prefer-fail-fast.d.ts +9 -0
- package/dist/rules/prefer-fail-fast.d.ts.map +1 -0
- package/dist/rules/prefer-fail-fast.js +61 -0
- package/dist/rules/prefer-fail-fast.js.map +1 -0
- package/dist/rules/prefer-file-extension.d.ts +9 -0
- package/dist/rules/prefer-file-extension.d.ts.map +1 -0
- package/dist/rules/prefer-file-extension.js +104 -0
- package/dist/rules/prefer-file-extension.js.map +1 -0
- package/dist/rules/prefer-inputs-context.d.ts +9 -0
- package/dist/rules/prefer-inputs-context.d.ts.map +1 -0
- package/dist/rules/prefer-inputs-context.js +91 -0
- package/dist/rules/prefer-inputs-context.js.map +1 -0
- package/dist/rules/prefer-step-uses-style.d.ts +9 -0
- package/dist/rules/prefer-step-uses-style.d.ts.map +1 -0
- package/dist/rules/prefer-step-uses-style.js +209 -0
- package/dist/rules/prefer-step-uses-style.js.map +1 -0
- package/dist/rules/prefer-template-yml-extension.d.ts +9 -0
- package/dist/rules/prefer-template-yml-extension.d.ts.map +1 -0
- package/dist/rules/prefer-template-yml-extension.js +41 -0
- package/dist/rules/prefer-template-yml-extension.js.map +1 -0
- package/dist/rules/require-action-name.d.ts +9 -0
- package/dist/rules/require-action-name.d.ts.map +1 -0
- package/dist/rules/require-action-name.js +57 -0
- package/dist/rules/require-action-name.js.map +1 -0
- package/dist/rules/require-action-run-name.d.ts +9 -0
- package/dist/rules/require-action-run-name.d.ts.map +1 -0
- package/dist/rules/require-action-run-name.js +56 -0
- package/dist/rules/require-action-run-name.js.map +1 -0
- package/dist/rules/require-checkout-before-local-action.d.ts +9 -0
- package/dist/rules/require-checkout-before-local-action.d.ts.map +1 -0
- package/dist/rules/require-checkout-before-local-action.js +74 -0
- package/dist/rules/require-checkout-before-local-action.js.map +1 -0
- package/dist/rules/require-composite-step-name.d.ts +9 -0
- package/dist/rules/require-composite-step-name.d.ts.map +1 -0
- package/dist/rules/require-composite-step-name.js +67 -0
- package/dist/rules/require-composite-step-name.js.map +1 -0
- package/dist/rules/require-job-name.d.ts +9 -0
- package/dist/rules/require-job-name.d.ts.map +1 -0
- package/dist/rules/require-job-name.js +70 -0
- package/dist/rules/require-job-name.js.map +1 -0
- package/dist/rules/require-job-step-name.d.ts +9 -0
- package/dist/rules/require-job-step-name.d.ts.map +1 -0
- package/dist/rules/require-job-step-name.js +71 -0
- package/dist/rules/require-job-step-name.js.map +1 -0
- package/dist/rules/require-job-timeout-minutes.d.ts +9 -0
- package/dist/rules/require-job-timeout-minutes.d.ts.map +1 -0
- package/dist/rules/require-job-timeout-minutes.js +99 -0
- package/dist/rules/require-job-timeout-minutes.js.map +1 -0
- package/dist/rules/require-merge-group-trigger.d.ts +9 -0
- package/dist/rules/require-merge-group-trigger.d.ts.map +1 -0
- package/dist/rules/require-merge-group-trigger.js +65 -0
- package/dist/rules/require-merge-group-trigger.js.map +1 -0
- package/dist/rules/require-pull-request-target-branches.d.ts +9 -0
- package/dist/rules/require-pull-request-target-branches.d.ts.map +1 -0
- package/dist/rules/require-pull-request-target-branches.js +102 -0
- package/dist/rules/require-pull-request-target-branches.js.map +1 -0
- package/dist/rules/require-run-step-shell.d.ts +9 -0
- package/dist/rules/require-run-step-shell.d.ts.map +1 -0
- package/dist/rules/require-run-step-shell.js +114 -0
- package/dist/rules/require-run-step-shell.js.map +1 -0
- package/dist/rules/require-template-categories.d.ts +9 -0
- package/dist/rules/require-template-categories.d.ts.map +1 -0
- package/dist/rules/require-template-categories.js +55 -0
- package/dist/rules/require-template-categories.js.map +1 -0
- package/dist/rules/require-template-file-patterns.d.ts +9 -0
- package/dist/rules/require-template-file-patterns.d.ts.map +1 -0
- package/dist/rules/require-template-file-patterns.js +55 -0
- package/dist/rules/require-template-file-patterns.js.map +1 -0
- package/dist/rules/require-template-icon-file-exists.d.ts +9 -0
- package/dist/rules/require-template-icon-file-exists.d.ts.map +1 -0
- package/dist/rules/require-template-icon-file-exists.js +61 -0
- package/dist/rules/require-template-icon-file-exists.js.map +1 -0
- package/dist/rules/require-template-icon-name.d.ts +9 -0
- package/dist/rules/require-template-icon-name.d.ts.map +1 -0
- package/dist/rules/require-template-icon-name.js +48 -0
- package/dist/rules/require-template-icon-name.js.map +1 -0
- package/dist/rules/require-template-workflow-name.d.ts +9 -0
- package/dist/rules/require-template-workflow-name.d.ts.map +1 -0
- package/dist/rules/require-template-workflow-name.js +48 -0
- package/dist/rules/require-template-workflow-name.js.map +1 -0
- package/dist/rules/require-trigger-types.d.ts +9 -0
- package/dist/rules/require-trigger-types.d.ts.map +1 -0
- package/dist/rules/require-trigger-types.js +126 -0
- package/dist/rules/require-trigger-types.js.map +1 -0
- package/dist/rules/require-workflow-call-input-type.d.ts +9 -0
- package/dist/rules/require-workflow-call-input-type.d.ts.map +1 -0
- package/dist/rules/require-workflow-call-input-type.js +89 -0
- package/dist/rules/require-workflow-call-input-type.js.map +1 -0
- package/dist/rules/require-workflow-call-output-value.d.ts +9 -0
- package/dist/rules/require-workflow-call-output-value.d.ts.map +1 -0
- package/dist/rules/require-workflow-call-output-value.js +79 -0
- package/dist/rules/require-workflow-call-output-value.js.map +1 -0
- package/dist/rules/require-workflow-concurrency.d.ts +9 -0
- package/dist/rules/require-workflow-concurrency.d.ts.map +1 -0
- package/dist/rules/require-workflow-concurrency.js +157 -0
- package/dist/rules/require-workflow-concurrency.js.map +1 -0
- package/dist/rules/require-workflow-dispatch-input-type.d.ts +9 -0
- package/dist/rules/require-workflow-dispatch-input-type.d.ts.map +1 -0
- package/dist/rules/require-workflow-dispatch-input-type.js +80 -0
- package/dist/rules/require-workflow-dispatch-input-type.js.map +1 -0
- package/dist/rules/require-workflow-interface-description.d.ts +9 -0
- package/dist/rules/require-workflow-interface-description.d.ts.map +1 -0
- package/dist/rules/require-workflow-interface-description.js +98 -0
- package/dist/rules/require-workflow-interface-description.js.map +1 -0
- package/dist/rules/require-workflow-permissions.d.ts +9 -0
- package/dist/rules/require-workflow-permissions.d.ts.map +1 -0
- package/dist/rules/require-workflow-permissions.js +83 -0
- package/dist/rules/require-workflow-permissions.js.map +1 -0
- package/dist/rules/require-workflow-run-branches.d.ts +9 -0
- package/dist/rules/require-workflow-run-branches.d.ts.map +1 -0
- package/dist/rules/require-workflow-run-branches.js +84 -0
- package/dist/rules/require-workflow-run-branches.js.map +1 -0
- package/dist/rules/require-workflow-template-pair.d.ts +9 -0
- package/dist/rules/require-workflow-template-pair.d.ts.map +1 -0
- package/dist/rules/require-workflow-template-pair.js +47 -0
- package/dist/rules/require-workflow-template-pair.js.map +1 -0
- package/dist/rules/require-workflow-template-properties-pair.d.ts +9 -0
- package/dist/rules/require-workflow-template-properties-pair.d.ts.map +1 -0
- package/dist/rules/require-workflow-template-properties-pair.js +49 -0
- package/dist/rules/require-workflow-template-properties-pair.js.map +1 -0
- package/dist/rules/valid-timeout-minutes.d.ts +9 -0
- package/dist/rules/valid-timeout-minutes.d.ts.map +1 -0
- package/dist/rules/valid-timeout-minutes.js +255 -0
- package/dist/rules/valid-timeout-minutes.js.map +1 -0
- package/dist/rules/valid-trigger-events.d.ts +9 -0
- package/dist/rules/valid-trigger-events.d.ts.map +1 -0
- package/dist/rules/valid-trigger-events.js +100 -0
- package/dist/rules/valid-trigger-events.js.map +1 -0
- package/docs/rules/action-name-casing.md +64 -0
- package/docs/rules/getting-started.md +46 -0
- package/docs/rules/job-id-casing.md +73 -0
- package/docs/rules/max-jobs-per-action.md +79 -0
- package/docs/rules/no-case-insensitive-input-id-collision.md +63 -0
- package/docs/rules/no-composite-input-env-access.md +66 -0
- package/docs/rules/no-deprecated-node-runtime.md +61 -0
- package/docs/rules/no-duplicate-composite-step-id.md +73 -0
- package/docs/rules/no-empty-template-file-pattern.md +57 -0
- package/docs/rules/no-external-job.md +66 -0
- package/docs/rules/no-hardcoded-default-branch-in-template.md +63 -0
- package/docs/rules/no-icon-file-extension-in-template-icon-name.md +57 -0
- package/docs/rules/no-inherit-secrets.md +65 -0
- package/docs/rules/no-invalid-concurrency-context.md +101 -0
- package/docs/rules/no-invalid-key.md +86 -0
- package/docs/rules/no-invalid-reusable-workflow-job-key.md +74 -0
- package/docs/rules/no-invalid-template-file-pattern-regex.md +57 -0
- package/docs/rules/no-invalid-workflow-call-output-value.md +80 -0
- package/docs/rules/no-path-separators-in-template-icon-name.md +57 -0
- package/docs/rules/no-post-if-without-post.md +64 -0
- package/docs/rules/no-pr-head-checkout-in-pull-request-target.md +83 -0
- package/docs/rules/no-pre-if-without-pre.md +64 -0
- package/docs/rules/no-required-input-with-default.md +64 -0
- package/docs/rules/no-secrets-in-if.md +70 -0
- package/docs/rules/no-self-hosted-runner-on-fork-pr-events.md +75 -0
- package/docs/rules/no-subdirectory-template-file-pattern.md +57 -0
- package/docs/rules/no-template-placeholder-in-non-template-workflow.md +63 -0
- package/docs/rules/no-top-level-env.md +64 -0
- package/docs/rules/no-top-level-permissions.md +64 -0
- package/docs/rules/no-universal-template-file-pattern.md +57 -0
- package/docs/rules/no-unknown-input-reference-in-composite.md +71 -0
- package/docs/rules/no-unknown-job-output-reference.md +88 -0
- package/docs/rules/no-unknown-step-reference.md +73 -0
- package/docs/rules/no-untrusted-input-in-run.md +74 -0
- package/docs/rules/no-unused-input-in-composite.md +71 -0
- package/docs/rules/no-write-all-permissions.md +60 -0
- package/docs/rules/overview.md +91 -0
- package/docs/rules/pin-action-shas.md +65 -0
- package/docs/rules/prefer-action-yml.md +57 -0
- package/docs/rules/prefer-fail-fast.md +72 -0
- package/docs/rules/prefer-file-extension.md +77 -0
- package/docs/rules/prefer-inputs-context.md +84 -0
- package/docs/rules/prefer-step-uses-style.md +70 -0
- package/docs/rules/prefer-template-yml-extension.md +57 -0
- package/docs/rules/presets/action-metadata.md +18 -0
- package/docs/rules/presets/all.md +76 -0
- package/docs/rules/presets/index.md +100 -0
- package/docs/rules/presets/recommended.md +26 -0
- package/docs/rules/presets/security.md +16 -0
- package/docs/rules/presets/strict.md +48 -0
- package/docs/rules/presets/workflow-template-properties.md +18 -0
- package/docs/rules/presets/workflow-templates.md +22 -0
- package/docs/rules/require-action-name.md +61 -0
- package/docs/rules/require-action-run-name.md +63 -0
- package/docs/rules/require-checkout-before-local-action.md +66 -0
- package/docs/rules/require-composite-step-name.md +66 -0
- package/docs/rules/require-job-name.md +63 -0
- package/docs/rules/require-job-step-name.md +69 -0
- package/docs/rules/require-job-timeout-minutes.md +76 -0
- package/docs/rules/require-merge-group-trigger.md +67 -0
- package/docs/rules/require-pull-request-target-branches.md +79 -0
- package/docs/rules/require-run-step-shell.md +85 -0
- package/docs/rules/require-template-categories.md +62 -0
- package/docs/rules/require-template-file-patterns.md +63 -0
- package/docs/rules/require-template-icon-file-exists.md +61 -0
- package/docs/rules/require-template-icon-name.md +57 -0
- package/docs/rules/require-template-workflow-name.md +60 -0
- package/docs/rules/require-trigger-types.md +76 -0
- package/docs/rules/require-workflow-call-input-type.md +70 -0
- package/docs/rules/require-workflow-call-output-value.md +67 -0
- package/docs/rules/require-workflow-concurrency.md +73 -0
- package/docs/rules/require-workflow-dispatch-input-type.md +70 -0
- package/docs/rules/require-workflow-interface-description.md +96 -0
- package/docs/rules/require-workflow-permissions.md +75 -0
- package/docs/rules/require-workflow-run-branches.md +66 -0
- package/docs/rules/require-workflow-template-pair.md +58 -0
- package/docs/rules/require-workflow-template-properties-pair.md +58 -0
- package/docs/rules/valid-timeout-minutes.md +74 -0
- package/docs/rules/valid-trigger-events.md +62 -0
- package/package.json +497 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# no-universal-template-file-pattern
|
|
2
|
+
|
|
3
|
+
> **Rule catalog ID:** R061
|
|
4
|
+
|
|
5
|
+
## Targeted pattern scope
|
|
6
|
+
|
|
7
|
+
`filePatterns` entries in workflow-template properties metadata.
|
|
8
|
+
|
|
9
|
+
## What this rule reports
|
|
10
|
+
|
|
11
|
+
Reports universal catch-all patterns such as `.*`, `^.*$`, `.+`, and `^.+$`.
|
|
12
|
+
|
|
13
|
+
## Why this rule exists
|
|
14
|
+
|
|
15
|
+
Catch-all patterns degrade template recommendation precision.
|
|
16
|
+
|
|
17
|
+
## ❌ Incorrect
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{ "filePatterns": [".*"] }
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## ✅ Correct
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{ "filePatterns": ["package.json$", "^Cargo\\.toml$"] }
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## Additional examples
|
|
31
|
+
|
|
32
|
+
For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.
|
|
33
|
+
|
|
34
|
+
## ESLint flat config example
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
import githubActions from "eslint-plugin-github-actions-2";
|
|
38
|
+
|
|
39
|
+
export default [
|
|
40
|
+
{
|
|
41
|
+
files: ["**/*.{yml,yaml}"],
|
|
42
|
+
plugins: {
|
|
43
|
+
"github-actions": githubActions,
|
|
44
|
+
},
|
|
45
|
+
rules: {
|
|
46
|
+
"github-actions/no-universal-template-file-pattern": "error",
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## When not to use it
|
|
53
|
+
|
|
54
|
+
You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.
|
|
55
|
+
## Further reading
|
|
56
|
+
|
|
57
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/reusing-workflow-configurations#metadata-file-requirements](https://docs.github.com/actions/reference/workflows-and-actions/reusing-workflow-configurations#metadata-file-requirements)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# no-unknown-input-reference-in-composite
|
|
2
|
+
|
|
3
|
+
> **Rule catalog ID:** R050
|
|
4
|
+
|
|
5
|
+
## Targeted pattern scope
|
|
6
|
+
|
|
7
|
+
Composite action metadata strings that reference `inputs.<id>`.
|
|
8
|
+
|
|
9
|
+
## What this rule reports
|
|
10
|
+
|
|
11
|
+
Reports `inputs.<id>` references when `<id>` is not declared under `inputs`.
|
|
12
|
+
|
|
13
|
+
## Why this rule exists
|
|
14
|
+
|
|
15
|
+
Typos in input references make composite actions behave incorrectly at runtime.
|
|
16
|
+
|
|
17
|
+
## ❌ Incorrect
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
inputs:
|
|
21
|
+
token:
|
|
22
|
+
description: Token
|
|
23
|
+
runs:
|
|
24
|
+
using: composite
|
|
25
|
+
steps:
|
|
26
|
+
- run: echo "${{ inputs.tokne }}"
|
|
27
|
+
shell: bash
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## ✅ Correct
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
inputs:
|
|
34
|
+
token:
|
|
35
|
+
description: Token
|
|
36
|
+
runs:
|
|
37
|
+
using: composite
|
|
38
|
+
steps:
|
|
39
|
+
- run: echo "${{ inputs.token }}"
|
|
40
|
+
shell: bash
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
## Additional examples
|
|
45
|
+
|
|
46
|
+
For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.
|
|
47
|
+
|
|
48
|
+
## ESLint flat config example
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
import githubActions from "eslint-plugin-github-actions-2";
|
|
52
|
+
|
|
53
|
+
export default [
|
|
54
|
+
{
|
|
55
|
+
files: ["**/*.{yml,yaml}"],
|
|
56
|
+
plugins: {
|
|
57
|
+
"github-actions": githubActions,
|
|
58
|
+
},
|
|
59
|
+
rules: {
|
|
60
|
+
"github-actions/no-unknown-input-reference-in-composite": "error",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## When not to use it
|
|
67
|
+
|
|
68
|
+
You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.
|
|
69
|
+
## Further reading
|
|
70
|
+
|
|
71
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/metadata-syntax#inputs](https://docs.github.com/actions/reference/workflows-and-actions/metadata-syntax#inputs)
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# no-unknown-job-output-reference
|
|
2
|
+
|
|
3
|
+
> **Rule catalog ID:** R037
|
|
4
|
+
|
|
5
|
+
## Targeted pattern scope
|
|
6
|
+
|
|
7
|
+
GitHub Actions workflow YAML files that reference job outputs through `needs.<job_id>.outputs.<output_name>` or reusable workflow outputs through `jobs.<job_id>.outputs.<output_name>`.
|
|
8
|
+
|
|
9
|
+
## What this rule reports
|
|
10
|
+
|
|
11
|
+
This rule reports output references that point at:
|
|
12
|
+
|
|
13
|
+
- a job that does not exist
|
|
14
|
+
- a job that is not listed in the current job's direct `needs`
|
|
15
|
+
- an output name that is not declared under the referenced job's `outputs`
|
|
16
|
+
|
|
17
|
+
## Why this rule exists
|
|
18
|
+
|
|
19
|
+
GitHub only populates the `needs` context for direct dependencies, and reusable workflow outputs must be mapped from declared job outputs. Typos in job IDs, missing `needs` dependencies, or misspelled output names silently evaluate to empty strings at runtime and can break downstream deployment, release, or reporting logic.
|
|
20
|
+
|
|
21
|
+
## ❌ Incorrect
|
|
22
|
+
|
|
23
|
+
```yaml
|
|
24
|
+
jobs:
|
|
25
|
+
build:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
outputs:
|
|
28
|
+
artifact-sha: ${{ steps.pkg.outputs.sha }}
|
|
29
|
+
steps:
|
|
30
|
+
- id: pkg
|
|
31
|
+
run: echo "sha=abc123" >> "$GITHUB_OUTPUT"
|
|
32
|
+
|
|
33
|
+
deploy:
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
steps:
|
|
36
|
+
- run: echo "${{ needs.build.outputs.artifact_sha }}"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## ✅ Correct
|
|
40
|
+
|
|
41
|
+
```yaml
|
|
42
|
+
jobs:
|
|
43
|
+
build:
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
outputs:
|
|
46
|
+
artifact-sha: ${{ steps.pkg.outputs.sha }}
|
|
47
|
+
steps:
|
|
48
|
+
- id: pkg
|
|
49
|
+
run: echo "sha=abc123" >> "$GITHUB_OUTPUT"
|
|
50
|
+
|
|
51
|
+
deploy:
|
|
52
|
+
needs: build
|
|
53
|
+
runs-on: ubuntu-latest
|
|
54
|
+
steps:
|
|
55
|
+
- run: echo "${{ needs.build.outputs.artifact-sha }}"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
## Additional examples
|
|
60
|
+
|
|
61
|
+
For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.
|
|
62
|
+
|
|
63
|
+
## ESLint flat config example
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
import githubActions from "eslint-plugin-github-actions-2";
|
|
67
|
+
|
|
68
|
+
export default [
|
|
69
|
+
{
|
|
70
|
+
files: ["**/*.{yml,yaml}"],
|
|
71
|
+
plugins: {
|
|
72
|
+
"github-actions": githubActions,
|
|
73
|
+
},
|
|
74
|
+
rules: {
|
|
75
|
+
"github-actions/no-unknown-job-output-reference": "error",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
];
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## When not to use it
|
|
82
|
+
|
|
83
|
+
You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.
|
|
84
|
+
## Further reading
|
|
85
|
+
|
|
86
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/contexts#needs-context](https://docs.github.com/actions/reference/workflows-and-actions/contexts#needs-context)
|
|
87
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idoutputs](https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idoutputs)
|
|
88
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#onworkflow_calloutputs](https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#onworkflow_calloutputs)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# no-unknown-step-reference
|
|
2
|
+
|
|
3
|
+
> **Rule catalog ID:** R038
|
|
4
|
+
|
|
5
|
+
## Targeted pattern scope
|
|
6
|
+
|
|
7
|
+
GitHub Actions workflow YAML files that reference the `steps` context.
|
|
8
|
+
|
|
9
|
+
## What this rule reports
|
|
10
|
+
|
|
11
|
+
This rule reports `steps.<id>.*` references when the referenced step ID does not exist in the job, or when a step tries to read the `steps` context from a later step that has not run yet.
|
|
12
|
+
|
|
13
|
+
## Why this rule exists
|
|
14
|
+
|
|
15
|
+
GitHub documents that the `steps` context only contains steps in the current job that have an `id` and have already run. A typo in `steps.<id>` or a forward reference to a later step resolves to missing data at runtime and can invalidate job outputs, environment URLs, or step conditionals.
|
|
16
|
+
|
|
17
|
+
## ❌ Incorrect
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
jobs:
|
|
21
|
+
build:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- name: Use result too early
|
|
25
|
+
run: echo "${{ steps.publish.outputs.url }}"
|
|
26
|
+
- id: publish
|
|
27
|
+
run: echo "url=https://example.com" >> "$GITHUB_OUTPUT"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## ✅ Correct
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
jobs:
|
|
34
|
+
build:
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
steps:
|
|
37
|
+
- id: publish
|
|
38
|
+
run: echo "url=https://example.com" >> "$GITHUB_OUTPUT"
|
|
39
|
+
- name: Use published URL
|
|
40
|
+
run: echo "${{ steps.publish.outputs.url }}"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
## Additional examples
|
|
45
|
+
|
|
46
|
+
For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.
|
|
47
|
+
|
|
48
|
+
## ESLint flat config example
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
import githubActions from "eslint-plugin-github-actions-2";
|
|
52
|
+
|
|
53
|
+
export default [
|
|
54
|
+
{
|
|
55
|
+
files: ["**/*.{yml,yaml}"],
|
|
56
|
+
plugins: {
|
|
57
|
+
"github-actions": githubActions,
|
|
58
|
+
},
|
|
59
|
+
rules: {
|
|
60
|
+
"github-actions/no-unknown-step-reference": "error",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## When not to use it
|
|
67
|
+
|
|
68
|
+
You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.
|
|
69
|
+
## Further reading
|
|
70
|
+
|
|
71
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/contexts#steps-context](https://docs.github.com/actions/reference/workflows-and-actions/contexts#steps-context)
|
|
72
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepsid](https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepsid)
|
|
73
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idoutputs](https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idoutputs)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# no-untrusted-input-in-run
|
|
2
|
+
|
|
3
|
+
> **Rule catalog ID:** R029
|
|
4
|
+
|
|
5
|
+
## Targeted pattern scope
|
|
6
|
+
|
|
7
|
+
GitHub Actions workflow YAML files with inline `run` scripts that interpolate event payload values directly.
|
|
8
|
+
|
|
9
|
+
## What this rule reports
|
|
10
|
+
|
|
11
|
+
This rule reports `run` steps that directly embed untrusted event payload values such as pull request titles, issue bodies, comment bodies, review bodies, discussion text, or `repository_dispatch` client payload fields.
|
|
12
|
+
|
|
13
|
+
## Why this rule exists
|
|
14
|
+
|
|
15
|
+
GitHub recommends using an intermediate environment variable instead of interpolating untrusted context values directly into generated shell scripts. That reduces script-injection risk and makes the data flow easier to review.
|
|
16
|
+
|
|
17
|
+
## ❌ Incorrect
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
on:
|
|
21
|
+
pull_request:
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
check-title:
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
steps:
|
|
27
|
+
- run: echo "${{ github.event.pull_request.title }}"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## ✅ Correct
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
on:
|
|
34
|
+
pull_request:
|
|
35
|
+
|
|
36
|
+
jobs:
|
|
37
|
+
check-title:
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
steps:
|
|
40
|
+
- env:
|
|
41
|
+
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
42
|
+
run: echo "$PR_TITLE"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## Additional examples
|
|
47
|
+
|
|
48
|
+
For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.
|
|
49
|
+
|
|
50
|
+
## ESLint flat config example
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
import githubActions from "eslint-plugin-github-actions-2";
|
|
54
|
+
|
|
55
|
+
export default [
|
|
56
|
+
{
|
|
57
|
+
files: ["**/*.{yml,yaml}"],
|
|
58
|
+
plugins: {
|
|
59
|
+
"github-actions": githubActions,
|
|
60
|
+
},
|
|
61
|
+
rules: {
|
|
62
|
+
"github-actions/no-untrusted-input-in-run": "error",
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## When not to use it
|
|
69
|
+
|
|
70
|
+
You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.
|
|
71
|
+
## Further reading
|
|
72
|
+
|
|
73
|
+
- [https://docs.github.com/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks](https://docs.github.com/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks)
|
|
74
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepsrun](https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepsrun)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# no-unused-input-in-composite
|
|
2
|
+
|
|
3
|
+
> **Rule catalog ID:** R053
|
|
4
|
+
|
|
5
|
+
## Targeted pattern scope
|
|
6
|
+
|
|
7
|
+
Composite action inputs declared under `inputs`.
|
|
8
|
+
|
|
9
|
+
## What this rule reports
|
|
10
|
+
|
|
11
|
+
Reports declared inputs that are never referenced as `inputs.<id>`.
|
|
12
|
+
|
|
13
|
+
## Why this rule exists
|
|
14
|
+
|
|
15
|
+
Unused inputs increase maintenance burden and create confusing action interfaces.
|
|
16
|
+
|
|
17
|
+
## ❌ Incorrect
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
inputs:
|
|
21
|
+
token:
|
|
22
|
+
description: Token
|
|
23
|
+
runs:
|
|
24
|
+
using: composite
|
|
25
|
+
steps:
|
|
26
|
+
- run: echo hello
|
|
27
|
+
shell: bash
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## ✅ Correct
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
inputs:
|
|
34
|
+
token:
|
|
35
|
+
description: Token
|
|
36
|
+
runs:
|
|
37
|
+
using: composite
|
|
38
|
+
steps:
|
|
39
|
+
- run: echo "${{ inputs.token }}"
|
|
40
|
+
shell: bash
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
## Additional examples
|
|
45
|
+
|
|
46
|
+
For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.
|
|
47
|
+
|
|
48
|
+
## ESLint flat config example
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
import githubActions from "eslint-plugin-github-actions-2";
|
|
52
|
+
|
|
53
|
+
export default [
|
|
54
|
+
{
|
|
55
|
+
files: ["**/*.{yml,yaml}"],
|
|
56
|
+
plugins: {
|
|
57
|
+
"github-actions": githubActions,
|
|
58
|
+
},
|
|
59
|
+
rules: {
|
|
60
|
+
"github-actions/no-unused-input-in-composite": "error",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## When not to use it
|
|
67
|
+
|
|
68
|
+
You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.
|
|
69
|
+
## Further reading
|
|
70
|
+
|
|
71
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/metadata-syntax#inputs](https://docs.github.com/actions/reference/workflows-and-actions/metadata-syntax#inputs)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# no-write-all-permissions
|
|
2
|
+
|
|
3
|
+
> **Rule catalog ID:** R023
|
|
4
|
+
|
|
5
|
+
## Targeted pattern scope
|
|
6
|
+
|
|
7
|
+
GitHub Actions workflow YAML files that declare `permissions`.
|
|
8
|
+
|
|
9
|
+
## What this rule reports
|
|
10
|
+
|
|
11
|
+
This rule reports workflow-level or job-level `permissions: write-all` declarations.
|
|
12
|
+
|
|
13
|
+
## Why this rule exists
|
|
14
|
+
|
|
15
|
+
GitHub recommends granting the `GITHUB_TOKEN` the least access needed. The `write-all` shortcut grants every writable scope at once, which makes reviews harder and increases the blast radius of a compromised workflow or third-party action.
|
|
16
|
+
|
|
17
|
+
## ❌ Incorrect
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
permissions: write-all
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## ✅ Correct
|
|
24
|
+
|
|
25
|
+
```yaml
|
|
26
|
+
permissions:
|
|
27
|
+
contents: read
|
|
28
|
+
pull-requests: write
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## Additional examples
|
|
33
|
+
|
|
34
|
+
For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.
|
|
35
|
+
|
|
36
|
+
## ESLint flat config example
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
import githubActions from "eslint-plugin-github-actions-2";
|
|
40
|
+
|
|
41
|
+
export default [
|
|
42
|
+
{
|
|
43
|
+
files: ["**/*.{yml,yaml}"],
|
|
44
|
+
plugins: {
|
|
45
|
+
"github-actions": githubActions,
|
|
46
|
+
},
|
|
47
|
+
rules: {
|
|
48
|
+
"github-actions/no-write-all-permissions": "error",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
];
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## When not to use it
|
|
55
|
+
|
|
56
|
+
You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.
|
|
57
|
+
## Further reading
|
|
58
|
+
|
|
59
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#permissions](https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#permissions)
|
|
60
|
+
- [https://docs.github.com/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token](https://docs.github.com/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token)
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Rule overview
|
|
2
|
+
|
|
3
|
+
`eslint-plugin-github-actions-2` targets GitHub Actions workflow YAML files, action metadata files (`action.yml` / `action.yaml`), and workflow-template package files under `workflow-templates/`.
|
|
4
|
+
|
|
5
|
+
New to the plugin? Start with [Getting started](./getting-started.md). Need
|
|
6
|
+
config guidance? See the [preset reference](./presets/index.md). Looking for a
|
|
7
|
+
specific check? Jump to [Current rules](#current-rules).
|
|
8
|
+
|
|
9
|
+
## Included rule categories
|
|
10
|
+
|
|
11
|
+
- **Security**: explicit least-privilege permissions and immutable SHA pinning
|
|
12
|
+
- **Reliability**: bounded job timeouts
|
|
13
|
+
- **Operations**: workflow concurrency controls and valid concurrency expression contexts
|
|
14
|
+
- **Naming and readability**: workflow names, job IDs, job names, and step names
|
|
15
|
+
- **Execution clarity**: explicit run-step shells, typed workflow interfaces, canonical manual-dispatch input access, and valid step-context references
|
|
16
|
+
- **Workflow interface quality**: documented manual-dispatch and reusable workflow interfaces plus valid reusable output values and job-output mappings
|
|
17
|
+
- **Reusable workflow hygiene**: explicit checkout ordering, narrowly scoped secret passing, and valid reusable-workflow caller job keys
|
|
18
|
+
- **Workflow safety**: safer conditional secret handling, untrusted-script handling, scoped workflow chaining, safer privileged PR automation, fork-triggered self-hosted runner hardening, and scoped privileged PR targets
|
|
19
|
+
- **Trigger precision**: explicit activity-type scoping for broad multi-activity events and merge-queue-aware pull request validation
|
|
20
|
+
|
|
21
|
+
## Current rules
|
|
22
|
+
|
|
23
|
+
- [`require-workflow-permissions`](./require-workflow-permissions.md)
|
|
24
|
+
- [`require-job-timeout-minutes`](./require-job-timeout-minutes.md)
|
|
25
|
+
- [`pin-action-shas`](./pin-action-shas.md)
|
|
26
|
+
- [`require-workflow-concurrency`](./require-workflow-concurrency.md)
|
|
27
|
+
- [`action-name-casing`](./action-name-casing.md)
|
|
28
|
+
- [`job-id-casing`](./job-id-casing.md)
|
|
29
|
+
- [`max-jobs-per-action`](./max-jobs-per-action.md)
|
|
30
|
+
- [`no-case-insensitive-input-id-collision`](./no-case-insensitive-input-id-collision.md)
|
|
31
|
+
- [`no-composite-input-env-access`](./no-composite-input-env-access.md)
|
|
32
|
+
- [`no-deprecated-node-runtime`](./no-deprecated-node-runtime.md)
|
|
33
|
+
- [`no-duplicate-composite-step-id`](./no-duplicate-composite-step-id.md)
|
|
34
|
+
- [`no-empty-template-file-pattern`](./no-empty-template-file-pattern.md)
|
|
35
|
+
- [`no-external-job`](./no-external-job.md)
|
|
36
|
+
- [`no-hardcoded-default-branch-in-template`](./no-hardcoded-default-branch-in-template.md)
|
|
37
|
+
- [`no-icon-file-extension-in-template-icon-name`](./no-icon-file-extension-in-template-icon-name.md)
|
|
38
|
+
- [`no-inherit-secrets`](./no-inherit-secrets.md)
|
|
39
|
+
- [`no-invalid-concurrency-context`](./no-invalid-concurrency-context.md)
|
|
40
|
+
- [`no-invalid-key`](./no-invalid-key.md)
|
|
41
|
+
- [`no-invalid-reusable-workflow-job-key`](./no-invalid-reusable-workflow-job-key.md)
|
|
42
|
+
- [`no-invalid-template-file-pattern-regex`](./no-invalid-template-file-pattern-regex.md)
|
|
43
|
+
- [`no-invalid-workflow-call-output-value`](./no-invalid-workflow-call-output-value.md)
|
|
44
|
+
- [`no-path-separators-in-template-icon-name`](./no-path-separators-in-template-icon-name.md)
|
|
45
|
+
- [`no-post-if-without-post`](./no-post-if-without-post.md)
|
|
46
|
+
- [`no-pr-head-checkout-in-pull-request-target`](./no-pr-head-checkout-in-pull-request-target.md)
|
|
47
|
+
- [`no-pre-if-without-pre`](./no-pre-if-without-pre.md)
|
|
48
|
+
- [`no-required-input-with-default`](./no-required-input-with-default.md)
|
|
49
|
+
- [`no-secrets-in-if`](./no-secrets-in-if.md)
|
|
50
|
+
- [`no-self-hosted-runner-on-fork-pr-events`](./no-self-hosted-runner-on-fork-pr-events.md)
|
|
51
|
+
- [`no-subdirectory-template-file-pattern`](./no-subdirectory-template-file-pattern.md)
|
|
52
|
+
- [`no-template-placeholder-in-non-template-workflow`](./no-template-placeholder-in-non-template-workflow.md)
|
|
53
|
+
- [`no-top-level-env`](./no-top-level-env.md)
|
|
54
|
+
- [`no-top-level-permissions`](./no-top-level-permissions.md)
|
|
55
|
+
- [`no-universal-template-file-pattern`](./no-universal-template-file-pattern.md)
|
|
56
|
+
- [`no-unknown-input-reference-in-composite`](./no-unknown-input-reference-in-composite.md)
|
|
57
|
+
- [`no-unknown-job-output-reference`](./no-unknown-job-output-reference.md)
|
|
58
|
+
- [`no-unknown-step-reference`](./no-unknown-step-reference.md)
|
|
59
|
+
- [`no-unused-input-in-composite`](./no-unused-input-in-composite.md)
|
|
60
|
+
- [`no-untrusted-input-in-run`](./no-untrusted-input-in-run.md)
|
|
61
|
+
- [`no-write-all-permissions`](./no-write-all-permissions.md)
|
|
62
|
+
- [`prefer-fail-fast`](./prefer-fail-fast.md)
|
|
63
|
+
- [`prefer-action-yml`](./prefer-action-yml.md)
|
|
64
|
+
- [`prefer-file-extension`](./prefer-file-extension.md)
|
|
65
|
+
- [`prefer-inputs-context`](./prefer-inputs-context.md)
|
|
66
|
+
- [`prefer-step-uses-style`](./prefer-step-uses-style.md)
|
|
67
|
+
- [`prefer-template-yml-extension`](./prefer-template-yml-extension.md)
|
|
68
|
+
- [`require-action-name`](./require-action-name.md)
|
|
69
|
+
- [`require-action-run-name`](./require-action-run-name.md)
|
|
70
|
+
- [`require-checkout-before-local-action`](./require-checkout-before-local-action.md)
|
|
71
|
+
- [`require-composite-step-name`](./require-composite-step-name.md)
|
|
72
|
+
- [`require-job-name`](./require-job-name.md)
|
|
73
|
+
- [`require-job-step-name`](./require-job-step-name.md)
|
|
74
|
+
- [`require-merge-group-trigger`](./require-merge-group-trigger.md)
|
|
75
|
+
- [`require-pull-request-target-branches`](./require-pull-request-target-branches.md)
|
|
76
|
+
- [`require-run-step-shell`](./require-run-step-shell.md)
|
|
77
|
+
- [`require-template-categories`](./require-template-categories.md)
|
|
78
|
+
- [`require-template-file-patterns`](./require-template-file-patterns.md)
|
|
79
|
+
- [`require-template-icon-file-exists`](./require-template-icon-file-exists.md)
|
|
80
|
+
- [`require-template-icon-name`](./require-template-icon-name.md)
|
|
81
|
+
- [`require-template-workflow-name`](./require-template-workflow-name.md)
|
|
82
|
+
- [`require-trigger-types`](./require-trigger-types.md)
|
|
83
|
+
- [`require-workflow-call-input-type`](./require-workflow-call-input-type.md)
|
|
84
|
+
- [`require-workflow-call-output-value`](./require-workflow-call-output-value.md)
|
|
85
|
+
- [`require-workflow-dispatch-input-type`](./require-workflow-dispatch-input-type.md)
|
|
86
|
+
- [`require-workflow-interface-description`](./require-workflow-interface-description.md)
|
|
87
|
+
- [`require-workflow-run-branches`](./require-workflow-run-branches.md)
|
|
88
|
+
- [`require-workflow-template-pair`](./require-workflow-template-pair.md)
|
|
89
|
+
- [`require-workflow-template-properties-pair`](./require-workflow-template-properties-pair.md)
|
|
90
|
+
- [`valid-timeout-minutes`](./valid-timeout-minutes.md)
|
|
91
|
+
- [`valid-trigger-events`](./valid-trigger-events.md)
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# pin-action-shas
|
|
2
|
+
|
|
3
|
+
> **Rule catalog ID:** R003
|
|
4
|
+
|
|
5
|
+
## Targeted pattern scope
|
|
6
|
+
|
|
7
|
+
External step-level `uses:` actions and reusable workflow references.
|
|
8
|
+
|
|
9
|
+
## What this rule reports
|
|
10
|
+
|
|
11
|
+
This rule reports third-party `uses:` references that pin to mutable tags or branches instead of a full 40-character commit SHA.
|
|
12
|
+
|
|
13
|
+
## Why this rule exists
|
|
14
|
+
|
|
15
|
+
GitHub recommends pinning actions and reusable workflows to immutable SHAs because tags and branches can be retargeted after review.
|
|
16
|
+
|
|
17
|
+
## ❌ Incorrect
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```yaml
|
|
25
|
+
uses: owner/repo/.github/workflows/reuse.yml@main
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## ✅ Correct
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## Additional examples
|
|
37
|
+
|
|
38
|
+
For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.
|
|
39
|
+
|
|
40
|
+
## ESLint flat config example
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
import githubActions from "eslint-plugin-github-actions-2";
|
|
44
|
+
|
|
45
|
+
export default [
|
|
46
|
+
{
|
|
47
|
+
files: ["**/*.{yml,yaml}"],
|
|
48
|
+
plugins: {
|
|
49
|
+
"github-actions": githubActions,
|
|
50
|
+
},
|
|
51
|
+
rules: {
|
|
52
|
+
"github-actions/pin-action-shas": "error",
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## When not to use it
|
|
59
|
+
|
|
60
|
+
You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.
|
|
61
|
+
## Further reading
|
|
62
|
+
|
|
63
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepsuses](https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepsuses)
|
|
64
|
+
- [https://docs.github.com/actions/using-workflows/reusing-workflows](https://docs.github.com/actions/using-workflows/reusing-workflows)
|
|
65
|
+
- [https://docs.github.com/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions](https://docs.github.com/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions)
|