Repository navigation
Conversation
get_manifest_file_url fell back to substring-matching diff.diff_url for "github"/"gitlab"/"bitbucket" when config had no scm. CliConfig always sets scm, and without a config there is no repository_url to use, so the guess never affected a link. diff_url also points at Socket rather than the SCM. Remove the branch so only config picks the SCM, which clears the CodeQL incomplete-URL-substring-sanitization alert.
PR SummaryLow Risk Overview When SCM is not explicitly GitHub/GitLab/Bitbucket, links fall back to the Socket report This removes dead substring-matching logic and addresses a CodeQL incomplete URL substring sanitization finding, with no expected change for CLI flows that always set Reviewed by Cursor Bugbot for commit ca0e80b. Configure here. |
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit ca0e80b. Configure here.
Summary
Messages.get_manifest_file_urlfell back to substring-matchingdiff.diff_urlforgithub/gitlab/bitbucketwhen the config had noscm. That guess never affected a link:CliConfigalways setsscm(defaultapi), and without a config there is norepository_urlto build a link from.diff_urlalso points at the Socket dashboard, not the SCM, as the comment just below the branch already says. This PR removes the branch so only config picks the SCM.This clears CodeQL alert #8 (incomplete URL substring sanitization). There's no behavior change for CLI users.
Other open CodeQL alerts
These are being dismissed in the UI rather than changed in code:
pr-preview.yml: the workflow writes no cache (noactions/cache, nosetup-pythoncache). It runs only when a maintainer labels a PR or dispatches the workflow, only for same-repo branches, and with acontents: readtoken.output.py: the--jsonoutput is meant to go to stdout. The report takes onlyrepo,branch,commit_shaand thelegalflag from config (FOSSA format:repoandbranch), so no secrets reach it.Testing
diff_urlwithout an explicitscmfalls back to the Socket report link.pytest tests/unit: 606 passed.