Skip to content

fix(raycast): reject unsafe base refs - #502

Merged
JSONbored merged 1 commit into
mainfrom
codex/fix-option-injection-vulnerability-in-raycast-analyzer
Jun 10, 2026
Merged

fix(raycast): reject unsafe base refs#502
JSONbored merged 1 commit into
mainfrom
codex/fix-option-injection-vulnerability-in-raycast-analyzer

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • Prevent git option injection by validating the inferred or caller-supplied baseRef before it is reused in git invocations so values like --output=/tmp/pwn cannot be parsed as git options.

Description

  • Add validateSafeBaseRef(baseRef: string) which rejects empty or dash-prefixed refs and returns the validated ref for downstream use.
  • Replace the previous baseRef assignment with a rawBaseRef and validate it via const baseRef = validateSafeBaseRef(rawBaseRef); before any git calls.
  • Add regression tests to test/unit/raycast-local-repo-analyzer.test.ts covering both inferred remote HEAD refs and explicit baseRef inputs that start with - to ensure they are rejected early.

Testing

  • Ran git diff --check which produced no issues and succeeded.
  • Ran npx vitest run test/unit/raycast-local-repo-analyzer.test.ts and all unit tests passed (Test Files 1 passed, Tests 15 passed).
  • Ran npm run typecheck (tsc --noEmit) which completed successfully with no type errors.

Codex Task

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 9, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui 8514fdf Commit Preview URL

Branch Preview URL
Jun 10 2026, 07:19 AM

@dosubot dosubot Bot added the size:S label Jun 9, 2026
@ghost

ghost commented Jun 9, 2026

Copy link
Copy Markdown

Note

Gittensory Gate skipped

PR closed before full evaluation. No late first comment was created.

Signal Result Evidence Action
Gate result ⚠️ Skipped #502 is no longer open. No action.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

@ghost ghost added the gittensory:reviewed label Jun 9, 2026
@github-actions github-actions Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jun 9, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored JSONbored self-assigned this Jun 10, 2026
@JSONbored
JSONbored force-pushed the codex/fix-option-injection-vulnerability-in-raycast-analyzer branch from a814e4d to d2a1bb3 Compare June 10, 2026 07:16
@dosubot dosubot Bot added the size:S label Jun 10, 2026
@JSONbored
JSONbored force-pushed the codex/fix-option-injection-vulnerability-in-raycast-analyzer branch from d2a1bb3 to 8514fdf Compare June 10, 2026 07:18
@JSONbored
JSONbored merged commit e4b72ca into main Jun 10, 2026
10 checks passed
@JSONbored
JSONbored deleted the codex/fix-option-injection-vulnerability-in-raycast-analyzer branch June 10, 2026 07:21
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 10, 2026
@JSONbored JSONbored added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant