Skip to content

Commit 280a102

Browse files
committed
fix: exclude 2 sempgrep findings
1 parent 1d162a5 commit 280a102

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

spantest/emulator.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ func inspectPortAddress(t testing.TB, containerID, containerPort string) string
200200
func execCommand(t testing.TB, name string, args ...string) string {
201201
t.Helper()
202202
t.Log("exec:", name, strings.Join(args, " "))
203+
// No external args are passed to this exec.Command other than the static strings defined in this file.
204+
// nosemgrep: go.lang.security.audit.dangerous-exec-command
203205
cmd := exec.Command(name, args...)
204206
var stdout, stderr bytes.Buffer
205207
cmd.Stdout, cmd.Stderr = &stdout, &stderr

spantest/inmemory.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package spantest
33
import (
44
"context"
55
"fmt"
6-
"math/rand"
6+
"math/rand" // nosemgrep: go.lang.security.audit.crypto.math_random.math-random-used
77
"strconv"
88
"testing"
99

0 commit comments

Comments
 (0)