Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/rancher/wrangler/v3 v3.2.0
github.com/robfig/cron v1.2.0
github.com/sirupsen/logrus v1.9.3
github.com/urfave/cli/v2 v2.27.6
github.com/urfave/cli/v3 v3.3.2
golang.org/x/crypto/x509roots/fallback v0.0.0-20250505184708-aae6e6107042
k8s.io/api v0.32.3
k8s.io/apiextensions-apiserver v0.32.3
Expand All @@ -28,7 +28,6 @@ require (
github.com/aws/smithy-go v1.22.2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/evanphx/json-patch v5.9.11+incompatible // indirect
Expand Down Expand Up @@ -61,7 +60,6 @@ require (
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.62.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sagikazarmark/locafero v0.6.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
Expand All @@ -71,7 +69,6 @@ require (
github.com/spf13/viper v1.19.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect
golang.org/x/mod v0.23.0 // indirect
Expand Down
10 changes: 2 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc=
github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
Expand Down Expand Up @@ -234,8 +232,6 @@ github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sagikazarmark/locafero v0.6.0 h1:ON7AQg37yzcRPU69mt7gwhFEBwxI6P9T4Qu3N51bwOk=
github.com/sagikazarmark/locafero v0.6.0/go.mod h1:77OmuIc6VTraTXKXIs/uvUxKGUXjE1GbemJYHqdNjX0=
github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=
Expand Down Expand Up @@ -269,12 +265,10 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/urfave/cli/v2 v2.27.6 h1:VdRdS98FNhKZ8/Az8B7MTyGQmpIr36O1EHybx/LaZ4g=
github.com/urfave/cli/v2 v2.27.6/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ=
github.com/urfave/cli/v3 v3.3.2 h1:BYFVnhhZ8RqT38DxEYVFPPmGFTEf7tJwySTXsVRrS/o=
github.com/urfave/cli/v3 v3.3.2/go.mod h1:FJSKtM/9AiiTOJL4fJ6TbMUkxBXn7GO9guZqoZtpYpo=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4=
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"github.com/rancher/wrangler/v3/pkg/kubeconfig"
"github.com/rancher/wrangler/v3/pkg/signals"
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"

"log"
"net/http"
Expand Down Expand Up @@ -55,55 +55,55 @@
)

func main() {
app := cli.NewApp()

Check failure on line 58 in main.go

View workflow job for this annotation

GitHub Actions / validate

undefined: cli.NewApp

Check failure on line 58 in main.go

View workflow job for this annotation

GitHub Actions / validate

undefined: cli.NewApp
app.Name = "cis-operator"
app.Version = fmt.Sprintf("%s (%s)", Version, GitCommit)
app.Usage = "cis-operator needs help!"
app.Flags = []cli.Flag{
&cli.StringFlag{
Name: "kubeconfig",
EnvVars: []string{"KUBECONFIG"},

Check failure on line 65 in main.go

View workflow job for this annotation

GitHub Actions / validate

unknown field EnvVars in struct literal of type cli.StringFlag

Check failure on line 65 in main.go

View workflow job for this annotation

GitHub Actions / validate

unknown field EnvVars in struct literal of type cli.StringFlag
Destination: &kubeConfig,
},
&cli.IntFlag{
Name: "threads",
EnvVars: []string{"CIS_OPERATOR_THREADS"},

Check failure on line 70 in main.go

View workflow job for this annotation

GitHub Actions / validate

unknown field EnvVars in struct literal of type cli.IntFlag

Check failure on line 70 in main.go

View workflow job for this annotation

GitHub Actions / validate

unknown field EnvVars in struct literal of type cli.IntFlag
Value: 2,
Destination: &threads,
},
&cli.StringFlag{
Name: "name",
EnvVars: []string{"CIS_OPERATOR_NAME"},

Check failure on line 76 in main.go

View workflow job for this annotation

GitHub Actions / validate

unknown field EnvVars in struct literal of type cli.StringFlag

Check failure on line 76 in main.go

View workflow job for this annotation

GitHub Actions / validate

unknown field EnvVars in struct literal of type cli.StringFlag
Value: "cis-operator",
Destination: &name,
},
&cli.StringFlag{
Name: "security-scan-image",
EnvVars: []string{"SECURITY_SCAN_IMAGE"},

Check failure on line 82 in main.go

View workflow job for this annotation

GitHub Actions / validate

unknown field EnvVars in struct literal of type cli.StringFlag

Check failure on line 82 in main.go

View workflow job for this annotation

GitHub Actions / validate

unknown field EnvVars in struct literal of type cli.StringFlag
Value: "rancher/security-scan",
Destination: &securityScanImage,
},
&cli.StringFlag{
Name: "security-scan-image-tag",
EnvVars: []string{"SECURITY_SCAN_IMAGE_TAG"},

Check failure on line 88 in main.go

View workflow job for this annotation

GitHub Actions / validate

unknown field EnvVars in struct literal of type cli.StringFlag

Check failure on line 88 in main.go

View workflow job for this annotation

GitHub Actions / validate

unknown field EnvVars in struct literal of type cli.StringFlag
Value: "latest",
Destination: &securityScanImageTag,
},
&cli.StringFlag{
Name: "sonobuoy-image",
EnvVars: []string{"SONOBUOY_IMAGE"},

Check failure on line 94 in main.go

View workflow job for this annotation

GitHub Actions / validate

unknown field EnvVars in struct literal of type cli.StringFlag

Check failure on line 94 in main.go

View workflow job for this annotation

GitHub Actions / validate

unknown field EnvVars in struct literal of type cli.StringFlag
Value: "rancher/sonobuoy-sonobuoy",
Destination: &sonobuoyImage,
},
&cli.StringFlag{
Name: "sonobuoy-image-tag",
EnvVars: []string{"SONOBUOY_IMAGE_TAG"},

Check failure on line 100 in main.go

View workflow job for this annotation

GitHub Actions / validate

unknown field EnvVars in struct literal of type cli.StringFlag

Check failure on line 100 in main.go

View workflow job for this annotation

GitHub Actions / validate

unknown field EnvVars in struct literal of type cli.StringFlag
Value: "latest",
Destination: &sonobuoyImageTag,
},
&cli.StringFlag{
Name: "cis_metrics_port",
EnvVars: []string{"CIS_METRICS_PORT"},

Check failure on line 106 in main.go

View workflow job for this annotation

GitHub Actions / validate

unknown field EnvVars in struct literal of type cli.StringFlag

Check failure on line 106 in main.go

View workflow job for this annotation

GitHub Actions / validate

unknown field EnvVars in struct literal of type cli.StringFlag
Value: "8080",
Destination: &metricsPort,
},
Expand Down Expand Up @@ -142,7 +142,7 @@
}
}

func run(c *cli.Context) error {

Check failure on line 145 in main.go

View workflow job for this annotation

GitHub Actions / validate

undefined: cli.Context

Check failure on line 145 in main.go

View workflow job for this annotation

GitHub Actions / validate

undefined: cli.Context
logrus.Info("Starting CIS-Operator")

ctx := context.Background()
Expand Down
Loading