-
Notifications
You must be signed in to change notification settings - Fork 46
fix(security): merge vault channel_metadata by spread, not Object.assign (#879) #880
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
scottschreckengaust
wants to merge
5
commits into
main
Choose a base branch
from
fix/879-insecure-object-assign
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+94
−15
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
3c64ae3
fix(security): merge vault channel_metadata by spread, not Object.ass…
scottschreckengaust 1e7dcfd
Merge remote-tracking branch 'origin/main' into fix/879-insecure-obje…
scottschreckengaust 37a79bf
fix(cdk): drop the dead workspace-id write and correct the stale guar…
scottschreckengaust d4ec661
test(cdk): close two holes in the vault-metadata source guards (#880 …
scottschreckengaust a382fca
Merge branch 'main' into fix/879-insecure-object-assign
scottschreckengaust File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified the one way this could have gone wrong: the rebind strands nothing.
channelMetadatais only ever written by keyed assignment (867, 870, 912, 913, 942), is never passed or closed over before this point, and its first read is line 1030 with the hand-off tocreateTaskCoreat 1418 — both after the rebind, so the identity change is unobservable.One consequence worth folding in: with the spread here, line 942 (
channelMetadata.linear_workspace_id = workspaceId;) is dead — line 861's literal already set that key to the same value. The description flags it as pre-existing and leaves it for reviewability, which is fair, but it is one deletion in the same PR versus a follow-up later.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted in 37a79bf.
You framed the check correctly, so I did it the same way — enumerate every writer of the key rather than read the happy path.
linear_workspace_idis written once in the object literal (now line 864) fromworkspaceId, andvaultMetadataemits onlylinear_credential_providerandlinear_workspace_subject, so neither the oldObject.assignnor the new spread ever touched the key. Nothing reassignsworkspaceIdin between, so the deleted statement could only ever re-set the value it already had — dead before this PR as well as after, which is what the description said.Agreed on the trade: one deletion in the same PR beats a follow-up nobody files. It sits three lines from the code this PR is already changing, so a reviewer reading the rebind has the whole
channelMetadatawrite-set in view either way.