Security fix: calendar event visibility - #116
Merged
Merged
Conversation
Calendar events that Chronicle limits to some players no longer become notes every player in Foundry can read. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018uKa2E5HNdeubwBSD9Jn4n
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.
Requested by Key Maker · project thread
Fixes: none
Security implication: security fix; calendar events Chronicle limits to some players are no longer shown to every player in Foundry.
Consumer-verified: Chronicle serves
visibility(everyone/gm-only) andvisibility_rules(JSON string,allowed_users/denied_users) on events:internal/plugins/syncapi/calendar_api_handler.go(eventForWire),internal/plugins/calendar/model.go(VisibilityRules,Allows: an empty allow-list means everyone).Foundry compatibility: not run in a live world; pure helper tested in Node, call sites syntax-checked.
Mockup: n/a
What this changes
isChronicleEventPublic(event)inscripts/calendar-sync.mjsdecides whether a Chronicle event may be shown to all players. GM-only events andeveryoneevents carrying player restrictions are not public; unknown or unreadable values fail closed.Why
Found during the Foundry sync review (keyxmakerx/Chronicle#907). Security fix.
Test plan
node --test tools/test-*.mjs: 863 tests, 863 pass (4 new intools/test-calendar-sync-visibility.mjs)node tools/check-package-descriptor.mjspassesnode --check scripts/calendar-sync.mjsTenet self-check
.ai.mdsync wire rules updated🤖 Generated with Claude Code
https://claude.ai/code/session_018uKa2E5HNdeubwBSD9Jn4n
Generated by Claude Code