Skip to content
Open
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
3 changes: 2 additions & 1 deletion .github/workflows/component-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ jobs:
Test_21_AlertOnPartialThenLearnNetworkTest,
Test_22_AlertOnPartialNetworkProfileTest,
Test_23_RuleCooldownTest,
Test_24_ProcessTreeDepthTest
Test_24_ProcessTreeDepthTest,
Test_27_ApplicationProfileOpens
]
steps:
- name: Checkout code
Expand Down
78 changes: 40 additions & 38 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ go 1.25.8
require (
github.com/DmitriyVTitov/size v1.5.0
github.com/Masterminds/semver/v3 v3.4.0
github.com/anchore/syft v1.32.0
github.com/anchore/syft v1.42.3
github.com/aquilax/truncate v1.0.0
github.com/armosec/armoapi-go v0.0.694
github.com/armosec/armoapi-go v0.0.696
github.com/armosec/utils-k8s-go v0.0.35
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/cenkalti/backoff/v4 v4.3.0
github.com/cenkalti/backoff/v5 v5.0.3
github.com/cespare/xxhash/v2 v2.3.0
github.com/cilium/ebpf v0.20.0
github.com/crewjam/rfc5424 v0.1.0
github.com/cyphar/filepath-securejoin v0.6.1
github.com/cyphar/filepath-securejoin v0.6.0
github.com/deckarep/golang-set/v2 v2.8.0
github.com/dghubble/trie v0.1.0
github.com/distribution/distribution v2.8.2+incompatible
Expand All @@ -24,7 +24,7 @@ require (
github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb
github.com/go-openapi/strfmt v0.23.0
github.com/google/cel-go v0.26.1
github.com/google/go-containerregistry v0.20.7
github.com/google/go-containerregistry v0.21.2
github.com/google/uuid v1.6.0
github.com/goradd/maps v1.3.0
github.com/grafana/pyroscope-go v1.2.2
Expand All @@ -35,7 +35,7 @@ require (
github.com/kubescape/backend v0.0.39
github.com/kubescape/go-logger v0.0.32
github.com/kubescape/k8s-interface v0.0.213
github.com/kubescape/storage v0.0.258
github.com/kubescape/storage v0.0.278
github.com/kubescape/workerpool v0.0.0-20250526074519-0e4a4e7f44cf
github.com/moby/sys/mountinfo v0.7.2
github.com/oleiade/lane/v2 v2.0.0
Expand All @@ -47,7 +47,7 @@ require (
github.com/prometheus/alertmanager v0.27.0
github.com/prometheus/client_golang v1.23.2
github.com/prometheus/procfs v0.20.1
github.com/sirupsen/logrus v1.9.4-0.20230606125235-dd1b4c2e81af
github.com/sirupsen/logrus v1.9.4
github.com/spf13/afero v1.15.0
github.com/spf13/viper v1.21.0
github.com/stretchr/testify v1.11.1
Expand All @@ -57,6 +57,7 @@ require (
go.opentelemetry.io/otel v1.43.0
go.opentelemetry.io/otel/exporters/prometheus v0.65.0
go.opentelemetry.io/otel/log v0.19.0
go.opentelemetry.io/otel/log/logtest v0.19.0
go.opentelemetry.io/otel/metric v1.43.0
go.opentelemetry.io/otel/sdk v1.43.0
go.opentelemetry.io/otel/sdk/metric v1.43.0
Expand All @@ -77,7 +78,7 @@ require (
k8s.io/cri-api v0.35.0
k8s.io/kubectl v0.34.1
k8s.io/utils v0.0.0-20260319190234-28399d86e0b5
modernc.org/sqlite v1.38.2
modernc.org/sqlite v1.46.1
oras.land/oras-go/v2 v2.6.0
sigs.k8s.io/yaml v1.6.0
)
Expand Down Expand Up @@ -107,9 +108,9 @@ require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/Microsoft/hcsshim v0.13.0 // indirect
github.com/Microsoft/hcsshim v0.14.0-rc.1 // indirect
github.com/OneOfOne/xxhash v1.2.8 // indirect
github.com/ProtonMail/go-crypto v1.3.0 // indirect
github.com/ProtonMail/go-crypto v1.4.0 // indirect
github.com/STARRY-S/zip v0.2.3 // indirect
github.com/SergJa/jsonhash v0.0.0-20210531165746-fc45f346aa74 // indirect
github.com/acobaugh/osrelease v0.1.0 // indirect
Expand All @@ -129,7 +130,7 @@ require (
github.com/anchore/go-sync v0.0.0-20250714163430-add63db73ad1 // indirect
github.com/anchore/go-version v1.2.2-0.20210903204242-51efa5b487c4 // indirect
github.com/anchore/packageurl-go v0.1.1-0.20250220190351-d62adb6e1115 // indirect
github.com/anchore/stereoscope v0.1.9 // indirect
github.com/anchore/stereoscope v0.1.22 // indirect
github.com/andybalholm/brotli v1.2.0 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
Expand Down Expand Up @@ -167,7 +168,7 @@ require (
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/bmatcuk/doublestar/v4 v4.9.1 // indirect
github.com/bmatcuk/doublestar/v4 v4.10.0 // indirect
github.com/bodgit/plumbing v1.3.0 // indirect
github.com/bodgit/sevenzip v1.6.1 // indirect
github.com/bodgit/windows v1.0.1 // indirect
Expand All @@ -182,17 +183,17 @@ require (
github.com/cloudflare/cbpfc v0.0.0-20240920015331-ff978e94500b // indirect
github.com/cloudflare/circl v1.6.3 // indirect
github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5 // indirect
github.com/containerd/cgroups/v3 v3.0.5 // indirect
github.com/containerd/containerd v1.7.32 // indirect
github.com/containerd/containerd/api v1.9.0 // indirect
github.com/containerd/cgroups/v3 v3.1.2 // indirect
github.com/containerd/containerd v1.7.30 // indirect
github.com/containerd/containerd/api v1.10.0 // indirect
github.com/containerd/continuity v0.4.5 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/errdefs/pkg v0.3.0 // indirect
github.com/containerd/fifo v1.1.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/nri v0.9.0 // indirect
github.com/containerd/platforms v0.2.1 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.18.1 // indirect
github.com/containerd/nri v0.11.0 // indirect
github.com/containerd/platforms v1.0.0-rc.2 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.18.2 // indirect
github.com/containerd/ttrpc v1.2.7 // indirect
github.com/containerd/typeurl/v2 v2.2.3 // indirect
github.com/containers/common v0.64.2 // indirect
Expand All @@ -202,16 +203,16 @@ require (
github.com/deitch/magic v0.0.0-20240306090643-c67ab88f10cb // indirect
github.com/diskfs/go-diskfs v1.7.0 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/cli v29.2.0+incompatible // indirect
github.com/docker/cli v29.3.0+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker v28.5.2+incompatible // indirect
github.com/docker/docker-credential-helpers v0.9.3 // indirect
github.com/docker/docker-credential-helpers v0.9.5 // indirect
github.com/docker/go-connections v0.6.0 // indirect
github.com/docker/go-events v0.0.0-20250114142523-c867878c5e32 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 // indirect
github.com/elliotchance/phpserialize v1.4.0 // indirect
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/envoyproxy/go-control-plane/envoy v1.36.0 // indirect
github.com/envoyproxy/protoc-gen-validate v1.3.0 // indirect
Expand All @@ -223,15 +224,15 @@ require (
github.com/francoispqt/gojay v1.2.13 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.10 // indirect
github.com/gabriel-vasile/mimetype v1.4.13 // indirect
github.com/gammazero/deque v1.0.0 // indirect
github.com/github/go-spdx/v2 v2.3.3 // indirect
github.com/github/go-spdx/v2 v2.4.0 // indirect
github.com/go-asn1-ber/asn1-ber v1.5.7 // indirect
github.com/go-errors/errors v1.5.1 // indirect
github.com/go-fonts/liberation v0.3.2 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.9.0 // indirect
github.com/go-git/go-git/v5 v5.19.1 // indirect
github.com/go-git/go-billy/v5 v5.8.0 // indirect
github.com/go-git/go-git/v5 v5.18.0 // indirect
github.com/go-jose/go-jose/v4 v4.1.4 // indirect
github.com/go-latex/latex v0.0.0-20231108140139-5c1ce85aa4ea // indirect
github.com/go-ldap/ldap/v3 v3.4.10 // indirect
Expand All @@ -248,12 +249,12 @@ require (
github.com/go-openapi/validate v0.24.0 // indirect
github.com/go-pdf/fpdf v0.9.0 // indirect
github.com/go-restruct/restruct v1.2.0-alpha // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
github.com/goccy/go-yaml v1.18.0 // indirect
github.com/godbus/dbus/v5 v5.2.0 // indirect
github.com/gofrs/flock v0.13.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/gohugoio/hashstructure v0.5.0 // indirect
github.com/gohugoio/hashstructure v0.6.0 // indirect
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
Expand All @@ -280,8 +281,7 @@ require (
github.com/hashicorp/hcl/v2 v2.24.0 // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/iancoleman/strcase v0.3.0 // indirect
github.com/in-toto/attestation v1.1.2 // indirect
github.com/in-toto/in-toto-golang v0.11.0 // indirect
github.com/in-toto/in-toto-golang v0.9.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jinzhu/copier v0.4.0 // indirect
Expand All @@ -292,7 +292,6 @@ require (
github.com/kastenhq/goversion v0.0.0-20230811215019-93b2f8823953 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.18.5 // indirect
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/klauspost/pgzip v1.2.6 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
Expand Down Expand Up @@ -327,7 +326,7 @@ require (
github.com/muesli/termenv v0.16.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/ncruces/go-strftime v0.1.9 // indirect
github.com/ncruces/go-strftime v1.0.0 // indirect
github.com/ncw/directio v1.0.5 // indirect
github.com/nix-community/go-nix v0.0.0-20250101154619-4bdde671e0a1 // indirect
github.com/notaryproject/notation-core-go v1.3.0 // indirect
Expand All @@ -342,7 +341,7 @@ require (
github.com/olekukonko/tablewriter v1.0.9 // indirect
github.com/olvrng/ujson v1.1.0 // indirect
github.com/opcoder0/capabilities v0.0.0-20221222060822-17fd73bffd2a // indirect
github.com/opencontainers/runtime-spec v1.2.1 // indirect
github.com/opencontainers/runtime-spec v1.3.0 // indirect
github.com/opencontainers/selinux v1.13.1 // indirect
github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b // indirect
github.com/packetcap/go-pcap v0.0.0-20250723190045-d00b185f30b7 // indirect
Expand All @@ -352,7 +351,7 @@ require (
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/petermattis/goid v0.0.0-20241211131331-93ee7e083c43 // indirect
github.com/pierrec/lz4/v4 v4.1.22 // indirect
github.com/pjbgf/sha1cd v0.6.0 // indirect
github.com/pjbgf/sha1cd v0.4.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/profile v1.7.0 // indirect
github.com/pkg/xattr v0.4.12 // indirect
Expand All @@ -372,7 +371,7 @@ require (
github.com/sassoftware/go-rpmutils v0.4.0 // indirect
github.com/scylladb/go-set v1.0.3-0.20200225121959-cc7b2070d91e // indirect
github.com/seccomp/libseccomp-golang v0.11.0 // indirect
github.com/secure-systems-lab/go-securesystemslib v0.10.0 // indirect
github.com/secure-systems-lab/go-securesystemslib v0.9.1 // indirect
github.com/sergi/go-diff v1.4.0 // indirect
github.com/shibumi/go-pathspec v1.3.0 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
Expand All @@ -391,7 +390,7 @@ require (
github.com/stretchr/objx v0.5.2 // indirect
github.com/stripe/stripe-go/v74 v74.30.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/sylabs/sif/v2 v2.22.0 // indirect
github.com/sylabs/sif/v2 v2.24.0 // indirect
github.com/sylabs/squashfs v1.0.6 // indirect
github.com/therootcompany/xz v1.0.1 // indirect
github.com/ulikunitz/xz v0.5.15 // indirect
Expand All @@ -405,7 +404,7 @@ require (
github.com/vishvananda/netlink v1.3.1 // indirect
github.com/vishvananda/netns v0.0.5 // indirect
github.com/wagoodman/go-partybus v0.0.0-20230516145632-8ccac152c651 // indirect
github.com/wagoodman/go-progress v0.0.0-20230925121702-07e42b3cdba0 // indirect
github.com/wagoodman/go-progress v0.0.0-20260303201901-10176f79b2c0 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
Expand All @@ -429,7 +428,6 @@ require (
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.43.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.43.0 // indirect
go.opentelemetry.io/otel/log/logtest v0.19.0 // indirect
go.opentelemetry.io/otel/sdk/log v0.19.0 // indirect
go.opentelemetry.io/proto/otlp v1.10.0 // indirect
go.uber.org/zap v1.27.1 // indirect
Expand All @@ -438,7 +436,7 @@ require (
go4.org v0.0.0-20230225012048-214862532bf5 // indirect
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect
golang.org/x/crypto v0.52.0 // indirect
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f // indirect
golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546 // indirect
golang.org/x/image v0.38.0 // indirect
golang.org/x/mod v0.35.0 // indirect
golang.org/x/oauth2 v0.36.0 // indirect
Expand All @@ -462,7 +460,7 @@ require (
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect
k8s.io/kubelet v0.35.0 // indirect
modernc.org/libc v1.66.3 // indirect
modernc.org/libc v1.67.6 // indirect
modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.11.0 // indirect
sigs.k8s.io/controller-runtime v0.21.0 // indirect
Expand All @@ -479,3 +477,7 @@ replace github.com/inspektor-gadget/inspektor-gadget => github.com/matthyx/inspe
replace github.com/cilium/ebpf => github.com/matthyx/ebpf v0.0.0-20260421101317-8a32d06def6c

replace github.com/anchore/syft => github.com/kubescape/syft v1.32.0-ks.2

replace github.com/anchore/stereoscope => github.com/anchore/stereoscope v0.1.9

replace github.com/opencontainers/runtime-spec => github.com/opencontainers/runtime-spec v1.2.1
Comment on lines +481 to +483
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Add TODO comments documenting the temporary nature and removal criteria of these replace directives.

These replace directives downgrade transitive dependencies (stereoscope from v0.1.22→v0.1.9 and runtime-spec from v1.3.0→v1.2.1) to fix build compatibility issues. Without inline documentation explaining why these downgrades are necessary and when they can be removed, this workaround may persist indefinitely after upstream compatibility is restored.

📝 Proposed fix to add removal tracking
+// TODO: Remove after syft upstream resolves stereoscope compatibility.
+// Temporary pin to v0.1.9 to fix build issues with syft v1.42.3.
 replace github.com/anchore/stereoscope => github.com/anchore/stereoscope v0.1.9
 
+// TODO: Remove after upstream dependencies support runtime-spec v1.3.0.
+// Temporary downgrade to v1.2.1 to fix compatibility with current dependency graph.
 replace github.com/opencontainers/runtime-spec => github.com/opencontainers/runtime-spec v1.2.1
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
replace github.com/anchore/stereoscope => github.com/anchore/stereoscope v0.1.9
replace github.com/opencontainers/runtime-spec => github.com/opencontainers/runtime-spec v1.2.1
// TODO: Remove after syft upstream resolves stereoscope compatibility.
// Temporary pin to v0.1.9 to fix build issues with syft v1.42.3.
replace github.com/anchore/stereoscope => github.com/anchore/stereoscope v0.1.9
// TODO: Remove after upstream dependencies support runtime-spec v1.3.0.
// Temporary downgrade to v1.2.1 to fix compatibility with current dependency graph.
replace github.com/opencontainers/runtime-spec => github.com/opencontainers/runtime-spec v1.2.1
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@go.mod` around lines 481 - 483, Add TODO comments above the two go.mod
replace directives to document that these downgrades are temporary workarounds:
reference the exact directives 'replace github.com/anchore/stereoscope =>
github.com/anchore/stereoscope v0.1.9' and 'replace
github.com/opencontainers/runtime-spec => github.com/opencontainers/runtime-spec
v1.2.1', state the reason (build compatibility with current toolchain), record
the criteria for removal (upstream releases restoring compatibility, CI green
when removing), and include a ticket/issue ID or owner and a target review date
to ensure the replacements are revisited.

Loading