Repository navigation
Fix CodeQL code-scanning alerts - #95
Merged
Merged
Conversation
- Domain errors carry an explicit `message` (the text written for the person who hit it); routers send that back instead of `str(exc)` (py/stack-trace-exposure). - Redirects to a project build the URL from the project loaded from the database, not the raw path parameter; accepting an invitation redirects to the invitation's own project (py/url-redirection). - A job file's download URL is signed for the file found in the job's listing, not the requested name. - CI workflow declares read-only `permissions` at the top (actions/missing-workflow-permissions). - The dev Weave e2e setup script makes the files holding the dev OAuth secret readable by the owner only. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Adambomb210
added a commit
that referenced
this pull request
Nov 19, 2026
The updates router used the shared project redirect helpers with the raw path parameter, which kept CodeQL's py/url-redirection alert #5 open after #95. Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the 17 open code-scanning alerts on
main(there are no Dependabot or secret-scanning alerts).Stack trace exposure (#1, #2, #10, #11, #17, #18):
DomainErrornow stores the text it was raised with asexc.message. Routers (and theNotAllowed/NotFoundAPI handlers inapp.py) sendexc.messageinstead ofstr(exc), and only where the caught exception is a domain error. Responses carry the same words as before.URL redirection (#5–#9, #14, #22): redirects to a project use
project.idfrom the loaded row, not theproject_idpath parameter. Accepting an invitation redirects to (and posts the Slack invite for) the invitation's own project.compute_files.download_urlsigns the key of the file it found in the job's listing, not the requested name.Workflow permissions (#15, #20):
ci.ymldeclarespermissions: contents: readat the top. Theimagejob keeps its ownpackages: write.Clear-text storage (#3, #4): both are in dev/test code that writes local secrets on purpose: SeaweedFS test keys in
tests/live, and the dev OAuth secret inscripts/dev/weave_e2e_setup.py. The script now makes those files readable by the owner only. CodeQL will still flag them, so they should be dismissed as "used in tests" / "won't fix".Tests: full suite locally,
2072 passed(excludingtests/live). Ruff check and format are clean. Newtests/services/test_errors.py.🤖 Generated with Claude Code