GitHub Actions rules
tx0 checks GitHub Actions workflows with 21 rules, 5 of them in the default tier. Files that say a tool generated them are skipped. Each rule's page explains what it finds and what it leaves alone.
Default: 5 rules
Bugs and security problems with measured precision. They run without a tx0.toml.
-
tx0/actions:condition-always-truedefaultAn
if:mixes${{ }}with other text, which makes it a non-empty string that is always true -
tx0/actions:disabled-workflow-commanddefaultA script uses the
set-envoradd-pathworkflow command, which GitHub disabled -
tx0/actions:duplicate-step-iddefaultTwo steps of a job have the same id
-
tx0/actions:script-injectiondefaultA script interpolates text that the author of an issue, pull request or commit controls
-
tx0/actions:unknown-needsdefaultA job needs a job that the workflow does not define
Recommended: 10 rules
Likely bugs, resource and performance problems.
-
tx0/actions:action-on-branchrecommendedA workflow runs an action from a branch such as
main, which changes with every push -
tx0/actions:docker-action-floating-tagrecommendedA step runs a container image by its
latesttag or by no tag -
tx0/actions:input-injectionrecommendedA step of a composite action interpolates an input into its script
-
tx0/actions:privileged-checkout-of-pull-requestrecommendedA workflow triggered with the base repository's rights checks out the code of a pull request
-
tx0/actions:remote-script-into-shellrecommendedA script pipes a download straight into a shell
-
tx0/actions:secret-printedrecommendedA script prints a secret to the log
-
tx0/actions:self-hosted-runner-on-pull-requestsrecommendedA job runs pull request code on a self-hosted runner, which keeps state between jobs
-
tx0/actions:unpinned-actionrecommendedA workflow runs a third-party action by a tag or branch, which its owner can move to other code
-
tx0/actions:unsecure-commands-allowedrecommendedA workflow turns the disabled
set-envandadd-pathcommands back on -
tx0/actions:write-all-permissionsrecommendedA workflow or job grants its token write access to everything
Strict: 6 rules
Code that can be written more plainly.
-
tx0/actions:checkout-persists-credentialsstrictActions/checkout leaves the job's token in the repository's git configuration
-
tx0/actions:continue-on-errorstrictA job or step continues when it fails, so its failure does not fail the workflow
-
tx0/actions:deprecated-workflow-commandstrictA script uses the deprecated
set-outputorsave-stateworkflow command -
tx0/actions:missing-permissionsstrictA workflow does not set the permissions of its token, so it gets the repository's default
-
tx0/actions:missing-timeoutstrictA job sets no timeout, so a hung job runs for six hours
-
tx0/actions:secrets-inheritstrictA job passes every secret of the repository to a reusable workflow