Skip to content

Support grafana binary various versions #4559

@witchcraze

Description

@witchcraze

What happened:

Current matcher can not detect some pattern

  • beta
  • test
  • preview
  • security
  • 2.x - 5.x
  • 9.2.13 - 9.2.20
  • 9.3.8 - 9.3.16
  • 9.4.x
  • 9.5.x (a part of 9.5.20, 21 are detected)
  • 10.3.10 - 10.3.12
  • 10.4.10 - 10.4.19
  • 11.0.10 - 11.0.11
  • 12.x.x-xxxxxxxxxxx

Steps to reproduce the issue:

beta

$ syft -q grafana/grafana:6.7.0-beta1 | grep grafana
github.com/grafana/grafana                        UNKNOWN                             go-module  (+1 duplicate)
github.com/grafana/grafana-plugin-model           v0.0.0-20190930120109-1fc953a61fb4  go-module
github.com/grafana/grafana-plugin-sdk-go          v0.26.0                             go-module  (+1 duplicate)

$ docker run -it --rm --entrypoint /usr/share/grafana/bin/grafana-server grafana/grafana:6.7.0-beta1 -v
Version 6.7.0-beta1 (commit: eaaca91f25, branch: HEAD)

$ docker run -it --rm --entrypoint /usr/bin/strings grafana/grafana:6.7.0-beta1 /usr/share/grafana/bin/grafana-server | grep '6\.7\.0'
6.7.0-beta1

test

$ syft -q grafana/grafana:6.7.0-test | grep grafana
github.com/grafana/grafana                        UNKNOWN                             go-module  (+1 duplicate)
github.com/grafana/grafana-plugin-model           v0.0.0-20190930120109-1fc953a61fb4  go-module
github.com/grafana/grafana-plugin-sdk-go          v0.19.0                             go-module  (+1 duplicate)

$ docker run -it --rm --entrypoint /usr/share/grafana/bin/grafana-server grafana/grafana:6.7.0-test -v
Version 6.7.0-test (commit: c26de7cc35, branch: chore/new-release-pipeline)

$ docker run -it --rm --entrypoint /usr/bin/strings grafana/grafana:6.7.0-test /usr/share/grafana/bin/grafana-server | grep '6\.7\.0'
6.7.0-test

preview

$ syft -q grafana/grafana:10.0.0-preview | grep grafana
github.com/grafana/alerting                                                   v0.0.0-20230428095912-33c5aa68a5ba           go-module
github.com/grafana/dataplane/sdata                                            v0.0.6                                       go-module
github.com/grafana/dskit                                                      v0.0.0-20230202092222-880a7f8141cc           go-module
github.com/grafana/go-mssqldb                                                 v0.9.1                                       go-module
github.com/grafana/grafana                                                    v10.0.0-preview                              go-module  (+2 duplicates)
github.com/grafana/grafana-aws-sdk                                            v0.15.0                                      go-module
github.com/grafana/grafana-azure-sdk-go                                       v1.6.0                                       go-module
github.com/grafana/grafana-google-sdk-go                                      v0.1.0                                       go-module
github.com/grafana/grafana-plugin-sdk-go                                      v0.160.0                                     go-module
github.com/grafana/kindsys                                                    v0.0.0-20230427152021-bb328815be7a           go-module
github.com/grafana/phlare/api                                                 v0.1.4-0.20230426005640-f90edba05413         go-module
github.com/grafana/prometheus-alertmanager                                    v0.25.1-0.20230426142720-803b73a2f1f7        go-module
github.com/grafana/saml                                                       v0.4.13-0.20230331080031-67cbfa09c7b6        go-module
github.com/grafana/sqlds/v2                                                   v2.3.10                                      go-module
github.com/grafana/thema                                                      v0.0.0-20230417103609-99b482c479fe           go-module
github.com/grafana/xorm                                                       v0.8.3-0.20220614223926-2fcda7565af6         go-module

$ docker run -it --rm --entrypoint /usr/share/grafana/bin/grafana grafana/grafana:10.0.0-preview -v
grafana version 10.0.0-preview

$ docker run -it --rm --entrypoint /usr/bin/strings grafana/grafana:10.0.0-preview /usr/share/grafana/bin/grafana-server | grep '10\.0\.0'
build   -ldflags="-linkmode=external -extldflags=-static -w -X main.version=10.0.0-preview -X main.commit=e000d93ab3 -X main.buildstamp=1685458820 -X main.buildBranch=HEAD"
build   -ldflags="-linkmode=external -extldflags=-static -w -X main.version=10.0.0-preview -X main.commit=e000d93ab3 -X main.buildstamp=1685458820 -X main.buildBranch=HEAD"

security

$ syft -q grafana/grafana:11.0.5-security-01 | grep grafana
@grafana-plugins/grafana-azure-monitor-datasource                             11.0.5                                 npm
@grafana-plugins/grafana-pyroscope-datasource                                 11.0.5                                 npm
@grafana-plugins/grafana-testdata-datasource                                  11.0.5                                 npm
@grafana-plugins/jaeger                                                       11.0.5                                 npm
@grafana-plugins/parca                                                        11.0.5                                 npm
@grafana-plugins/stackdriver                                                  11.0.5                                 npm
@grafana-plugins/tempo                                                        11.0.5                                 npm
@grafana-plugins/zipkin                                                       11.0.5                                 npm
github.com/grafana/alerting                                                   v0.0.0-20240712182455-c340765c985a     go-module
github.com/grafana/authlib                                                    v0.0.0-20240319083410-9d4a6e3861e5     go-module
github.com/grafana/codejen                                                    v0.0.3                                 go-module
github.com/grafana/cue                                                        v0.0.0-20230926092038-971951014e3f     go-module
github.com/grafana/cuetsy                                                     v0.1.11                                go-module
github.com/grafana/dataplane/sdata                                            v0.0.7                                 go-module
github.com/grafana/dskit                                                      v0.0.0-20240104111617-ea101a3b86eb     go-module
github.com/grafana/gofpdf                                                     v0.0.0-20231002120153-857cc45be447     go-module
github.com/grafana/grafana                                                    UNKNOWN                                go-module  (+2 duplicates)
github.com/grafana/grafana-aws-sdk                                            v0.25.1                                go-module
github.com/grafana/grafana-azure-sdk-go/v2                                    v2.0.1                                 go-module
github.com/grafana/grafana-google-sdk-go                                      v0.1.0                                 go-module
github.com/grafana/grafana-plugin-sdk-go                                      v0.222.0                               go-module
github.com/grafana/grafana/pkg/apimachinery                                   UNKNOWN                                go-module
github.com/grafana/grafana/pkg/apiserver                                      UNKNOWN                                go-module
github.com/grafana/grafana/pkg/promlib                                        UNKNOWN                                go-module
github.com/grafana/prometheus-alertmanager                                    v0.25.1-0.20240208102907-e82436ce63e6  go-module
github.com/grafana/pyroscope-go/godeltaprof                                   v0.1.6                                 go-module
github.com/grafana/pyroscope/api                                              v0.3.0                                 go-module
github.com/grafana/regexp                                                     v0.0.0-20221123153739-15dc172cd2db     go-module
github.com/grafana/saml                                                       v0.4.15-0.20231025143828-a6c0e9b86a4c  go-module
github.com/grafana/sqlds/v3                                                   v3.2.0                                 go-module
github.com/grafana/tempo                                                      v1.5.1-0.20230524121406-1dc1bfe7085b   go-module

$ docker run -it --rm --entrypoint /usr/share/grafana/bin/grafana grafana/grafana:11.0.5-security-01 -v
grafana version 11.0.5+security-01

$ docker run -it --rm --entrypoint /usr/bin/strings grafana/grafana:11.0.5-security-01 /usr/share/grafana/bin/grafana | grep '11\.0\.5'
11.0.5+security-01

12.x.x-xxxxxxxxxxx

$ syft -q grafana/grafana:12.2.0-16557133545 | grep grafana
@grafana-plugins/grafana-azure-monitor-datasource                                    12.2.0-16557133545                           npm
@grafana-plugins/grafana-postgresql-datasource                                       12.2.0-16557133545                           npm
@grafana-plugins/grafana-pyroscope-datasource                                        12.2.0-16557133545                           npm
@grafana-plugins/grafana-testdata-datasource                                         12.2.0-16557133545                           npm
@grafana-plugins/jaeger                                                              12.2.0-16557133545                           npm
@grafana-plugins/loki                                                                12.2.0-16557133545                           npm
@grafana-plugins/mssql                                                               12.2.0-16557133545                           npm
@grafana-plugins/mysql                                                               12.2.0-16557133545                           npm
@grafana-plugins/parca                                                               12.2.0-16557133545                           npm
@grafana-plugins/stackdriver                                                         12.2.0-16557133545                           npm
@grafana-plugins/tempo                                                               12.2.0-16557133545                           npm
@grafana-plugins/zipkin                                                              12.2.0-16557133545                           npm
github.com/grafana/alerting                                                          v0.0.0-20250725130805-615c8286e14b           go-module
github.com/grafana/authlib                                                           v0.0.0-20250710201142-9542f2f28d43           go-module
github.com/grafana/authlib/types                                                     v0.0.0-20250710201142-9542f2f28d43           go-module
github.com/grafana/cue                                                               v0.0.0-20230926092038-971951014e3f           go-module
github.com/grafana/dataplane/sdata                                                   v0.0.9                                       go-module
github.com/grafana/dskit                                                             v0.0.0-20250611075409-46f51e1ce914           go-module
github.com/grafana/gomemcache                                                        v0.0.0-20250318131618-74242eea118d           go-module
github.com/grafana/grafana                                                           v0.0.0-20250727003240-910454c84cf2+dirty     go-module  (+2 duplicates)
github.com/grafana/grafana-app-sdk                                                   v0.40.0                                      go-module
github.com/grafana/grafana-app-sdk/logging                                           v0.39.3                                      go-module
github.com/grafana/grafana-aws-sdk                                                   v1.0.4                                       go-module
github.com/grafana/grafana-azure-sdk-go/v2                                           v2.1.6                                       go-module
github.com/grafana/grafana-cloud-migration-snapshot                                  v1.9.0                                       go-module
github.com/grafana/grafana-google-sdk-go                                             v0.4.1                                       go-module
github.com/grafana/grafana-plugin-sdk-go                                             v0.278.0                                     go-module
github.com/grafana/grafana/apps/advisor                                              UNKNOWN                                      go-module
github.com/grafana/grafana/apps/alerting/notifications                               UNKNOWN                                      go-module
github.com/grafana/grafana/apps/dashboard                                            UNKNOWN                                      go-module
github.com/grafana/grafana/apps/folder                                               UNKNOWN                                      go-module
github.com/grafana/grafana/apps/iam                                                  UNKNOWN                                      go-module
github.com/grafana/grafana/apps/investigations                                       UNKNOWN                                      go-module
github.com/grafana/grafana/apps/playlist                                             UNKNOWN                                      go-module
github.com/grafana/grafana/apps/secret                                               UNKNOWN                                      go-module
github.com/grafana/grafana/pkg/aggregator                                            UNKNOWN                                      go-module
github.com/grafana/grafana/pkg/apimachinery                                          UNKNOWN                                      go-module
github.com/grafana/grafana/pkg/apiserver                                             UNKNOWN                                      go-module
github.com/grafana/grafana/pkg/promlib                                               UNKNOWN                                      go-module
github.com/grafana/grafana/pkg/semconv                                               UNKNOWN                                      go-module
github.com/grafana/jsonparser                                                        v0.0.0-20240425183733-ea80629e1a32           go-module
github.com/grafana/loki/pkg/push                                                     v0.0.0-20231124142027-e52380921608           go-module
github.com/grafana/loki/v3                                                           v3.2.1                                       go-module
github.com/grafana/nanogit                                                           v0.0.0-20250723104447-68f58f5ecec0           go-module
github.com/grafana/otel-profiling-go                                                 v0.5.1                                       go-module
github.com/grafana/prometheus-alertmanager                                           v0.25.1-0.20250620093340-be61a673dee6        go-module
github.com/grafana/pyroscope-go/godeltaprof                                          v0.1.8                                       go-module
github.com/grafana/pyroscope/api                                                     v1.2.1-0.20250415190842-3ff7247547ae         go-module
github.com/grafana/regexp                                                            v0.0.0-20240518133315-a468a5bfb3bc           go-module
github.com/grafana/sqlds/v4                                                          v4.2.3                                       go-module
github.com/grafana/tempo                                                             v1.5.1-0.20250529124718-87c2dc380cec         go-module
$ syft -q grafana/grafana:12.2.0-16557133545 | grep grafana
@grafana-plugins/grafana-azure-monitor-datasource                                    12.2.0-16557133545                           npm
@grafana-plugins/grafana-postgresql-datasource                                       12.2.0-16557133545                           npm
@grafana-plugins/grafana-pyroscope-datasource                                        12.2.0-16557133545                           npm
@grafana-plugins/grafana-testdata-datasource                                         12.2.0-16557133545                           npm
@grafana-plugins/jaeger                                                              12.2.0-16557133545                           npm
@grafana-plugins/loki                                                                12.2.0-16557133545                           npm
@grafana-plugins/mssql                                                               12.2.0-16557133545                           npm
@grafana-plugins/mysql                                                               12.2.0-16557133545                           npm
@grafana-plugins/parca                                                               12.2.0-16557133545                           npm
@grafana-plugins/stackdriver                                                         12.2.0-16557133545                           npm
@grafana-plugins/tempo                                                               12.2.0-16557133545                           npm
@grafana-plugins/zipkin                                                              12.2.0-16557133545                           npm
github.com/grafana/alerting                                                          v0.0.0-20250725130805-615c8286e14b           go-module
github.com/grafana/authlib                                                           v0.0.0-20250710201142-9542f2f28d43           go-module
github.com/grafana/authlib/types                                                     v0.0.0-20250710201142-9542f2f28d43           go-module
github.com/grafana/cue                                                               v0.0.0-20230926092038-971951014e3f           go-module
github.com/grafana/dataplane/sdata                                                   v0.0.9                                       go-module
github.com/grafana/dskit                                                             v0.0.0-20250611075409-46f51e1ce914           go-module
github.com/grafana/gomemcache                                                        v0.0.0-20250318131618-74242eea118d           go-module
github.com/grafana/grafana                                                           v0.0.0-20250727003240-910454c84cf2+dirty     go-module  (+2 duplicates)
github.com/grafana/grafana-app-sdk                                                   v0.40.0                                      go-module
github.com/grafana/grafana-app-sdk/logging                                           v0.39.3                                      go-module
github.com/grafana/grafana-aws-sdk                                                   v1.0.4                                       go-module
github.com/grafana/grafana-azure-sdk-go/v2                                           v2.1.6                                       go-module
github.com/grafana/grafana-cloud-migration-snapshot                                  v1.9.0                                       go-module
github.com/grafana/grafana-google-sdk-go                                             v0.4.1                                       go-module
github.com/grafana/grafana-plugin-sdk-go                                             v0.278.0                                     go-module
github.com/grafana/grafana/apps/advisor                                              UNKNOWN                                      go-module
github.com/grafana/grafana/apps/alerting/notifications                               UNKNOWN                                      go-module
github.com/grafana/grafana/apps/dashboard                                            UNKNOWN                                      go-module
github.com/grafana/grafana/apps/folder                                               UNKNOWN                                      go-module
github.com/grafana/grafana/apps/iam                                                  UNKNOWN                                      go-module
github.com/grafana/grafana/apps/investigations                                       UNKNOWN                                      go-module
github.com/grafana/grafana/apps/playlist                                             UNKNOWN                                      go-module
github.com/grafana/grafana/apps/secret                                               UNKNOWN                                      go-module
github.com/grafana/grafana/pkg/aggregator                                            UNKNOWN                                      go-module
github.com/grafana/grafana/pkg/apimachinery                                          UNKNOWN                                      go-module
github.com/grafana/grafana/pkg/apiserver                                             UNKNOWN                                      go-module
github.com/grafana/grafana/pkg/promlib                                               UNKNOWN                                      go-module
github.com/grafana/grafana/pkg/semconv                                               UNKNOWN                                      go-module
github.com/grafana/jsonparser                                                        v0.0.0-20240425183733-ea80629e1a32           go-module
github.com/grafana/loki/pkg/push                                                     v0.0.0-20231124142027-e52380921608           go-module
github.com/grafana/loki/v3                                                           v3.2.1                                       go-module
github.com/grafana/nanogit                                                           v0.0.0-20250723104447-68f58f5ecec0           go-module
github.com/grafana/otel-profiling-go                                                 v0.5.1                                       go-module
github.com/grafana/prometheus-alertmanager                                           v0.25.1-0.20250620093340-be61a673dee6        go-module
github.com/grafana/pyroscope-go/godeltaprof                                          v0.1.8                                       go-module
github.com/grafana/pyroscope/api                                                     v1.2.1-0.20250415190842-3ff7247547ae         go-module
github.com/grafana/regexp                                                            v0.0.0-20240518133315-a468a5bfb3bc           go-module
github.com/grafana/sqlds/v4                                                          v4.2.3                                       go-module
github.com/grafana/tempo                                                             v1.5.1-0.20250529124718-87c2dc380cec         go-module

$ docker run -it --rm --entrypoint /usr/share/grafana/bin/grafana grafana/grafana:12.2.0-16557133545 -v
grafana version 12.2.0-16557133545

$ docker run -it --rm --entrypoint /usr/bin/strings grafana/grafana:12.2.0-16557133545 /usr/share/grafana/bin/grafana | grep '12\.2\.0'
COMPILER=gcc-12.2.0
12.2.0-16557133545

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions