Skip to content

Add CI workflow to check for unintended executable permissions in scripts #67

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 1 commit into
base: main
Choose a base branch
from

Conversation

smuppand
Copy link
Contributor

@smuppand smuppand commented Jun 4, 2025

This PR introduces a GitHub Actions workflow: check-executable-permissions.yml, which scans all tracked files in pull requests to ensure only expected files have executable (+x) permissions.

🔒 Why this is useful:

Prevents accidental commits with chmod +x on README.md, docs, or config files.

Enforces consistent permissions across the repository.

Avoids noisy diffs and review confusion caused by file mode changes.

✅ Allowlisted files (example):

run.sh

Any known executable under scripts/ or utils/

You can update the allowlist inside the workflow file if needed.

@mwasilew @vnarapar 

…file modes

Adds a GitHub Actions workflow to validate that only explicitly intended files (like run.sh or executable binaries) have executable permissions.
This helps prevent accidental commits of files with incorrect modes (e.g., *.md, *.txt marked as executable).

The check runs on each PR and fails the job if any suspicious file permission is detected, improving repo hygiene and review quality.

Exemptions (e.g., run.sh) can be controlled by editing the allowlist.

Signed-off-by: Srikanth Muppandam <[email protected]>
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.

1 participant