Skip to content

Track security defaults in v4.x: missing patterns fallback led to fail-open behavior #895

@jnpkr

Description

@jnpkr

Context

There is an open PR that addresses a major part of this:

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.json default 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions