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

fix: evaluated GitHub actions workflow files #268

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

mhmohona
Copy link
Contributor

Description

  • Updated GitHub Actions workflow to pass potentially untrusted data through environment variables as per GitHub's security hardening guidelines.
  • Ensured that titles used in email notifications are now set via environment variables to prevent script injection attacks.

Related issue(s)

#257

@mhmohona mhmohona changed the title Evaluateed github ations workflow files fix: Evaluateed github ations workflow files Jan 14, 2024
@mhmohona mhmohona changed the title fix: Evaluateed github ations workflow files fix: Evaluated GitHub actions workflow files Jan 14, 2024
@mhmohona mhmohona changed the title fix: Evaluated GitHub actions workflow files fix: evaluated GitHub actions workflow files Jan 14, 2024
@mhmohona mhmohona requested a review from KhudaDad414 January 16, 2024 11:07
@mhmohona
Copy link
Contributor Author

I have a concern on it.

After running the actionlit for this repo it was the output -
image

For first 2 errors, when I tested the scripts in https://rhysd.github.io/actionlint/, it didnt catch them.

If i address them, then both from actionlit online site and IDE I get error.

Should I address 1st 2 errors then? Or probably its a bug. :3

@mhmohona mhmohona requested a review from KhudaDad414 January 17, 2024 13:04
Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

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

Amazing initiative, thanks!!!

Can you refactor to not download linter binary but use a dedicated github action

https://github.com/raven-actions/actionlint

?

@derberg
Copy link
Member

derberg commented Mar 27, 2024

@mhmohona do you plan to continue with this one?

@derberg
Copy link
Member

derberg commented Apr 30, 2024

@mhmohona do you plan to continue with this one or should we ask community to continue?

@mhmohona mhmohona requested a review from derberg May 8, 2024 03:13
Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

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

will you address the linter issues that are now shown in PR?

with:
script: |
const sendEmail = require('./.github/workflows/scripts/mailchimp/index.js');
sendEmail('${{github.event.comment.html_url}}', '${{github.event.discussion.title}}');
sendEmail('${{github.event.comment.html_url}}', process.env.DISCUSSION_TITLE);
Copy link
Member

Choose a reason for hiding this comment

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

do you modify it because the linter complained?

I wonder then why github.event.comment.html_url did not have to be refactored as well 🤔

@@ -14,59 +14,5 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v2
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Check workflow files
uses: raven-actions/actionlint@v1
Copy link
Member

Choose a reason for hiding this comment

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

please do not use directly v1 when action is not official, from github, but commit id (in your other PR you do it, so you have example there)

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.

3 participants