Skip to content

Add git-receive-pack and PR/MR creation endpoints for c2f SAST#202

Open
stuartcmehrens wants to merge 1 commit intodevelopfrom
stuart/add-c2f-sast-endpoints
Open

Add git-receive-pack and PR/MR creation endpoints for c2f SAST#202
stuartcmehrens wants to merge 1 commit intodevelopfrom
stuart/add-c2f-sast-endpoints

Conversation

@stuartcmehrens
Copy link
Contributor

Summary

  • Adds POST /{owner}/{repo}/git-receive-pack and POST /repos/{owner}/{repo}/pulls to the GitHub allowCodeAccess allowlist
  • Adds POST /{namespace}/{project}/git-receive-pack and POST /projects/{project}/merge_requests to the GitLab allowCodeAccess allowlist
  • These endpoints are required for Semgrep's click-to-fix SAST feature to push branches and create PRs/MRs through the network broker

Test plan

  • go build ./... passes
  • go test ./... passes
  • Verify c2f SAST feature can push branches and create PRs/MRs through the broker with allowCodeAccess enabled

🤖 Generated with Claude Code

The click-to-fix SAST feature needs to push branches and create
pull requests/merge requests via the network broker. Add the missing
endpoints to the GitHub and GitLab allowCodeAccess sections:

- POST /{owner}/{repo}/git-receive-pack (GitHub)
- POST /repos/{owner}/{repo}/pulls (GitHub)
- POST /{namespace}/{project}/git-receive-pack (GitLab)
- POST /projects/{project}/merge_requests (GitLab)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@matthewdean-semgrep matthewdean-semgrep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants