-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Track security defaults in v4.x: missing patterns fallback led to fail-open behavior #895
Copy link
Copy link
Open
Description
Context
There is an open PR that addresses a major part of this:
- Related PR: feat: hook test harness + SecurityValidator patterns template #859 (adds test harness, SecurityValidator tests, and
patterns.example.yaml)
Thank you — this is a strong improvement.
Why open this issue
This issue tracks the broader/default-security posture so it remains visible until fully resolved across release/install paths.
Problem observed
In v4.x, SecurityValidator.hook.ts references:
PAI/USER/PAISECURITYSYSTEM/patterns.yaml- fallback:
PAI/PAISECURITYSYSTEM/patterns.example.yaml
When neither exists, behavior is fail-open (all operations allowed), which weakens defense-in-depth.
What the linked PR improves
- Adds missing
patterns.example.yaml - Adds hook test harness + SecurityValidator coverage
- Verifies expected block/confirm/allow behavior
Remaining checks / acceptance criteria
- Confirm fresh install path always results in a valid patterns file present
- Confirm upgrade path from older installs preserves/enables secure defaults
- Add CI gate to prevent release artifacts from shipping without fallback patterns
- Document expected fail mode if patterns cannot be loaded (preferably not fully permissive)
- Re-evaluate
settings.jsondefault permissions vs least-privilege goals
Notes
If #859 fully closes all items above, this issue can be closed as complete.
Otherwise, keep this as the follow-up tracker for residual risk.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels