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:
parent
95ec3325c2
commit
21dcb76dc7
|
|
@ -1893,11 +1893,11 @@ func (Generate) ConfigYAML(commented bool) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func localBranchExists(ctx context.Context, name string) 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 {
|
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.
|
// PrepareWorktree creates a new git worktree for development.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue