Skip to content

Harden remaining slug-to-path call sites and invalid slug diagnostics #5909

Description

@VectorPeak

Follow-up from #5829.

Additional defense-in-depth items remain around untrusted names becoming filesystem paths or unclear diagnostics:

  • getCredentialCachePath constructs a path directly from sourceSlug.
  • Permission/config catch blocks should distinguish slug-validation failures from filesystem I/O failures.
  • Validation error file fields should avoid echoing unsafe slug-derived paths such as sources/../sessions/config.json.
  • Silent catch blocks should add debug logging where useful.
  • Related local test isolation issues should be fixed so full desktop test runs remain deterministic.

Goal: route remaining slug/name-to-path construction through explicit validation, improve diagnostics, and add focused traversal/regression coverage.

Suggested follow-up PR title:

fix(desktop): harden remaining source path validation

Suggested PR linkage:

Closes #<this-issue-number>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions