Skip to content

Ensure resource files are readable, not executable#1015

Merged
chrisvire merged 1 commit into
sillsdev:mainfrom
chrisvire:fix/static-file-permission
Jun 18, 2026
Merged

Ensure resource files are readable, not executable#1015
chrisvire merged 1 commit into
sillsdev:mainfrom
chrisvire:fix/static-file-permission

Conversation

@chrisvire

@chrisvire chrisvire commented Jun 18, 2026

Copy link
Copy Markdown
Member
  • We had a project where the icons were executable (0o700). The manifest referenced the icons. The web server refused to serve the executable files due to security rules. The app was not installable.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed file permission handling for generated assets to ensure proper accessibility and security.

- We had a project where the icons were executable (0o700). The
  manifest referenced the icons. The web server refused to serve
  the executable files due to security rules. The app was not
  installable.
@chrisvire chrisvire requested a review from FyreByrd June 18, 2026 13:22
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f2282174-453a-4fd5-be76-927d24f0d259

📥 Commits

Reviewing files that changed from the base of the PR and between 59640a4 and ad9ed4e.

📒 Files selected for processing (1)
  • convert/fileUtils.ts

📝 Walkthrough

Walkthrough

convert/fileUtils.ts adds chmodSync to its fs import and calls chmodSync(dest, 0o644) immediately after copyFileSync inside createHashedFile, explicitly setting copied static assets to world-readable, non-executable permissions.

Changes

File Permission Fix

Layer / File(s) Summary
Import chmodSync and apply 0o644 after file copy
convert/fileUtils.ts
Expands the fs import to include chmodSync, then calls chmodSync(dest, 0o644) after copyFileSync in createHashedFile to enforce read-only, non-executable permissions on the hashed destination file.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A bunny hops through static files with care,
"No execute bits!" it thumps with flair.
0o644 — just right to read,
chmod'd and cozy, planted like a seed.
🐇✨ Safe assets bloom everywhere!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: setting resource files to readable (0o644) and not executable permissions, which directly addresses the PR objective of fixing the file permission issue affecting app installability.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chrisvire chrisvire merged commit 1bd48dc into sillsdev:main Jun 18, 2026
4 checks passed
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