Skip to content

✨ feat(mq-lang,mq-run): add --allow-read runtime flag for filesystem reads#2007

Merged
harehare merged 1 commit into
mainfrom
feat/allow-read-flag
Jul 13, 2026
Merged

✨ feat(mq-lang,mq-run): add --allow-read runtime flag for filesystem reads#2007
harehare merged 1 commit into
mainfrom
feat/allow-read-flag

Conversation

@harehare

Copy link
Copy Markdown
Owner

Summary

read_file/read_file_bytes were only gated by the compile-time file-io Cargo feature, unlike http()/write_file which also require an explicit runtime opt-in (--allow-net/--allow-write). This let a third-party module fetched via HTTP import silently read local files. Add a process-wide READ_ALLOWED flag (capability::set_allow_read/is_read_allowed) and the --allow-read CLI flag to close that gap, matching the existing pattern.

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • ♻️ Refactor
  • 📝 Documentation
  • ⚡ Performance
  • ✅ Test
  • 📦 Build / dependencies
  • 👷 CI

Checklist

  • I ran cargo fmt and cargo clippy and addressed any warnings
  • I ran just test-all and all tests pass
  • I added or updated tests covering this change
  • I updated relevant documentation (/docs, crate README.md) if needed
  • I added a changelog entry if this is a user-facing change

Additional Context

…reads

read_file/read_file_bytes were only gated by the compile-time file-io
Cargo feature, unlike http()/write_file which also require an explicit
runtime opt-in (--allow-net/--allow-write). This let a third-party module
fetched via HTTP import silently read local files. Add a process-wide
READ_ALLOWED flag (capability::set_allow_read/is_read_allowed) and the
--allow-read CLI flag to close that gap, matching the existing pattern.
@codspeed-hq

codspeed-hq Bot commented Jul 13, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing feat/allow-read-flag (28708ac) with main (0e6922d)

Open in CodSpeed

@harehare harehare merged commit 7176a29 into main Jul 13, 2026
11 checks passed
@harehare harehare deleted the feat/allow-read-flag branch July 13, 2026 14:15
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