Skip to content

fix(magic.lambda.io): require pins for file read slots and block /data reads - #478

Merged
polterguy merged 5 commits into
masterfrom
fix/io-pin-required-reads
Dec 6, 2026
Merged

polterguy merged 5 commits into
masterfrom
fix/io-pin-required-reads

Conversation

@polterguy

Copy link
Copy Markdown
Owner

Summary

Hardens sandbox file access in two ways, plus a small email-text correction.

magic.lambda.io: pin-required read slots and blocked /data/**

  • Utilities.IsRestricted now treats both config/ and data/ as restricted folders, so
    [whitelist]-scoped code can never read from /data/** (previously only config/ was blocked).
  • All 12 file/folder reading and listing slots now declare PinRequired = true:
    load-file, io.file.load, io.file.load.binary, io.file.load-recursively,
    io.stream.open-file, io.file.exists, io.file.list, io.file.list-recursively,
    io.file.search, io.folder.exists, io.folder.list, io.folder.list-recursively.
    A vocabulary entry for one of them without a concrete pin (or with a wildcard-only pin) is
    refused when the whitelist is constructed, before anything runs.
  • save-file now declares Whitelistable = false, joining every other save/write slot.

Generator wizard

  • The Files wizard requires a folder and pins every granted slot to it (the backend refuses
    unpinned file reads).
  • Generation is blocked while any pin-required reading slot is granted without a pin.

Email

  • The reset-password email no longer claims the link "works once", which it does not.

Tests

  • magic.lambda.io.tests: 285/285 (new PinRequiredTests + data-folder coverage)
  • magic.signals.tests: 82/82
  • Frontend vitest: 2828/2828
  • ESLint (--max-warnings 0) and Prettier check: clean

@sonarqubecloud

sonarqubecloud Bot commented Dec 6, 2026

Copy link
Copy Markdown

@polterguy
polterguy merged commit e3be5b1 into master Dec 6, 2026
9 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.

1 participant