added arborist.js file & support for npm auth token for arborist lib to scan private deps

This commit is contained in:
Sahilb315
2025-04-10 01:10:56 +05:30
parent ed8f9b6d53
commit 2d2f0fdee9
6 changed files with 101 additions and 13 deletions
+3 -1
View File
@@ -3,11 +3,13 @@ package utils
import (
"bytes"
"fmt"
"os"
"os/exec"
)
func ExecCmd(name string, args []string) error {
func ExecCmd(name string, args, env []string) error {
cmd := exec.Command(name, args...)
cmd.Env = append(os.Environ(), env...)
var stdout, stderr bytes.Buffer
cmd.Stdout = &stdout
+4
View File
@@ -9,3 +9,7 @@ func ApiKey() string {
func TenantDomain() string {
return os.Getenv("SAFEDEP_TENANT_ID")
}
func NpmAuthToken() string {
return os.Getenv("NPM_AUTH_TOKEN")
}