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

check shell scripts in github action using shellcheck #53

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

erno
Copy link
Collaborator

@erno erno commented Oct 4, 2022

No description provided.

steps:
- uses: actions/checkout@v2
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pin the exact version of this third party ludeeus/action-shellcheck action with SHA. It would look like this for the current head:

uses: ludeeus/action-shellcheck@b2bbefc2e6b9dcbc6355b85e366c9e55bf8d57e1

See more at: https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I hadn't realized that a push triggerd workflow will have a write-access capable GITHUB_TOKEN and a compromised lint action could write to the repo. Good catch.

@@ -0,0 +1,16 @@
on:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you could say on: push to trigger workflow on any push to any branch. Thus perhaps the qualifier * for branches is not needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants