scribe-org / scribe-org/Scribe-Server
Add tests for the /packs static file and SQLite download handler
Open
Nobody has claimed this yet.
-priority-
blocked
testing
- Dominant language
- Go
- Stars
- 12
- Forks
- 14
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 4
Description
Terms
- I have searched open and closed feature requests
- I agree to follow Scribe-Server's Code of Conduct
Description
- Tests for
setupStaticFilesinapi/server.go, the most security-sensitive untested code in the repo. - Covers the listing endpoint, download headers, 400/404 paths, encoded and double-encoded traversal attempts, and clean startup when the packs directory is absent.
- We should prevent any arbitrary file read.
Contribution
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in api/server.go at setupStaticFiles and trace the listing and SQLite download handlers. Add tests for download headers, 400/404 responses, encoded and double-encoded traversal attempts, and startup without the packs directory; done means the cases are covered and arbitrary file reads are prevented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend, security, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 75/100