Skip to content

Commit 1c4fb19

Browse files
authored
Refactor command arguments for security
1 parent e0cc65c commit 1c4fb19

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

repo_tag.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,7 @@ func (r *Repository) CreateTag(name, rev string, opts ...CreateTagOptions) error
249249
}
250250
cmd.AddArgs("--end-of-options")
251251
} else {
252-
// 🚨 SECURITY: Prevent including unintended options in the path to the Git command.
253-
cmd.AddArgs("--end-of-options")
254-
cmd.AddArgs(name)
252+
cmd.AddArgs("--end-of-options", name)
255253
}
256254

257255
cmd.AddArgs(rev)

0 commit comments

Comments
 (0)