github.com / grafana
grafana/ k6
Go·4147 files·commit 0110662·scanned 6d ago·cached ✓
15/100
LOW RISK
Minor findings consistent with the project type. Nothing reachable from install hooks.
score capped at 15 — 32,351+ stars — findings likely false positives
scored by engine v10: rules have changed since, rescan for the current result
verdict accurate?
32,351 stars
27% file coverage
Partial architecture graph
threat-state: lowlive
FINDINGS ░▒▓
criticalGo os/exec usageos/exec is used to run external commands. In malware it drops payloads, modifies the system, or opens shells.internal/cmd/launcher.go
func (b *customBinary) run(ctx context.Context, gs *state.GlobalState) error {
cmd := exec.CommandContext(ctx, b.path, gs.CmdArgs[1:]...) //nolint:gosec
// we pass os stdout, err, in because passin...+8warningGo unsafe package usageunsafe package bypasses Go's type safety. Malware uses it for memory tricks, pointer casts, and hiding behavior.internal/cmd/tests/test_state.go
"testing" _ "unsafe" //nolint:revive,nolintlint // needed for the go:linkname and nolintlint is buggy "go.k6.io/k6/v2/lib"+3
criticaleval() usage detectedeval() executes arbitrary code and is commonly used in malware to run obfuscated payloads fetched from remote servers.internal/js/module_loading_test.go
try {
b = eval("require('buffer')");
} catch (err) {
b = "correct";+8criticalGo os/exec usageos/exec is used to run external commands. In malware it drops payloads, modifies the system, or opens shells.internal/js/modules/k6/browser/common/browser_process.go
) (command, error) {
cmd := exec.CommandContext(ctx, path, args...) //nolint:gosec
killAfterParent(cmd)
+8criticaleval() usage detectedeval() executes arbitrary code and is commonly used in malware to run obfuscated payloads fetched from remote servers.internal/js/modules/k6/browser/common/element_handle.go
}
result, err := eval(
h.ctx,
evalOptions{forceCallable: true, returnByValue: false},+8criticaleval() usage detectedeval() executes arbitrary code and is commonly used in malware to run obfuscated payloads fetched from remote servers.internal/js/modules/k6/browser/common/execution_context.go
//nolint:funlen
func (e *ExecutionContext) eval(
apiCtx context.Context, opts evalOptions, js string, args ...any,
) (any, error) {+8criticalBrowser credential store accessAccessing Chrome, Firefox, Edge, or Brave profile directories to steal cookies, passwords, and session tokens.internal/js/modules/k6/browser/chromium/browser_type.go
if userProfile, ok := env("USERPROFILE"); ok {
paths = append(paths, filepath.Join(userProfile, `AppData\Local\Google\Chrome\Application\chrome.exe`))
}
for _, path := range paths {+10criticalBrowser credential store accessAccessing Chrome, Firefox, Edge, or Brave profile directories to steal cookies, passwords, and session tokens.internal/js/modules/k6/browser/chromium/browser_type_test.go
lookPath: func(file string) (string, error) { // we look chrome.exe in the user profile
if file == filepath.Join("home", `AppData\Local\Google\Chrome\Application\chrome.exe`) {
return "", ...+10warningSSH/credential path accessAccessing .ssh, .aws/credentials, or .env files to steal authentication credentials.packaging/bin/create-rpm-repo.sh
%_gpgbin $(command -v gpg2) %_gpg_path $HOME/.gnupg %_gpg_name k6 %_gpg_pass -+5
warningExtremely long lines (>1000 chars)Very long lines in source files (not minified bundles) can hide malicious code.internal/cmd/testdata/example.js+4
warningExtremely long lines (>1000 chars)Very long lines in source files (not minified bundles) can hide malicious code.internal/js/initcontext_test.go+4
infoMinified code in source directoryMinified/obfuscated code in source directories (not dist/) makes code review impossible.internal/js/modules/k6/browser/common/js/web_vital_iife.js+3
warningExtremely long lines (>1000 chars)Very long lines in source files (not minified bundles) can hide malicious code.internal/js/modules/k6/grpc/client_test.go+4
infoSuspicious file in repoVery large source file (1055KB) — could contain obfuscated payloadinternal/js/modules/k6/browser/tests/static/react-dom.development.js+2
Scores reflect the files and rules covered by this scan. How to read this report
1112 files scanned @ 0110662 | 11/19/2026 | heuristic scan — always review manually
risk by category
code execution25
network & exfiltration0
file system access20
obfuscation15
supply chain4
owasp / injection0
telemetry
files 1112/4147rules hit 16engine v10commit 0110662
github
grafana/k6
A modern load testing tool, using Go and JavaScript
32351
1727
3901d
4147 files
1112 scanned(27%)
0110662
network indicators░▒▓
Hosts this code names or would connect to. Top 50 of 344, decoded and call-site destinations first. Informational, not scored.
- https://quickpizza.grafana.comurlnext to network callinternal/cmd/templates/minimal.js:14 +16 more
- https://github.com/tc39/test262.giturlinternal/js/tc39/checkout.sh:6
- https://github.com/grafana/k6-summaryurlinternal/lib/summary/machinereadable/checkout.sh:11
- https://github.com/grafana/cog/releasesurlinternal/lib/summary/machinereadable/generate.sh:16
- https://ingest.k6.iourlcloudapi/config.go:108
- https://api.k6.iourlcloudapi/config.go:109 +1 more
- wss://cloudlogs.k6.io/api/v1/tailurlcloudapi/config.go:110
- https://app.k6.iourlcloudapi/config.go:111
- https://ingest.k6.io/builder/api/v1urlcmd/state/state.go:54 +2 more
- http://httpbin.org/cookiesurlnext to network calltest onlyexamples/cookies.js:15 +8 more
- http://httpbin.org/cookies/seturlnext to network calltest onlyexamples/cookies.js:33
- http://httpbin.orgurlnext to network calltest onlyexamples/custom_metrics.js:26 +3 more
- https://httpbin.org/geturlnext to network calltest onlyexamples/es6sample.js:27 +4 more
- https://quickpizza.grafana.com/test.k6.io/urlnext to network calltest onlyexamples/es6sample.js:38 +16 more
- https://api.github.com/graphqlurlnext to network calltest onlyexamples/graphql.js:28 +1 more
- http://httpbin.org/posturlnext to network calltest onlyexamples/html_form_post.js:19 +5 more
- http://httpbin.org/basic-auth/user/passwdurlnext to network calltest onlyexamples/http_basic_auth.js:7 +1 more
- http://httpbin.org/digest-auth/auth/user/passwdurlnext to network calltest onlyexamples/http_digest_auth.js:6
- http://httpbin.org/geturlnext to network calltest onlyexamples/http_verbs.js:14
- https://httpbin.org/redirect/6urlnext to network calltest onlyexamples/redirects.js:11
- https://httpbin.org/redirect/1urlnext to network calltest onlyexamples/redirects.js:17
- https://httpbin.orgurlnext to network calltest onlyexamples/tls_skip_cert_verification.js:12
- https://sha256.badssl.comurlnext to network calltest onlyexamples/tlsconfig.js:16
- wss://quickpizza.grafana.com/wsurlnext to network calltest onlyexamples/websockets/ws.js:14
- https://stack.grafana.com/a/k6-app/runs/%durlinternal/cloudapi/v6/v6test/server.go:212
- https://grafana.com/docs/grafana-cloud/testing/k6/author-run/test-builder/urlinternal/cmd/cloud_loadtest_list.go:77
- https://my-team.grafana.neturlinternal/cmd/cloud_login.go:189 +3 more
- https://grafana.com/docs/grafana-cloud/testing/k6/projects-and-users/projects/urlinternal/cmd/cloud_project_list.go:65 +1 more
- https://grafana.com/docs/k6/latest/set-up/usage-collection/urlinternal/cmd/cloud_run.go:200 +1 more
- https://grafana.com/docs/grafana-cloud/testing/k6/author-run/tokens-and-cli-authenticationurlinternal/cmd/cloud.go:37 +2 more
- https://github.com/k6io/xk6-output-kafkaurlinternal/cmd/outputs.go:59
- https://github.com/LeonAdato/xk6-output-statsdurlinternal/cmd/outputs.go:64 +1 more
- https://stats.grafana.org/k6-usage-reporturlinternal/cmd/report.go:199
- https://test.k6.iourlnext to network calltest onlyinternal/cmd/testdata/invalidconfig/option_env.js:9 +5 more
- https://httpbin.org/authurlnext to network calltest onlyinternal/cmd/testdata/summary/api.js:17
- wss://test-api.k6.io/ws/crocochat/$urlnext to network calltest onlyinternal/cmd/testdata/summary/ws.js:23
- https://registry.k6.iourlinternal/cmd/x_registry.go:59
- http://test.grafana.comurlnext to network calltest onlyinternal/execution/scheduler_ext_test.go:1439
- https://grafana.com/docs/k6/latest/using-k6/test-lifecycle/urlinternal/js/initcontext.go:17
- https://grafana.com/docs/k6/latest/javascript-api/k6-x-redisurlinternal/js/jsmodules.go:61
- https://grafana.com/docs/k6/latest/using-k6-browser/migrating-to-k6-v0-52/urlinternal/js/jsmodules.go:68
- https://grafana.com/docs/k6/latest/javascript-api/k6-net-grpc/urlinternal/js/jsmodules.go:71
- https://grafana.com/docs/k6/latest/javascript-api/jslib/…urlinternal/js/jsmodules.go:79
- https://grafana.com/docs/k6/latest/javascript-api/k6/group/urlinternal/js/modules/k6/k6.go:120
- https://grafana.com/docs/k6/latest/javascript-api/jslib/utils/check/urlinternal/js/modules/k6/k6.go:229
- https://k6.iourlnext to network calltest onlyinternal/js/runner_test.go:1169 +1 more
- https://grafana.com/docs/k6/latest/using-k6/modules/urlinternal/loader/loader.go:36
- https://grafana.com/docs/k6/latest/using-k6/tags-and-groups/urlinternal/metrics/engine/ingester.go:116
- https://github.com/grafana/xk6-output-influxdburlinternal/output/influxdb/output.go:217 +1 more
- http://sdafsgdhfjg.comurlnext to network calltest onlyjs/modules/k6/http/request_test.go:1840
architecture░▒▓
entry (1) flagged (13) pkg (213)
613 nodes · 1669 edgesscroll to zoom · click node to jump to finding