Skip to content

ci: add emojis to workflow names and improve their security #4693

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

okineadev
Copy link
Contributor

Description

I improved the security of workflows by restricting permissions and credentials, before running zizmor to check for problems

I also added emojis to the workflow names because they make navigation much better and it's easier to understand what they do


Tip

The author of this PR can publish a preview release by commenting /publish below.

@brc-dd
Copy link
Member

brc-dd commented Apr 15, 2025

I'm not in favor of the emojis. It looks cool and all but feels like overdoing it in CI runs.

permissions in cr.yml aren't needed. It should be kept {}

cache-dependency-path isn't needed. It's automatically inferred by the action.

release-tag.yml doesn't need write access to issues or PRs.

persist-credentials in release-tag.yml should be false most likely.

.github/contributing.md should be kept at its original place. There is no need to keep it outside.

@brc-dd brc-dd added the needs author action The PR is not ready yet label Apr 15, 2025
@okineadev
Copy link
Contributor Author

persist-credentials in release-tag.yml should be false most likely.

Then if I'm not mistaken, there will be no permissions at all

.github/contributing.md should be kept at its original place. There is no need to keep it outside.

No, it's better to have it in the root of the project, that's how it's done everywhere

Is there any reason to store this file in the .github folder?

@brc-dd
Copy link
Member

brc-dd commented Apr 16, 2025

Is there any reason to store this file in the .github folder?

To avoid cluttering the main view.

No, it's better to have it in the root of the project, that's how it's done everywhere

GitHub allows storing it at .github, docs, and root (in decreasing precendence) - https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors. There is no best practice here. It's a matter of opinion.

Then if I'm not mistaken, there will be no permissions at all

It doesn't need any permission except to create a release. It probably doesn't even need the checkout step.

@okineadev
Copy link
Contributor Author

Is there any reason to store this file in the .github folder?

To avoid cluttering the main view.

No, it's better to have it in the root of the project, that's how it's done everywhere

GitHub allows storing it at .github, docs, and root (in decreasing precendence) - docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors. There is no best practice here. It's a matter of opinion.

Then if I'm not mistaken, there will be no permissions at all

It doesn't need any permission except to create a release. It probably doesn't even need the checkout step.

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs author action The PR is not ready yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants