redhat-et / redhat-et/docsclaw
security: add Content-Security-Policy header to dashboard
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2
- Forks
- 1
- Avg merge
- 6h 9m
- Merged PRs (30d)
- 1
Description
From PR #66 review (GLM 5.1, finding #15):
Dashboard serves HTML without a CSP header. Add at minimum:
Content-Security-Policy: default-src 'self'; script-src 'self'
This provides defense-in-depth against XSS beyond the escapeHtml()
sanitization already in place.
Contributor guide
No contributing guide indexed for this repository
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 by locating the dashboard HTTP handler that serves HTML and inspect how its responses are constructed. Add the specified Content-Security-Policy header while preserving the existing escapeHtml() sanitization, then verify that dashboard responses include the header and still render correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, security
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100