chore(deps): update dependency pinact to v4#5
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.10.1→4.0.0Release Notes
suzuki-shunsuke/pinact (pinact)
v4.0.0Compare Source
#1540 Removed the
-reviewoptionOutput SARIF and pass it to reviewdog. This has been announced previously.
pinact run -format sarif | reviewdog -f sarif -name pinact -reporter github-pr-review#1540 Always output diff
Even if you specify
-diff=false, it is ignored.#1540
-diffand-checkare now aliases for-fix=falseThis simplifies the logic, making it easier to understand and less prone to bugs.
#1540
-verifyis now an alias for--verify-comment-verifywas unclear about what was being verified, so it has been renamed for clarity.However,
-verifyis kept as-is to maintain backward compatibility.#1458 #1558 Version comments are now required @ManuelLerchnerQC
For SHAs without a version comment, pinact automatically adds a version comment (validation error if
-fix=false).Specifying a version comment makes it easier to see which version is being used, and makes it easier for tools like Renovate and Dependabot to update.
It also has security implications.
For GitHub Actions versions, you can also specify the SHA of a commit in a fork.
This means it could point to a malicious commit in a fork.
If you specify only the SHA without a version comment, you cannot tell whether it is the SHA of a commit in a fork.
By requiring version comments, you can verify that the version comment matches the SHA using the
--verify-commentoption.Even if a fake version comment is added to a fork's SHA, it can be detected by
--verify-comment.An attacker could also create a tag pointing to a fork's SHA, but creating a tag requires write permission, which raises the bar for attacks, so this can be said to improve security.
Of course, this is only meaningful if you verify with
--verify-comment, so it is recommended to run pinact with--verify-commentin CI.Features
#1540
-no-api: support for offline validation#1540 You can now check whether the version being used satisfies min age, not just newer versions
#1540 More flexible min age support via
rules#1540 #1542 #1543 Support for a global configuration file
#1435 Automatic correction of version comments via
-verify-comment@ManuelLerchnerQC#1547 #1552 #1557 #1562
-diff-file: limit pinact's targets to only the changed lines-no-api: support for offline validationIf you just want to check whether something is pinned, you don't really need to use the GitHub API, but previously the GitHub API was called.
With the
-no-apioption, you can validate without calling the GitHub API.However, since API calls are currently essential for fixing code (this may change in the future if caching is supported), you need to specify either
-fix=falseor-format sarif.Implicitly treating it as
-fix=falsecould cause behavior to change and become a breaking change when caching is supported, so it must currently be specified explicitly.You can now check whether the version being used satisfies min age, not just newer versions
For example, you can run it in CI against modified lines to check whether any dangerous versions that do not satisfy min age are being used.
This is not checked by default, but is checked when you run
pinact run --verify-min-ageorpinact run -min-age <min age>.More flexible min age support via
rulesmin age can now be configured in the configuration file.
Additionally, by using
rules, you can apply settings such as min age to specific actions.For rules, conditions are evaluated per rule, and the settings are applied if matched.
You can write multiple conditions, and the settings are applied if any one of the conditions matches.
exprfollows https://expr-lang.org/docs/language-definition. Please read the documentation for details.The settings of rules listed later in
rulestake precedence.Support for a global configuration file
A global configuration file is now supported.
The file path is searched in the following order of priority:
$PINACT_GLOBAL_CONFIG${XDG_CONFIG_HOME}/pinact/pinact.yaml${HOME}/.config/pinact/pinact.yamlOn Windows:
$PINACT_GLOBAL_CONFIG%APPDATA%\pinact\pinact.yamlrules are prepended before the rules in the project configuration file.
So project settings take precedence over global settings.
Automatic correction of version comments via
-verify-commentIf the SHA and the version comment do not match, the version comment is automatically corrected to match the SHA.
Previously, it would just return an error, but now it is automatically corrected.
-diff-file: limit pinact's targets to only the changed linesIf you specify a file in Unified Diff Format via
-diff-file, you can limit pinact's targets to only the changed lines.By passing the PR's diff file in PR CI, you can reduce unnecessary API calls and prevent corrections or errors from code unrelated to the PR's changes.
This makes it easier to introduce pinact via Required Workflow across an entire GitHub Organization of a large development organization.
To improve the overall health of a development organization, it is desirable to introduce pinact via Required Workflow.
However, if you suddenly introduce pinact as a Required Workflow in an Organization that has a lot of originally unpinned code, errors and corrections unrelated to the PR's changes will occur everywhere, causing confusion.
When errors occur in places unrelated to the PR's changes, the PR author thinks "what is this error?", "wait, do I have to fix this? It's unrelated to this PR so I want to split the PR, but creating a PR is a hassle."
It is also possible that the same error occurs in multiple PRs, and each one independently performs redundant fixing work.
Inquiries about errors come in from various teams, generating unnecessary costs.
If you try to fix everything before introducing the Required Workflow, it takes time to introduce, and during that time the bad situation continues where new unpinned code keeps increasing.
On the other hand, if you can fix and validate only the lines changed in a PR, the PR author can more easily accept making the fix, and there is no need to split the PR.
However, this alone does not pin existing code, so in parallel with this, you still need to run pinact against each repository and create PRs.
How do you generate the file specified by
-diff-file? You can easily generate it using the action https://github.com/suzuki-shunsuke/pr-unified-diff-action.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.