The package’s reading and writing features otherwise fit its stated purpose, and no install-time or external network behavior was identified. However, two reachable handlers use an unsafe path-prefix check that permits traversal outside the intended directory, so this is a real vulnerability warranting a warning.
Static reason
No blocking static signals were detected.
Trigger
A crafted request to `/dsh-reading.file` or `/dsh-reading.sign`, or a `reading_sign` call with a traversal path.
Impact
A crafted path can read local file contents through the file route or modify a file through the signing route.
Mechanism
The code checks whether a normalized path string starts with the works directory, without resolving the path and verifying that it remains inside that directory. It then reads or writes the resulting path.
Evidence
index.jsThe requested path `p` handled by `/dsh-reading.file``join(root, rel)` handled by `signWork`