Skip to content

Authenticate read-only Git LFS lock requests - #51

Merged
crohr merged 2 commits into
mainfrom
auto/authenticate-lfs-lock-reads
Aug 3, 2026
Merged

Authenticate read-only Git LFS lock requests#51
crohr merged 2 commits into
mainfrom
auto/authenticate-lfs-lock-reads

Conversation

@crohr

@crohr crohr commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • authenticate Git LFS lock listing and verification with the proxy's upstream token
  • keep caller credentials for lock creation, unlocks, LFS uploads, and other writes
  • add regression coverage for all four lock request classes

Root cause

The Git proxy substituted its upstream credential only for LFS download batches. Private-repository lock reads therefore forwarded the action's opaque localhost credential to GitHub and failed authentication.

This uses an exact method-and-path allowlist for the two read-only lock operations:

  • GET .../info/lfs/locks
  • POST .../info/lfs/locks/verify

Addresses discussion_r3702181313.

Validation

  • go test ./...
  • go test -race ./internal/gitproxy ./internal/stickydisk
  • go vet . ./internal/gitproxy ./internal/stickydisk
  • GOOS=windows GOARCH=amd64 go test -c ./internal/gitproxy
  • upx -t main-linux-amd64 main-linux-arm64 main-windows-amd64.exe
  • git diff --check

Base automatically changed from feature/sticky to main August 3, 2026 09:55
@crohr
crohr force-pushed the auto/authenticate-lfs-lock-reads branch from d8bb40f to ee2da15 Compare August 3, 2026 12:42
@crohr
crohr marked this pull request as ready for review August 3, 2026 12:42

crohr commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: ee2da15135

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@crohr
crohr merged commit 76f7eaf into main Aug 3, 2026
9 checks passed
@crohr
crohr deleted the auto/authenticate-lfs-lock-reads branch August 3, 2026 12:48
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.

1 participant