Repository navigation
Ignore untrusted project device trust; allowlist permission merge (O56) - #74
Merged
Merged
Conversation
…ion merge (O56) Untrusted folders drop project permissions.deviceTrust and permissions.trustedDevices. mergePermissionsConfig no longer spreads the project block: every PermissionsConfig field is handled explicitly and a project may only tighten the user (deviceTrust full never comes from a project; trustedDevices is intersected with the user's list).
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements backlog O56. Depends on #69 (based on its head
5e91afae; diff vs main will shrink once #69 merges).Problem
In an untrusted folder, project
.moss/config.jsonpermissions.deviceTrust: 'full'andpermissions.trustedDevicespassed throughmergePermissionsConfig(which spread...project), opening the device-trust gate.Fix: allowlist merge — every
PermissionsConfigfieldmergePermissionsConfigno longer spreads the project; it builds the result from an explicit table checked withsatisfies Record<keyof PermissionsConfig, unknown>, so a new field fails the build until it is handled. Unknown project keys are dropped.defaultModedroppedProjectPermissions)allowaskdenydeviceTrustfullnever applies; projectgatedtightens userfulltrustedDevicesNo changes under
src/safety.Note for review: trusted-folder
defaultModewhen the user has none set still takes the project value (pre-existing behaviour, not changed here).trustedToolsunion is handled separately in the O55 PR stacked on this one.Tests
test/o56-untrusted-permissions.spec.mjs(adapted from QA reproqa-repro-o54-o56.spec.mjs, plus trusted-folder and allowlist cases), 10 cases.5e91afae(src reverted, rebuilt): 7 FAIL (both QA O56 cases, recording, trusted deviceTrust ×2, trusted trustedDevices, allowlist); 3 PASS (O54 anti-regression ×2, gated-tightens).npm run verifyon macOS, Node 25.9, allMOSS_*/*_API_KEYunset, pyte layout ran ([tui-layout] 74/74 passed): exit 0.Supersedes #70 (rebased onto b8a4e4b).