Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The example megalinter workflow should use sha pinned actions #3057

Closed
daltonv opened this issue Nov 1, 2023 · 2 comments
Closed

The example megalinter workflow should use sha pinned actions #3057

daltonv opened this issue Nov 1, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@daltonv
Copy link
Contributor

daltonv commented Nov 1, 2023

Currently the example mega-linter.yml does not pin third part actions to shas

For example

- name: Commit and push applied linter fixes
   uses: stefanzweifel/git-auto-commit-action@v4

Instead of

uses: stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a # v4 

Since megalinter now includes v1.78 of the kics linter (as of megalinter v7.4.0)
and kics treats unpinned third-party actions as failures, megalinter should play by its own rules and tell users to pin to shas.

This advice even comes from github's own documentation

@daltonv daltonv added the bug Something isn't working label Nov 1, 2023
@daltonv daltonv changed the title The example megalinter workflow should used sha pinned actions The example megalinter workflow should use sha pinned actions Nov 1, 2023
@nvuillam
Copy link
Member

nvuillam commented Nov 1, 2023

Kics is very chatty and kind of slow... for example I disabled it on own MegaLinter repo ;)

MegaLinter is a tool, but its users own the strategy to use it... I agree that pinning a sha on Github Actions is a good practice, but it's less readable, and I prefer MegaLinter to remain as simple as possible for newbies ^^

So users are free to update versions to shas, but I prefer not to enforce it in default workflows :)

@daltonv
Copy link
Contributor Author

daltonv commented Nov 2, 2023

Fair enough. Good to understand the philosophy behind it.

@daltonv daltonv closed this as completed Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants