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
17 changes: 11 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG GOSEC_VERSION=v2.22.8
ARG GOVULNCHECK_VERSION=v1.1.4
ARG SEMGREP_VERSION=1.84.1

FROM golang:1.26.3-alpine3.23@sha256:91eda9776261207ea25fd06b5b7fed8d397dd2c0a283e77f2ab6e91bfa71079d AS builder
FROM golang:1.26-alpine@sha256:3ad57304ad93bbec8548a0437ad9e06a455660655d9af011d58b993f6f615648 AS builder

ARG GOLANGCI_LINT_VERSION
ARG GOLANGCI_LINT_SHA256
Expand All @@ -19,7 +19,7 @@ ADD . /go/src/github.com/grafana/plugin-validator

# nodejs/npm are required by the reactcompat analyzer (npx @grafana/react-detect).
# Pinned to Node 24.x to match the version used in release workflows.
RUN apk add --no-cache git ca-certificates curl python3 python3-dev py3-pip clamav nodejs=24.14.1-r0 npm
RUN apk add --no-cache git ca-certificates curl python3 python3-dev py3-pip clamav nodejs=24.16.0-r0 npm
RUN update-ca-certificates
RUN freshclam

Expand Down Expand Up @@ -48,19 +48,24 @@ RUN curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh
RUN go install golang.org/x/vuln/cmd/govulncheck@${GOVULNCHECK_VERSION} && \
mv "$(go env GOPATH)/bin/govulncheck" /usr/local/bin/govulncheck

RUN python3 -m pip install semgrep==${SEMGREP_VERSION} --ignore-installed --break-system-packages
# setuptools<81 provides pkg_resources, which semgrep 1.84.1 imports but
# Python 3.14 (alpine 3.24) no longer bundles. semgrep is pinned to the
# 1.84.x line on purpose: its OCaml 4 core runs in the restricted buildkit
# sandbox, whereas the OCaml 5 core in newer semgrep crashes there
# ("Failed to allocate signal stack for domain 0").
RUN python3 -m pip install "setuptools<81" semgrep==${SEMGREP_VERSION} --ignore-installed --break-system-packages

RUN mage -v build:lint

RUN mage -v build:ci

FROM alpine:3.23@sha256:5b10f432ef3da1b8d4c7eb6c487f2f5a8f096bc91145e68878dd4a5019afde11
FROM golang:1.26-alpine@sha256:3ad57304ad93bbec8548a0437ad9e06a455660655d9af011d58b993f6f615648

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@academo switched to floating tag

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

it's still pinned to the hash so it makes no difference.


ARG GOSEC_VERSION
ARG SEMGREP_VERSION

# govulncheck source mode shells out to the Go command to load packages.
RUN apk add --no-cache git go ca-certificates curl wget python3 python3-dev py3-pip alpine-sdk clamav nodejs=24.14.1-r0 npm
RUN apk add --no-cache git go ca-certificates curl wget python3 python3-dev py3-pip alpine-sdk clamav nodejs=24.16.0-r0 npm
RUN update-ca-certificates
RUN freshclam

Expand All @@ -70,7 +75,7 @@ RUN curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh
COPY --from=builder /usr/local/bin/govulncheck /usr/local/bin/govulncheck

# install semgrep
RUN python3 -m pip install semgrep==${SEMGREP_VERSION} --ignore-installed --break-system-packages --no-cache-dir
RUN python3 -m pip install "setuptools<81" semgrep==${SEMGREP_VERSION} --ignore-installed --break-system-packages --no-cache-dir


WORKDIR /app
Expand Down
124 changes: 49 additions & 75 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/grafana/plugin-validator

go 1.26.3
go 1.26.4

require (
github.com/Masterminds/semver/v3 v3.4.0
Expand All @@ -9,14 +9,14 @@ require (
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964
github.com/fatih/color v1.18.0
github.com/go-enry/go-license-detector/v4 v4.3.1
github.com/google/osv-scanner/v2 v2.3.8
github.com/google/osv-scanner/v2 v2.4.0
github.com/hashicorp/go-version v1.8.0
github.com/jarcoal/httpmock v1.4.1
github.com/magefile/mage v1.15.0
github.com/mattn/go-shellwords v1.0.12
github.com/modelcontextprotocol/go-sdk v1.5.0
github.com/mattn/go-shellwords v1.0.13
github.com/modelcontextprotocol/go-sdk v1.6.1
github.com/openai/openai-go v1.12.0
github.com/ossf/osv-schema/bindings/go v0.0.0-20260304051245-ec3272c283e4
github.com/ossf/osv-schema/bindings/go v0.0.0-20260424063704-83285ce2a866
github.com/r3labs/diff/v3 v3.0.2
github.com/smartystreets/goconvey v1.8.1
github.com/sourcegraph/go-diff-patch v0.0.0-20240223163233-798fd1e94a8e
Expand All @@ -33,59 +33,50 @@ require (
require (
dario.cat/mergo v1.0.2 // indirect
github.com/BurntSushi/toml v1.6.0 // indirect
github.com/CycloneDX/cyclonedx-go v0.10.0 // indirect
github.com/CycloneDX/cyclonedx-go v0.11.0 // indirect
github.com/anchore/go-struct-converter v0.1.0 // indirect
github.com/cyphar/filepath-securejoin v0.6.1 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
github.com/ianlancetaylor/demangle v0.0.0-20251118225945-96ee0021ea0f // indirect
github.com/jedib0t/go-pretty/v6 v6.7.9 // indirect
github.com/ianlancetaylor/demangle v0.0.0-20260505044615-1ff4bf46051f // indirect
github.com/jedib0t/go-pretty/v6 v6.7.10 // indirect
github.com/mattn/go-runewidth v0.0.23 // indirect
github.com/package-url/packageurl-go v0.1.5 // indirect
github.com/package-url/packageurl-go v0.1.6 // indirect
github.com/smarty/assertions v1.16.0 // indirect
github.com/spdx/gordf v0.0.0-20250128162952-000978ccd6fb // indirect
github.com/spdx/tools-golang v0.5.7 // indirect
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f // indirect
golang.org/x/exp v0.0.0-20260508232706-74f9aab9d74a // indirect
golang.org/x/sync v0.20.0 // indirect
golang.org/x/vuln v1.1.4 // indirect
golang.org/x/vuln v1.3.0 // indirect
)

require (
bitbucket.org/creachadair/stringset v0.0.14 // indirect
cloud.google.com/go v0.123.0 // indirect
cloud.google.com/go/auth v0.19.0 // indirect
cloud.google.com/go/compute/metadata v0.9.0 // indirect
cyphar.com/go-pathrs v0.2.1 // indirect
deps.dev/api/v3 v3.0.0-20260225225317-765e10b45d5b // indirect
deps.dev/api/v3alpha v0.0.0-20260225225317-765e10b45d5b // indirect
deps.dev/util/maven v0.0.0-20260225225317-765e10b45d5b // indirect
deps.dev/util/pypi v0.0.0-20250903005441-604c45d5b44b // indirect
deps.dev/util/resolve v0.0.0-20260225225317-765e10b45d5b // indirect
deps.dev/util/semver v0.0.0-20260225225317-765e10b45d5b // indirect
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 // indirect
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20250520111509-a70c2aa677fa // indirect
deps.dev/api/v3 v3.0.0-20260422013440-90c27f84dd6f // indirect
deps.dev/api/v3alpha v0.0.0-20260422013440-90c27f84dd6f // indirect
deps.dev/util/maven v0.0.0-20260528042559-b92437de09fd // indirect
deps.dev/util/pypi v0.0.0-20260422013440-90c27f84dd6f // indirect
deps.dev/util/resolve v0.0.0-20260422013440-90c27f84dd6f // indirect
deps.dev/util/semver v0.0.0-20260529052642-cf1e78d92744 // indirect
github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/Microsoft/hcsshim v0.14.1 // indirect
github.com/ProtonMail/go-crypto v1.3.0 // indirect
github.com/aead/serpent v0.0.0-20160714141033-fba169763ea6 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/anchore/go-lzo v0.1.0 // indirect
github.com/bazelbuild/buildtools v0.0.0-20250826111327-4006b543a694 // indirect
github.com/ayoubfaouzi/pkcs7 v0.2.3 // indirect
github.com/bazelbuild/buildtools v0.0.0-20260319080235-05d2ebe49b0f // indirect
github.com/canonical/chisel-manifest v1.2.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
github.com/cloudflare/circl v1.6.3 // indirect
github.com/compose-spec/compose-go/v2 v2.8.1 // indirect
github.com/containerd/cgroups/v3 v3.1.3 // indirect
github.com/containerd/containerd v1.7.32 // indirect
github.com/containerd/containerd/api v1.10.0 // indirect
github.com/compose-spec/compose-go/v2 v2.10.2 // indirect
github.com/containerd/continuity v0.5.0 // 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/platforms v1.0.0-rc.2 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.18.2 // indirect
github.com/containerd/ttrpc v1.2.8 // indirect
github.com/containerd/typeurl/v2 v2.2.3 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/deitch/magic v0.0.0-20240306090643-c67ab88f10cb // indirect
Expand All @@ -98,18 +89,17 @@ require (
github.com/docker/docker v28.5.2+incompatible // indirect
github.com/docker/docker-credential-helpers v0.9.5 // indirect
github.com/docker/go-connections v0.7.0 // indirect
github.com/docker/go-events v0.0.0-20250808211157-605354379745 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dsoprea/go-exfat v0.0.0-20190906070738-5e932fbdb589 // indirect
github.com/dsoprea/go-logging v0.0.0-20200710184922-b02d349568dd // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/edsrzf/mmap-go v1.2.0 // indirect
github.com/ekzhu/minhash-lsh v0.0.0-20190924033628-faac2c6342f8 // indirect
github.com/elliotwutingfeng/asciiset v0.0.0-20230602022725-51bbb787efab // indirect
github.com/elliotwutingfeng/asciiset v0.0.0-20260129054604-cfde2086bc57 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/erikvarga/go-rpmdb v0.0.0-20250523120114-a15a62cd4593 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-errors/errors v1.0.2 // indirect
github.com/go-errors/errors v1.5.1 // 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
Expand All @@ -122,8 +112,8 @@ require (
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/go-containerregistry v0.20.7 // indirect
github.com/google/jsonschema-go v0.4.2 // indirect
github.com/google/osv-scalibr v0.4.6-0.20260504042738-9293bfa4f86f // indirect
github.com/google/jsonschema-go v0.4.3 // indirect
github.com/google/osv-scalibr v0.4.6-0.20260612031204-164402d9140e // indirect
github.com/google/s2a-go v0.1.9 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.14 // indirect
Expand All @@ -138,41 +128,31 @@ require (
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.18.6 // indirect
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40 // indirect
github.com/masahiro331/go-ext4-filesystem v0.0.0-20240620024024-ca14e6327bbd // indirect
github.com/lunixbochs/struc v0.0.0-20241101090106-8d528fa2c543 // indirect
github.com/masahiro331/go-ext4-filesystem v0.0.0-20260423010602-fe51f5b5e52b // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/micromdm/plist v0.2.1 // indirect
github.com/mattn/go-isatty v0.0.22 // indirect
github.com/micromdm/plist v0.2.2 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/moby/buildkit v0.30.0 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/locker v1.0.1 // indirect
github.com/moby/sys/mountinfo v0.7.2 // indirect
github.com/moby/sys/sequential v0.6.0 // indirect
github.com/moby/sys/signal v0.7.1 // indirect
github.com/moby/sys/user v0.4.0 // indirect
github.com/moby/sys/userns v0.1.0 // indirect
github.com/moby/term v0.5.2 // indirect
github.com/montanaflynn/stats v0.7.1 // indirect
github.com/ncruces/go-strftime v0.1.9 // indirect
github.com/ncruces/go-strftime v1.0.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/opencontainers/runtime-spec v1.3.0 // indirect
github.com/opencontainers/selinux v1.14.1 // indirect
github.com/owenrumney/go-sarif/v3 v3.3.0 // indirect
github.com/pandatix/go-cvss v0.6.2 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/pierrec/lz4/v4 v4.1.26 // indirect
github.com/pjbgf/sha1cd v0.6.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/xattr v0.4.9 // indirect
github.com/pkg/xattr v0.4.12 // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/rust-secure-code/go-rustaudit v0.0.0-20250226111315-e20ec32e963c // indirect
github.com/saferwall/pe v1.5.7 // indirect
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1 // indirect
github.com/secDre4mer/pkcs7 v0.0.0-20240322103146-665324a4461d // indirect
github.com/saferwall/pe v1.6.4 // indirect
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect
github.com/segmentio/asm v1.1.3 // indirect
github.com/segmentio/encoding v0.5.4 // indirect
github.com/sergi/go-diff v1.4.0 // indirect
Expand All @@ -181,14 +161,14 @@ require (
github.com/sirupsen/logrus v1.9.4 // indirect
github.com/skeema/knownhosts v1.3.1 // indirect
github.com/thoas/go-funk v0.9.3 // indirect
github.com/tidwall/gjson v1.18.0 // indirect
github.com/tidwall/jsonc v0.3.2 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/gjson v1.19.0 // indirect
github.com/tidwall/jsonc v0.3.3 // indirect
github.com/tidwall/match v1.2.0 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
github.com/tink-crypto/tink-go/v2 v2.4.0 // indirect
github.com/tklauser/go-sysconf v0.3.15 // indirect
github.com/tklauser/numcpus v0.10.0 // indirect
github.com/tink-crypto/tink-go/v2 v2.6.0 // indirect
github.com/tklauser/go-sysconf v0.3.16 // indirect
github.com/tklauser/numcpus v0.11.0 // indirect
github.com/tonistiigi/go-csvvalue v0.0.0-20240814133006-030d3b2625d0 // indirect
github.com/ulikunitz/xz v0.5.15 // indirect
github.com/vbatts/tar-split v0.12.3 // indirect
Expand All @@ -201,16 +181,15 @@ require (
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.etcd.io/bbolt v1.4.3 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 // indirect
go.opentelemetry.io/otel v1.43.0 // indirect
go.opentelemetry.io/otel/metric v1.43.0 // indirect
go.opentelemetry.io/otel/trace v1.43.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.1 // indirect
go.uber.org/zap v1.28.0 // indirect
go.yaml.in/yaml/v2 v2.4.4 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
go.yaml.in/yaml/v4 v4.0.0-rc.4 // indirect
golang.org/x/net v0.55.0 // indirect
golang.org/x/oauth2 v0.36.0 // indirect
golang.org/x/sys v0.45.0 // indirect
Expand All @@ -221,23 +200,18 @@ require (
gonum.org/v1/gonum v0.17.0 // indirect
google.golang.org/api v0.272.0 // indirect
google.golang.org/genproto v0.0.0-20260401024825-9d38bb4040a9 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260406210006-6f92a3bedf2d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d // indirect
google.golang.org/grpc v1.80.0 // indirect
gopkg.in/ini.v1 v1.67.1 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260511170946-3700d4141b60 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260511170946-3700d4141b60 // indirect
google.golang.org/grpc v1.81.1 // indirect
gopkg.in/ini.v1 v1.67.2 // indirect
gopkg.in/neurosnap/sentences.v1 v1.0.7 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
modernc.org/libc v1.66.3 // indirect
modernc.org/libc v1.72.3 // indirect
modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.11.0 // indirect
modernc.org/sqlite v1.38.0 // indirect
osv.dev/bindings/go v0.0.0-20260306051416-1f963c5a9f4f // indirect
modernc.org/sqlite v1.50.1 // indirect
osv.dev/bindings/go v0.0.0-20260512064147-daa692bbd4ed // indirect
sigs.k8s.io/yaml v1.6.0 // indirect
www.velocidex.com/golang/go-ntfs v0.2.0 // indirect
www.velocidex.com/golang/regparser v0.0.0-20250203141505-31e704a67ef7 // indirect
)

// Pin runtime-spec to v1.2.1 to keep containerd v1.7.x's oci package compilable.
// containerd v1.7.x assigns int64 to Pids.Limit, which became *int64 in runtime-spec v1.3.0.
// Same workaround as github.com/google/osv-scanner.
replace github.com/opencontainers/runtime-spec => github.com/opencontainers/runtime-spec v1.2.1
Loading
Loading