Skip to content

Commit

Permalink
repo_tag: ignore unintended Git options when creating tags (#110)
Browse files Browse the repository at this point in the history
### Describe the pull request

Fixes
GHSA-m27m-h5gj-wwmg
  • Loading branch information
unknwon authored Dec 22, 2024
1 parent 377da9c commit 5aac20d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.23.x
- name: Check Go module tidiness
Expand All @@ -51,7 +51,7 @@ jobs:
name: Test
strategy:
matrix:
go-version: [ 1.22.x, 1.23.x ]
go-version: [ 1.23.x ]
platform: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
steps:
Expand Down
2 changes: 2 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Default
* @gogs/core
2 changes: 2 additions & 0 deletions repo_tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ func (r *Repository) CreateTag(name, rev string, opts ...CreateTagOptions) error
cmd.AddCommitter(opt.Author)
}
} else {
// 🚨 SECURITY: Prevent including unintended options in the path to the Git command.
cmd.AddArgs("--end-of-options")
cmd.AddArgs(name)
}

Expand Down

0 comments on commit 5aac20d

Please sign in to comment.