mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-05-08 04:48:27 -05:00
chore(mage): silence gosec on worktree branch-exists helpers
The branch name is supplied by the developer running the mage task, so flagging it as tainted input is a false positive.
This commit is contained in:
@@ -1893,11 +1893,11 @@ func (Generate) ConfigYAML(commented bool) {
|
||||
}
|
||||
|
||||
func localBranchExists(ctx context.Context, name string) bool {
|
||||
return exec.CommandContext(ctx, "git", "show-ref", "--verify", "--quiet", "refs/heads/"+name).Run() == nil
|
||||
return exec.CommandContext(ctx, "git", "show-ref", "--verify", "--quiet", "refs/heads/"+name).Run() == nil //nolint:gosec // This is a dev-only mage task and the branch name is supplied by the developer running it.
|
||||
}
|
||||
|
||||
func remoteBranchExists(ctx context.Context, name string) bool {
|
||||
return exec.CommandContext(ctx, "git", "show-ref", "--verify", "--quiet", "refs/remotes/"+name).Run() == nil
|
||||
return exec.CommandContext(ctx, "git", "show-ref", "--verify", "--quiet", "refs/remotes/"+name).Run() == nil //nolint:gosec // This is a dev-only mage task and the branch name is supplied by the developer running it.
|
||||
}
|
||||
|
||||
// PrepareWorktree creates a new git worktree for development.
|
||||
|
||||
Reference in New Issue
Block a user