Skip to content

Conversation

@DhavalGojiya
Copy link
Owner

Description

Update GitHub Actions workflows based on Zizmor security reports.

Command:
uvx zizmor .github/

@DhavalGojiya
Copy link
Owner Author

CC: @cclauss

So I intentionally made pre-commit fail because I wanted to see how:

- uses: pre-commit-ci/[email protected]
   if: always()

behaves. Do you know why it didn't create a new commit on this PR to fix the whitespace issue?
If this action does not create any type of commit, then we can simply remove it from the workflow entirely.

@cclauss
Copy link
Contributor

cclauss commented Dec 3, 2025

I gotta say that I am not a fan so far. This tool generated a lot of busy work on other repos for fixes that were not really helpful.

I am unsure on pre-commit-ci/lite-action because I always use https://pre-commit.ci instead.

@DhavalGojiya
Copy link
Owner Author

I gotta say that I am not a fan so far. This tool generated a lot of busy work on other repos for fixes that were not really helpful.

I am unsure on pre-commit-ci/lite-action because I always use https://pre-commit.ci instead.

True. Let me remove this one.

Comment on lines +15 to +16
permissions:
contents: read
Copy link
Contributor

Choose a reason for hiding this comment

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

This might be why pre-commit-ci/lite-action cannot write a commit.

Copy link
Owner Author

Choose a reason for hiding this comment

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

But the pre-commit lite action is defined inside .github/workflows/ci-test.yml,
and the job where it's defined already has all the required permissions.

I think I haven't configured the pre-commit lite CI bot in this repo.
That's probably the reason. Anyway, I'm going to remove this job.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh...

Make the whitespace change to a non-GitHub Actions file. I think that GitHub Actions cannot write to a GHA file.

trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing .github/workflows/ci-test.yml

biome check..............................................................Passed

Copy link
Owner Author

Choose a reason for hiding this comment

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

Not working with the action.yml whitespace issue either.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Let's do a final test. I just added the pre-commit CI lite bot to this repo.

Copy link
Owner Author

Choose a reason for hiding this comment

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

boom.
Working after pre-commit CI lite bot added to this repo.

@DhavalGojiya DhavalGojiya force-pushed the fix/gh-zizmor-security-alert branch from 64e597a to 0fbd284 Compare December 5, 2025 09:26
@DhavalGojiya DhavalGojiya merged commit 4a2f704 into main Dec 5, 2025
4 checks passed
@DhavalGojiya DhavalGojiya deleted the fix/gh-zizmor-security-alert branch December 5, 2025 09:30
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