Skip to content

Merge upstream Prometheus v3.13.0 into invoca-2.55.1-base - #28

Draft
ColinDKelley wants to merge 4170 commits into
invoca-2.55.1-basefrom
invoca-3.13-base
Draft

ColinDKelley wants to merge 4170 commits into
invoca-2.55.1-basefrom
invoca-3.13-base

Conversation

@ColinDKelley

Copy link
Copy Markdown

Summary

Merge upstream Prometheus v3.13.0 (LTS, supported until 2027-07-31) into invoca-2.55.1-base, creating the 3.x integration anchor for Invoca's fork.

Stacked on invoca-2.55.1-base (#27 chain). No Invoca rate-func features in this branch — promql was taken from upstream 3.13 wholesale (merge kept stale Invoca xrate parser entries; fixed in second commit).

Lineage

invoca-2.53.1-base
  └─ invoca-2.55.1-base (#27)
       └─ invoca-3.13-base (#28, this PR)     ← upstream v3.13.0
            └─ (future) port-rate-funcs        ← re-implement xrate/yrate + REPLACE_RATE_FUNCS

Why clean upstream PromQL?

Upstream 3.13 rewrote promql/functions.go (~1,600 lines changed vs 3.0). Invoca xrate/yrate from 2.55 will not cherry-pick — they must be re-ported against the new pickOrInterpolateLeft/pickOrInterpolateRight rate architecture. Starting from stock 3.13 PromQL avoids carrying 2.x fork debt forward.

Merge notes

  • Conflicts in promql/engine.go, promql/functions.go, promql/promqltest/testdata/functions.test → resolved with upstream 3.13
  • promql/parser/functions.go auto-merge kept Invoca xrate parser stubs → reset to upstream 3.13 in follow-up commit

Test plan

  • go build ./...
  • go test -count=1 ./promql/...
  • Full go test ./... (optional; large)
  • Staging spike checklist below before starting rate-func re-port

Pre-port spike checklist (ops / TSDB / integration)

Run these on this branch (or a throwaway deploy) before stacking invoca-3.13/port-rate-funcs. Goal: surface 3.x migration risk without touching Invoca PromQL yet.

Prerequisites

  • 2.55.1 stack merged and staging has run on Invoca 2.55.1 for ≥ one retention window (TSDB bridge requirement per migration guide)
  • Thanos pairing plan for 3.13 (likely v0.40.x+; 0.37.2 embeds 2.55-era prometheus only)

TSDB / data path

  • Start 3.13 against TSDB written by 2.55.1 — confirm blocks load, no corruption errors
  • Confirm downgrade path: 3.13 → 2.55.1 works; 3.13 → 2.53 does not (expected)
  • WAL replay clean on restart after 2.55 → 3.13 cutover

Config / deployment breaking changes (migration guide)

  • Scrape targets: Content-Type strictness — any targets need fallback_scrape_protocol?
  • Alertmanager: api_version: v2 only (no v1)
  • Remote write: http_config.enable_http2 default now false — verify remote_write still works if you rely on HTTP/2
  • Feature flags removed from --enable-feature (now default or dedicated flags): expand-external-labels, no-default-scrape-port, agent, remote-write-receiver, auto-gomemlimit, auto-gomaxprocs
  • scrape_classic_histograms → always_scrape_classic_histograms if used
  • Log format changed (log/slog) — update any log parsers/alerts

PromQL behavior (upstream 3.x, no Invoca funcs yet)

  • Spot-check dashboards using rate/increase on boundary-aligned subqueries — 3.x is (start, end]; subqueries like foo[1m:1m] may return fewer points (migration guide)
  • Regex . now matches newlines — audit relabel/alert regexes if needed
  • le/quantile label normalization — audit rules referencing integer le="1" (now le="1.0")

Thanos / ecosystem

  • Build Invoca Thanos fork against 3.13 prometheus embed (new branch from v0.40.x?)
  • Sidecar uploads blocks from 3.13 Prometheus
  • Thanos Query evaluates standard PromQL against 3.13-embedded engine

Exit criteria for spike

  • Staging shard runs 3.13 base for ≥ 24–48h without TSDB/scrape/alert regressions
  • Known dashboard/recording-rule diffs documented (expected from 3.x semantics, not bugs)
  • Only then: branch invoca-3.13/port-rate-funcs off this base

Related

bwplotka and others added 30 commits May 18, 2026 14:24
…y-aws-parallel

discovery/aws: run tests in parallel
Co-authored-by: Julien <291750+roidelapluie@users.noreply.github.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
- Fix copy-paste bug: smoothed branch in bare MatrixSelector eval now
  says "smoothed modifier is not supported with histograms" instead of
  "anchored".
- Change annosFromInterpolationError to take *annotations.Annotations,
  consistent with all other histogram helper functions.
- Rename delta to result in interpolateHistograms to avoid the misleading
  name (the variable holds the interpolated result, not a delta).
- Fix extendedRate doc comment: interpolates at boundaries, not
  extrapolates.
- Fix stale comment in correctForCounterResetsHistogram that referenced
  the nonexistent variable leftInterpolationHandledReset.
- Add comment explaining why right.Copy() is not redundant in
  extendedHistogramRate.
- Hoist s.Labels().Get(labels.MetricName) out of the per-step loop in
  smoothSeries; was called up to three times per step.
- Reset CounterResetHint to UnknownCounterReset on carry-forward
  histograms in smoothSeries; a Reset hint at a new timestamp is
  semantically misleading.
- Add TestInterpolateHistograms unit test covering exact-match, midpoint,
  counter, reset, and quarter-point cases.
- Add rate(hist_counter[1m] anchored) test.
- Add delta(hist_counter[1m] anchored/smoothed) tests with
  NativeHistogramNotGaugeWarning assertions.
- Add carry-forward test for smoothed vector selector.
- Add range eval test for rate(hist_counter[1m] smoothed).
- Add right-boundary reset interpolation test (right_boundary_reset).
- Fix stale test comment about "prev initialPrev path".

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
… extendedHistogramRate

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
…oothed-histogram

promql: support native histograms with smoothed/anchored rate
…3.12

Revert "chore: prepare 3.12.0-rc.0 release"
…eanup-funcmap

chore(promql): replace funcQueryContext with nil in FunctionCalls map
chores: Prepare 3.12.0-rc.0 release
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
…bsequence-rank

strutil/subsequence: rank exact matches above non-exact matches
…ard-nil-funcall

promql: guard against nil function call in eval
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
Signed-off-by: Kai Tanaka <275430420+quyentonndbs@users.noreply.github.com>
Co-authored-by: Kai Tanaka <275430420+quyentonndbs@users.noreply.github.com>
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
Each test creates its own httptest.Server and prometheus.Registry so
there is no shared global state between them. Adding t.Parallel() to
all 13 top-level test functions and the subtests in TestUnmarshalConfig
allows the Go test runner to overlap them, cutting wall-clock time.

Refs: prometheus#15185

Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@hotmail.com>
Add t.Parallel() to the 13 top-level test functions in marathon_test.go.
Tests have no shared mutable state — each test creates its own registry,
metrics, and config — so parallelisation is safe and speeds up the suite.

Refs prometheus#15185

Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@hotmail.com>
Signed-off-by: jyotishmoy12 <jyotishmoydeka62@gmail.com>
…theus#18724)

* web/api: reject 0 for limit and batch_size in search endpoints

Treat 0 as invalid for limit and batch_size query parameters; clients
must supply a positive integer or omit the parameter to use the server
default of 100. Update OpenAPI descriptions accordingly.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>

* Update web/api/v1/openapi.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Julien <291750+roidelapluie@users.noreply.github.com>

---------

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
Signed-off-by: Julien <291750+roidelapluie@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Andrew Hall <andrew.hall@grafana.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Andrew Hall <andrew.hall@grafana.com>
…rometheus#18739)

EncXOR2 is a float encoding and must be treated like EncXOR in all
places that enumerate chunk types:

- compact.go: NumFloatSamples was not incremented for EncXOR2 chunks
  during compaction, leading to under-reported block stats.
- head_wal.go: encodeToSnapshotRecord fell through to the default
  (FloatHistogram) branch for EncXOR2 head chunks, which would corrupt
  chunk snapshots; the decode path already handled EncXOR2 correctly.
- ooo_head.go: update stale comment to mention EncXOR2.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
* Rewrite TestCancelCompactions to run faster

---------

Signed-off-by: Owen Williams <owen.williams@grafana.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
…b.com-hashicorp-nomad-api-digest

Update github.com/hashicorp/nomad/api digest to afe1ed5
…eatest_least

Duration expression: Rename min/max -> min_of, max_of
aknuds1 and others added 2 commits July 8, 2026 18:16
…eus#19134)

The head-chunk cache fingerprint (series ref, head pointer, mmapped
count) could not detect truncateChunksBefore removing older head
chunks: the head pointer survives and, for a series with no mmapped
chunks, the mmapped count stays 0, while firstChunkID advances. A
cache-enabled reader (range queries through the head-and-OOO reader)
then resolved chunk IDs against the stale slice and returned the wrong
chunk, or failed with ErrNotFound.

Include firstChunkID in the fingerprint; it advances on every
truncation and never regresses.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 39359eb)
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Fan out the upgrade/downgrade test over each active LTS release so the
matrix jobs run in parallel and a single release failure does not mask
the others. A new list_lts_releases job reads the active LTS versions
from prometheus.io/download.json and feeds them to the matrix.

Add a --test.lts-version flag so TestVersionUpgrade can be restricted to
a single LTS release; when empty, all active LTS releases are tested.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
(cherry picked from commit 827d0f9)
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
jobs:
dependabot:
permissions:
contents: write
Comment thread .github/workflows/ci.yml
uses: ./.github/workflows/codeql-analysis.yml
permissions:
contents: read
security-events: write
Comment thread .github/workflows/ci.yml
name: Publish main branch artifacts
runs-on: ubuntu-latest
permissions:
packages: write
Comment thread .github/workflows/ci.yml
name: Publish release artefacts
runs-on: ubuntu-latest
permissions:
contents: write
Comment thread .github/workflows/ci.yml
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
name: Benchmark Start
if: github.event.action == 'prombench_start'
permissions:
statuses: write
name: Benchmark Cancel
if: github.event.action == 'prombench_stop'
permissions:
statuses: write
name: Benchmark Restart
if: github.event.action == 'prombench_restart'
permissions:
statuses: write
Comment thread Dockerfile.distroless
ARG DISTROLESS_ARCH="amd64"

# Use DISTROLESS_ARCH for base image selection (handles armv7->arm mapping).
FROM gcr.io/distroless/static-debian13:nonroot-${DISTROLESS_ARCH}
@wiz-b82ec45539

ghost commented Jul 9, 2026 •

Copy link
Copy Markdown

Wiz Scan Summary

⚠️ Many findings detected
Many findings were detected, but only a subset of the findings are displayed inline due to API constraints. To view all findings inline, please click here.
Scanner Findings
Vulnerability Finding Vulnerabilities 34 High 13 Medium 5 Low
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations 1 High 1 Medium 2 Low 2 Info
SAST Finding SAST Findings 14 Medium 24 Low
Software Management Finding Software Management Findings -
Total 35 High 28 Medium 31 Low 2 Info

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio.

Comment thread discovery/aws/msk.go
// Only set static credentials if both access key and secret key are provided
// Otherwise, let AWS SDK use its default credential chain
if d.cfg.AccessKey != "" && d.cfg.SecretKey != "" {
credProvider := credentials.NewStaticCredentialsProvider(d.cfg.AccessKey, string(d.cfg.SecretKey), "")

ghost Jul 9, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Medium SAST Finding

Hardcoded AWS Credentials in Go Application

More Details

Embedding static AWS credentials directly into a Go application using the credentials.NewStaticCredentialsProvider function poses a significant security risk. This practice exposes the AWS access keys and secret keys in plaintext within the application code, making them vulnerable to theft or misuse. If an attacker gains access to the application code or the compiled binary, they can extract the hardcoded credentials and potentially gain unauthorized access to AWS resources, leading to data breaches, financial losses, or other malicious activities.

Hardcoded credentials should never be used in production environments. Instead, applications should retrieve credentials securely from trusted sources, such as environment variables, secure key management services, or temporary credentials obtained through AWS Identity and Access Management (IAM) roles. Failing to properly manage and protect AWS credentials can lead to severe consequences, including data exfiltration, resource hijacking, and compliance violations.

Attribute Value
Impact Medium
Likelihood Medium

Remediation

Hardcoding AWS credentials into an application poses a significant security risk. If the application's code is compromised or accidentally exposed, the hardcoded credentials can be easily extracted and misused by attackers to gain unauthorized access to AWS resources, potentially leading to data breaches, financial losses, and other severe consequences.

To fix this issue securely, applications should retrieve AWS credentials from secure sources at runtime, such as environment variables, AWS credential files, or AWS credential providers. This approach ensures that credentials are not embedded in the application's code and can be easily rotated or revoked if needed.

Code examples

// VULNERABLE CODE - Hardcoded AWS credentials
import (
    "github.com/aws/aws-sdk-go-v2/aws"
    "github.com/aws/aws-sdk-go-v2/credentials"
)

creds := credentials.NewStaticCredentialsProvider(
    "AKIAIOSFODNN7EXAMPLE",
    "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
    "",
)
// SECURE CODE - Using AWS credential provider
import (
    "github.com/aws/aws-sdk-go-v2/config"
)

cfg, err := config.LoadDefaultConfig(context.TODO())
if err != nil {
    // Handle error
}

// AWS credentials are retrieved securely from the environment or other sources

Additional recommendations

  • Follow the AWS best practices for managing AWS access keys and secret access keys.
  • Implement least privilege access principles by granting only the necessary permissions to AWS resources.
  • Regularly rotate AWS credentials and revoke unused or compromised credentials.
  • Consider using temporary security credentials (AWS STS) for enhanced security and auditing capabilities.
  • Adhere to relevant security standards and guidelines, such as the AWS Security Best Practices and the OWASP Application Security Verification Standard (ASVS).

Rule ID: WS-GO-00051


To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).


To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

Comment thread discovery/aws/rds.go
// Only set static credentials if both access key and secret key are provided
// Otherwise, let AWS SDK use its default credential chain
if d.cfg.AccessKey != "" && d.cfg.SecretKey != "" {
credProvider := credentials.NewStaticCredentialsProvider(d.cfg.AccessKey, string(d.cfg.SecretKey), "")

ghost Jul 9, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Medium SAST Finding

Hardcoded AWS Credentials in Go Application

More Details

Embedding static AWS credentials directly into a Go application using the credentials.NewStaticCredentialsProvider function poses a significant security risk. This practice exposes the AWS access keys and secret keys in plaintext within the application code, making them vulnerable to theft or misuse. If an attacker gains access to the application code or the compiled binary, they can extract the hardcoded credentials and potentially gain unauthorized access to AWS resources, leading to data breaches, financial losses, or other malicious activities.

Hardcoded credentials should never be used in production environments. Instead, applications should retrieve credentials securely from trusted sources, such as environment variables, secure key management services, or temporary credentials obtained through AWS Identity and Access Management (IAM) roles. Failing to properly manage and protect AWS credentials can lead to severe consequences, including data exfiltration, resource hijacking, and compliance violations.

Attribute Value
Impact Medium
Likelihood Medium

Remediation

Hardcoding AWS credentials into an application poses a significant security risk. If the application's code is compromised or accidentally exposed, the hardcoded credentials can be easily extracted and misused by attackers to gain unauthorized access to AWS resources, potentially leading to data breaches, financial losses, and other severe consequences.

To fix this issue securely, applications should retrieve AWS credentials from secure sources at runtime, such as environment variables, AWS credential files, or AWS credential providers. This approach ensures that credentials are not embedded in the application's code and can be easily rotated or revoked if needed.

Code examples

// VULNERABLE CODE - Hardcoded AWS credentials
import (
    "github.com/aws/aws-sdk-go-v2/aws"
    "github.com/aws/aws-sdk-go-v2/credentials"
)

creds := credentials.NewStaticCredentialsProvider(
    "AKIAIOSFODNN7EXAMPLE",
    "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
    "",
)
// SECURE CODE - Using AWS credential provider
import (
    "github.com/aws/aws-sdk-go-v2/config"
)

cfg, err := config.LoadDefaultConfig(context.TODO())
if err != nil {
    // Handle error
}

// AWS credentials are retrieved securely from the environment or other sources

Additional recommendations

  • Follow the AWS best practices for managing AWS access keys and secret access keys.
  • Implement least privilege access principles by granting only the necessary permissions to AWS resources.
  • Regularly rotate AWS credentials and revoke unused or compromised credentials.
  • Consider using temporary security credentials (AWS STS) for enhanced security and auditing capabilities.
  • Adhere to relevant security standards and guidelines, such as the AWS Security Best Practices and the OWASP Application Security Verification Standard (ASVS).

Rule ID: WS-GO-00051


To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).


To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

// Only set static credentials if both access key and secret key are provided
// Otherwise, let AWS SDK use its default credential chain
if d.cfg.AccessKey != "" && d.cfg.SecretKey != "" {
credProvider := credentials.NewStaticCredentialsProvider(d.cfg.AccessKey, string(d.cfg.SecretKey), "")

ghost Jul 9, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Medium SAST Finding

Hardcoded AWS Credentials in Go Application

More Details

Embedding static AWS credentials directly into a Go application using the credentials.NewStaticCredentialsProvider function poses a significant security risk. This practice exposes the AWS access keys and secret keys in plaintext within the application code, making them vulnerable to theft or misuse. If an attacker gains access to the application code or the compiled binary, they can extract the hardcoded credentials and potentially gain unauthorized access to AWS resources, leading to data breaches, financial losses, or other malicious activities.

Hardcoded credentials should never be used in production environments. Instead, applications should retrieve credentials securely from trusted sources, such as environment variables, secure key management services, or temporary credentials obtained through AWS Identity and Access Management (IAM) roles. Failing to properly manage and protect AWS credentials can lead to severe consequences, including data exfiltration, resource hijacking, and compliance violations.

Attribute Value
Impact Medium
Likelihood Medium

Remediation

Hardcoding AWS credentials into an application poses a significant security risk. If the application's code is compromised or accidentally exposed, the hardcoded credentials can be easily extracted and misused by attackers to gain unauthorized access to AWS resources, potentially leading to data breaches, financial losses, and other severe consequences.

To fix this issue securely, applications should retrieve AWS credentials from secure sources at runtime, such as environment variables, AWS credential files, or AWS credential providers. This approach ensures that credentials are not embedded in the application's code and can be easily rotated or revoked if needed.

Code examples

// VULNERABLE CODE - Hardcoded AWS credentials
import (
    "github.com/aws/aws-sdk-go-v2/aws"
    "github.com/aws/aws-sdk-go-v2/credentials"
)

creds := credentials.NewStaticCredentialsProvider(
    "AKIAIOSFODNN7EXAMPLE",
    "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
    "",
)
// SECURE CODE - Using AWS credential provider
import (
    "github.com/aws/aws-sdk-go-v2/config"
)

cfg, err := config.LoadDefaultConfig(context.TODO())
if err != nil {
    // Handle error
}

// AWS credentials are retrieved securely from the environment or other sources

Additional recommendations

  • Follow the AWS best practices for managing AWS access keys and secret access keys.
  • Implement least privilege access principles by granting only the necessary permissions to AWS resources.
  • Regularly rotate AWS credentials and revoke unused or compromised credentials.
  • Consider using temporary security credentials (AWS STS) for enhanced security and auditing capabilities.
  • Adhere to relevant security standards and guidelines, such as the AWS Security Best Practices and the OWASP Application Security Verification Standard (ASVS).

Rule ID: WS-GO-00051


To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).


To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

// Only set static credentials if both access key and secret key are provided.
// Otherwise, let the AWS SDK use its default credential chain (environment variables, IAM role, etc.).
if d.cfg.AccessKey != "" && d.cfg.SecretKey != "" {
credProvider := credentials.NewStaticCredentialsProvider(d.cfg.AccessKey, string(d.cfg.SecretKey), "")

ghost Jul 9, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Medium SAST Finding

Hardcoded AWS Credentials in Go Application

More Details

Embedding static AWS credentials directly into a Go application using the credentials.NewStaticCredentialsProvider function poses a significant security risk. This practice exposes the AWS access keys and secret keys in plaintext within the application code, making them vulnerable to theft or misuse. If an attacker gains access to the application code or the compiled binary, they can extract the hardcoded credentials and potentially gain unauthorized access to AWS resources, leading to data breaches, financial losses, or other malicious activities.

Hardcoded credentials should never be used in production environments. Instead, applications should retrieve credentials securely from trusted sources, such as environment variables, secure key management services, or temporary credentials obtained through AWS Identity and Access Management (IAM) roles. Failing to properly manage and protect AWS credentials can lead to severe consequences, including data exfiltration, resource hijacking, and compliance violations.

Attribute Value
Impact Medium
Likelihood Medium

Remediation

Hardcoding AWS credentials into an application poses a significant security risk. If the application's code is compromised or accidentally exposed, the hardcoded credentials can be easily extracted and misused by attackers to gain unauthorized access to AWS resources, potentially leading to data breaches, financial losses, and other severe consequences.

To fix this issue securely, applications should retrieve AWS credentials from secure sources at runtime, such as environment variables, AWS credential files, or AWS credential providers. This approach ensures that credentials are not embedded in the application's code and can be easily rotated or revoked if needed.

Code examples

// VULNERABLE CODE - Hardcoded AWS credentials
import (
    "github.com/aws/aws-sdk-go-v2/aws"
    "github.com/aws/aws-sdk-go-v2/credentials"
)

creds := credentials.NewStaticCredentialsProvider(
    "AKIAIOSFODNN7EXAMPLE",
    "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
    "",
)
// SECURE CODE - Using AWS credential provider
import (
    "github.com/aws/aws-sdk-go-v2/config"
)

cfg, err := config.LoadDefaultConfig(context.TODO())
if err != nil {
    // Handle error
}

// AWS credentials are retrieved securely from the environment or other sources

Additional recommendations

  • Follow the AWS best practices for managing AWS access keys and secret access keys.
  • Implement least privilege access principles by granting only the necessary permissions to AWS resources.
  • Regularly rotate AWS credentials and revoke unused or compromised credentials.
  • Consider using temporary security credentials (AWS STS) for enhanced security and auditing capabilities.
  • Adhere to relevant security standards and guidelines, such as the AWS Security Best Practices and the OWASP Application Security Verification Standard (ASVS).

Rule ID: WS-GO-00051


To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).


To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate


// Matches complete PromQL durations, including compound units (e.g., 5m, 1d2h, 1h30m, etc.).
// Duration units are a fixed, safe set (no regex metacharacters), so no escaping is needed.
export const durationWithUnitRegexp = new RegExp(`^(\\d+(${durationTerms.map((term) => term.label).join('|')}))+$`);

ghost Jul 9, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Medium SAST Finding

Non-literal regular expression usage leading to ReDoS vulnerability (CWE-185)

More Details

This rule detects the usage of non-literal regular expressions in JavaScript or TypeScript code. When a regular expression is constructed from user input or other non-literal sources, it can potentially lead to a Regular Expression Denial of Service (ReDoS) vulnerability. ReDoS attacks exploit the way certain regular expressions are processed, causing them to consume an excessive amount of resources and potentially causing the application to become unresponsive or crash.

The security risk lies in the potential for an attacker to craft a malicious regular expression that triggers catastrophic backtracking, leading to a denial of service condition. This could render the application unavailable to other users, causing disruption and potentially enabling further attacks. ReDoS vulnerabilities are particularly concerning in server-side applications where regular expressions are used to process untrusted input.

Attribute Value
Impact Medium
Likelihood Medium

Remediation

Regular expressions constructed from user input or other non-literal sources can lead to a Regular Expression Denial of Service (ReDoS) vulnerability. ReDoS attacks exploit the way certain regular expressions are processed, causing them to consume an excessive amount of resources and potentially causing the application to become unresponsive or crash. This vulnerability can be exploited by an attacker to craft a malicious regular expression that triggers catastrophic backtracking, leading to a denial of service condition and rendering the application unavailable to other users.

To mitigate this vulnerability, it is recommended to use literal regular expressions or to validate and sanitize user input before constructing regular expressions. If user input must be used to construct regular expressions, it is crucial to implement proper input validation and sanitization to prevent malicious input from being used in the regular expression.

Code examples

// VULNERABLE CODE - Regular expression constructed from user input
const userInput = getUserInput(); // Untrusted user input
const regex = new RegExp(userInput);
// SECURE CODE - Using a literal regular expression
const regex = /^[a-zA-Z0-9]+$/;
// SECURE CODE - Validating and sanitizing user input before constructing regular expression
const userInput = getUserInput();
const sanitizedInput = sanitizeInput(userInput); // Implement input validation and sanitization
const regex = new RegExp(sanitizedInput);

Additional recommendations

  • Follow the principle of least privilege and only use regular expressions when necessary.
  • Implement input validation and sanitization for all user input used in regular expressions.
  • Consider using a safe regular expression library or engine that is designed to mitigate ReDoS vulnerabilities.
  • Adhere to the OWASP Injection Prevention Cheat Sheet and other relevant security standards.
  • If user input must be used in regular expressions, consider alternative approaches such as using a whitelist of allowed patterns or splitting the input into smaller chunks before processing.

Rule ID: WS-I011-JAVASCRIPT-00003


To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).


To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

Comment thread web/web.go
})
if !o.UseOldUI {
router.Get("/graph", func(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, path.Join(o.ExternalURL.Path, "/query?"+r.URL.RawQuery), http.StatusFound)

ghost Jul 9, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Medium SAST Finding

Open Redirect Vulnerability (CWE-601)

More Details

The rule detects instances where user-supplied input is used to construct a URL for an HTTP redirect. This can lead to an open redirect vulnerability, which allows an attacker to redirect users to a malicious website.

Attribute Value
Impact Medium
Likelihood Medium

Remediation

The open redirect vulnerability allows an attacker to redirect a user to a malicious website, potentially leading to phishing attacks, malware distribution, or other malicious activities. This vulnerability occurs when user-controlled input is used to construct the redirect URL without proper validation.

To fix this issue, it is recommended to avoid using user-controlled input to construct redirect URLs whenever possible. Instead, use a predefined list of allowed redirect URLs or a whitelist of trusted domains. If user input is required, implement strict validation and sanitization of the input before using it to construct the redirect URL.

Code examples

// VULNERABLE CODE - User input is used directly to construct the redirect URL
func handleRedirect(w http.ResponseWriter, r *http.Request) {
    redirectURL := r.FormValue("redirect_url")
    http.Redirect(w, r, redirectURL, http.StatusFound)
}
// SECURE CODE - Redirect URL is validated against a whitelist of trusted domains
func handleRedirect(w http.ResponseWriter, r *http.Request) {
    redirectURL := r.FormValue("redirect_url")
    if isValidRedirectURL(redirectURL) {
        http.Redirect(w, r, redirectURL, http.StatusFound)
    } else {
        // Handle invalid redirect URL
    }
}

func isValidRedirectURL(url string) bool {
    // Implement validation logic here, e.g., check against a whitelist of trusted domains
    // Return true if the URL is valid, false otherwise
}

Additional recommendations

  • Follow the OWASP Unvalidated Redirects and Forwards Cheat Sheet for best practices.
  • Implement strict input validation and sanitization for all user-controlled input.
  • Consider using a third-party library or framework that provides built-in protection against open redirect vulnerabilities.
  • Regularly update and maintain the whitelist of trusted domains.
  • Implement logging and monitoring to detect and respond to potential attacks.
  • Adhere to relevant security standards, such as the OWASP Top 10 and the OWASP Application Security Verification Standard (ASVS).

Rule ID: WS-I013-GO-00057


To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).


To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

github.com/influxdata/influxdb-client-go/v2 v2.14.0
github.com/prometheus/client_golang v1.23.2
github.com/prometheus/common v0.69.0
github.com/prometheus/prometheus v0.308.1

ghost Jul 9, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

High Vulnerability Finding

The following vulnerabilities impact github.com/prometheus/prometheus versions <0.311.3: CVE-2026-40179, CVE-2026-42151, CVE-2026-42154, CVE-2026-44903.

These can be remediated by updating to version 0.311.3 or higher.

To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).

To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

Suggested change
github.com/prometheus/prometheus v0.308.1
github.com/prometheus/prometheus v0.311.3

Comment thread compliance/go.mod
github.com/prometheus/client_golang/exp v0.0.0-20260602051030-3537b20ac86b // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.69.0 // indirect
github.com/prometheus/prometheus v0.307.4-0.20251119130332-1174b0ce4f1f // indirect

ghost Jul 9, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

High Vulnerability Finding

The following vulnerabilities impact github.com/prometheus/prometheus versions <0.311.3: CVE-2026-40179, CVE-2026-42151, CVE-2026-42154, CVE-2026-44903.

These can be remediated by updating to version 0.311.3 or higher.

To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).

To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

Suggested change
github.com/prometheus/prometheus v0.307.4-0.20251119130332-1174b0ce4f1f // indirect
github.com/prometheus/prometheus v0.311.3 // indirect

Comment thread discovery/aws/ec2.go
// Only set static credentials if both access key and secret key are provided.
// Otherwise, let the AWS SDK use its default credential chain (environment variables, IAM role, etc.).
if d.cfg.AccessKey != "" && d.cfg.SecretKey != "" {
credProvider := credentials.NewStaticCredentialsProvider(d.cfg.AccessKey, string(d.cfg.SecretKey), "")

ghost Jul 9, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Medium SAST Finding

Hardcoded AWS Credentials in Go Application

More Details

Embedding static AWS credentials directly into a Go application using the credentials.NewStaticCredentialsProvider function poses a significant security risk. This practice exposes the AWS access keys and secret keys in plaintext within the application code, making them vulnerable to theft or misuse. If an attacker gains access to the application code or the compiled binary, they can extract the hardcoded credentials and potentially gain unauthorized access to AWS resources, leading to data breaches, financial losses, or other malicious activities.

Hardcoded credentials should never be used in production environments. Instead, applications should retrieve credentials securely from trusted sources, such as environment variables, secure key management services, or temporary credentials obtained through AWS Identity and Access Management (IAM) roles. Failing to properly manage and protect AWS credentials can lead to severe consequences, including data exfiltration, resource hijacking, and compliance violations.

Attribute Value
Impact Medium
Likelihood Medium

Remediation

Hardcoding AWS credentials into an application poses a significant security risk. If the application's code is compromised or accidentally exposed, the hardcoded credentials can be easily extracted and misused by attackers to gain unauthorized access to AWS resources, potentially leading to data breaches, financial losses, and other severe consequences.

To fix this issue securely, applications should retrieve AWS credentials from secure sources at runtime, such as environment variables, AWS credential files, or AWS credential providers. This approach ensures that credentials are not embedded in the application's code and can be easily rotated or revoked if needed.

Code examples

// VULNERABLE CODE - Hardcoded AWS credentials
import (
    "github.com/aws/aws-sdk-go-v2/aws"
    "github.com/aws/aws-sdk-go-v2/credentials"
)

creds := credentials.NewStaticCredentialsProvider(
    "AKIAIOSFODNN7EXAMPLE",
    "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
    "",
)
// SECURE CODE - Using AWS credential provider
import (
    "github.com/aws/aws-sdk-go-v2/config"
)

cfg, err := config.LoadDefaultConfig(context.TODO())
if err != nil {
    // Handle error
}

// AWS credentials are retrieved securely from the environment or other sources

Additional recommendations

  • Follow the AWS best practices for managing AWS access keys and secret access keys.
  • Implement least privilege access principles by granting only the necessary permissions to AWS resources.
  • Regularly rotate AWS credentials and revoke unused or compromised credentials.
  • Consider using temporary security credentials (AWS STS) for enhanced security and auditing capabilities.
  • Adhere to relevant security standards and guidelines, such as the AWS Security Best Practices and the OWASP Application Security Verification Standard (ASVS).

Rule ID: WS-GO-00051


To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).


To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

Comment thread discovery/aws/ecs.go
// Only set static credentials if both access key and secret key are provided
// Otherwise, let AWS SDK use its default credential chain
if d.cfg.AccessKey != "" && d.cfg.SecretKey != "" {
credProvider := credentials.NewStaticCredentialsProvider(d.cfg.AccessKey, string(d.cfg.SecretKey), "")

ghost Jul 9, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Medium SAST Finding

Hardcoded AWS Credentials in Go Application

More Details

Embedding static AWS credentials directly into a Go application using the credentials.NewStaticCredentialsProvider function poses a significant security risk. This practice exposes the AWS access keys and secret keys in plaintext within the application code, making them vulnerable to theft or misuse. If an attacker gains access to the application code or the compiled binary, they can extract the hardcoded credentials and potentially gain unauthorized access to AWS resources, leading to data breaches, financial losses, or other malicious activities.

Hardcoded credentials should never be used in production environments. Instead, applications should retrieve credentials securely from trusted sources, such as environment variables, secure key management services, or temporary credentials obtained through AWS Identity and Access Management (IAM) roles. Failing to properly manage and protect AWS credentials can lead to severe consequences, including data exfiltration, resource hijacking, and compliance violations.

Attribute Value
Impact Medium
Likelihood Medium

Remediation

Hardcoding AWS credentials into an application poses a significant security risk. If the application's code is compromised or accidentally exposed, the hardcoded credentials can be easily extracted and misused by attackers to gain unauthorized access to AWS resources, potentially leading to data breaches, financial losses, and other severe consequences.

To fix this issue securely, applications should retrieve AWS credentials from secure sources at runtime, such as environment variables, AWS credential files, or AWS credential providers. This approach ensures that credentials are not embedded in the application's code and can be easily rotated or revoked if needed.

Code examples

// VULNERABLE CODE - Hardcoded AWS credentials
import (
    "github.com/aws/aws-sdk-go-v2/aws"
    "github.com/aws/aws-sdk-go-v2/credentials"
)

creds := credentials.NewStaticCredentialsProvider(
    "AKIAIOSFODNN7EXAMPLE",
    "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
    "",
)
// SECURE CODE - Using AWS credential provider
import (
    "github.com/aws/aws-sdk-go-v2/config"
)

cfg, err := config.LoadDefaultConfig(context.TODO())
if err != nil {
    // Handle error
}

// AWS credentials are retrieved securely from the environment or other sources

Additional recommendations

  • Follow the AWS best practices for managing AWS access keys and secret access keys.
  • Implement least privilege access principles by granting only the necessary permissions to AWS resources.
  • Regularly rotate AWS credentials and revoke unused or compromised credentials.
  • Consider using temporary security credentials (AWS STS) for enhanced security and auditing capabilities.
  • Adhere to relevant security standards and guidelines, such as the AWS Security Best Practices and the OWASP Application Security Verification Standard (ASVS).

Rule ID: WS-GO-00051


To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).


To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

George Krajcsovits and others added 3 commits July 9, 2026 08:18
…s-matrix-speedup

ci: run version upgrade test as a per-LTS matrix
…134-head-chunk-cache

tsdb: fix stale head-chunk cache after head-chunk truncation (prometheus#19134)
György Krajcsovits and others added 2 commits July 10, 2026 08:27
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
chore: prep release 3.13.1 with tsdb related fix
Akshaj Rawat and others added 12 commits July 29, 2026 06:55
Signed-off-by: Akshaj Rawat <akshajr11@gmail.com>
(cherry picked from commit 5d82387)
Signed-off-by: Akshaj Rawat <akshajr11@gmail.com>
(cherry picked from commit 98075ce)
Signed-off-by: Akshaj Rawat <akshajr11@gmail.com>
(cherry picked from commit 6c25f01)
Fixes a HIGH severity vulnerability where a norm.Iter can enter an
infinite loop when handling certain input.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
)

Fixes gRPC-Go xDS RBAC and HTTP/2 vulnerabilities.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
…092-query-logger-sigbus

promql: avoid SIGBUS by explicitly allocating active query log file (prometheus#19092)
…mp-x-text-grpc

build(deps): bump x/text and grpc to fix trivy-reported CVEs
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
…-chglog

chore: prepare 3.13.2 changelog
Co-authored-by: Cursor <cursoragent@cursor.com>
"downshift": "^9.0.6",
"http-proxy-middleware": "^3.0.0",
"downshift": "^9.3.6",
"http-proxy-middleware": "^3.0.6",

ghost Aug 31, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

High Vulnerability Finding

The following vulnerability impacts http-proxy-middleware versions <3.0.7: CVE-2026-55603.

It can be remediated by updating to version 3.0.7 or higher.

To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).

To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

Suggested change
"http-proxy-middleware": "^3.0.6",
"http-proxy-middleware": "3.0.7",

* Port xrate/yrate family and REPLACE_RATE_FUNCS to Prometheus 3.13.

Re-introduce ExtRange engine support and the x/y rate function implementations
so staging can eventually move to 3.x with the same rate semantics as 2.55.1.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Use triangular showcase counter to expose boundary and origin bugs.

Sync the rate-vs-xrate showcase /bar series with the 2.55 yrate stack: 11
points with deltas +1..+10 starting at 11, and refresh xrate/yrate expectations.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Use incrementing-delta test series beyond the rate showcase.

Replace linear additivity and ydelta fixtures with counters whose per-step
delta grows by 1, starting at max_delta+1 so origin-offset bugs cannot hide
behind a repeated +1 or +10 step. Refresh ydelta and yincrease expectations.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Simplify additivity_reset_late scenario comment.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Consolidate REPLACE_RATE_FUNCS parser/function repoint helpers

Mirror the refactor from invoca-2.55.1/replace-rate-funcs-keep-orig:
unify preserve/repoint helpers into replaceStandardRateFuncs with
setParserFunctionFrom and setFunctionCallFrom.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Split xrate and yrate into separate promql files

Rename preRangeExtrapolation to extendedXRate (2.55.1 extendedRate lineage)
in extended_xrate_funcs.go. Move yrate helpers and REPLACE_RATE_FUNCS init
to yrate_funcs.go so xrate support can be dropped independently.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Update yrate vs xrate showcase comment wording

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix punctuation in ExtRange lookback comment

Co-authored-by: Cursor <cursoragent@cursor.com>

* Move REPLACE_RATE_FUNCS init to replace_rate_funcs.go

Pair with replace_rate_funcs_test.go. yrate_funcs init registers y* names
then calls initReplaceRateFuncs so x* and y* are both available first.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Trim showcase comment in functions.test

Remove parenthetical about plain 1 2 3 ladder from /bar series comment.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Update test comments

Co-authored-by: Cursor <cursoragent@cursor.com>

* Add license header to replace_rate_funcs_test.go

Satisfy the required Apache header check in GHA.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Update features.json golden for xrate/yrate family.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Regenerate PromQL UI function signatures for xrate/yrate family.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread internal/tools/go.mod
golang.org/x/time v0.15.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260615183401-62b3387ff324 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260610212136-7ab31c22f7ad // indirect
google.golang.org/grpc v1.81.1 // indirect

ghost Sep 18, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

High Vulnerability Finding

The following vulnerabilities impact google.golang.org/grpc versions <1.83.1: CVE-2026-84303, CVE-2026-84304, CVE-2026-84445, GHSA-hrxh-6v49-42gf.

These can be remediated by updating to version 1.83.1 or higher.

To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).

To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

Suggested change
google.golang.org/grpc v1.81.1 // indirect
google.golang.org/grpc v1.83.1 // indirect

google.golang.org/api v0.278.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260615183401-62b3387ff324 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260610212136-7ab31c22f7ad // indirect
google.golang.org/grpc v1.81.1 // indirect

ghost Sep 18, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

High Vulnerability Finding

The following vulnerabilities impact google.golang.org/grpc versions <1.83.1: CVE-2026-84303, CVE-2026-84304, CVE-2026-84445, GHSA-hrxh-6v49-42gf.

These can be remediated by updating to version 1.83.1 or higher.

To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).

To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

Suggested change
google.golang.org/grpc v1.81.1 // indirect
google.golang.org/grpc v1.83.1 // indirect

golang.org/x/text v0.38.0 // indirect
google.golang.org/api v0.278.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260610212136-7ab31c22f7ad // indirect
google.golang.org/grpc v1.81.1 // indirect

ghost Sep 18, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

High Vulnerability Finding

The following vulnerabilities impact google.golang.org/grpc versions <1.83.1: CVE-2026-84303, CVE-2026-84304, CVE-2026-84445, GHSA-hrxh-6v49-42gf.

These can be remediated by updating to version 1.83.1 or higher.

To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).

To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

Suggested change
google.golang.org/grpc v1.81.1 // indirect
google.golang.org/grpc v1.83.1 // indirect

Comment thread Dockerfile.distroless
ARG DISTROLESS_ARCH="amd64"

# Use DISTROLESS_ARCH for base image selection (handles armv7->arm mapping).
FROM gcr.io/distroless/static-debian13:nonroot-${DISTROLESS_ARCH}

ghost Sep 18, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

High IaC Finding

Missing User Instruction

More Details
This rule checks whether a `USER` instruction is specified in the Dockerfile. The rule fails when the `USER` instruction is missing, causing the container to run with root privileges (UID 0). If an attacker compromises an application running as root, they gain the privileges needed to potentially escape the container and attack the host node. It also increases the blast radius of a breach, allowing full control to modify files or install malware within the container. Enforcing a non-root user is a fundamental security measure that minimizes the attack surface and contains the impact of a potential compromise.

Expected

The Dockerfile stage should contain the 'USER' instruction

Found

The Dockerfile stage does not contain any 'USER' instruction

Security Frameworks: wf-id-264


Rule ID: fb18fd60-ca0d-4e75-98f1-720a8ec407d0


To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).


To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

…se (#37)

* Port xrate/yrate family and REPLACE_RATE_FUNCS to Prometheus 3.13.

Re-introduce ExtRange engine support and the x/y rate function implementations
so staging can eventually move to 3.x with the same rate semantics as 2.55.1.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Use triangular showcase counter to expose boundary and origin bugs.

Sync the rate-vs-xrate showcase /bar series with the 2.55 yrate stack: 11
points with deltas +1..+10 starting at 11, and refresh xrate/yrate expectations.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Use incrementing-delta test series beyond the rate showcase.

Replace linear additivity and ydelta fixtures with counters whose per-step
delta grows by 1, starting at max_delta+1 so origin-offset bugs cannot hide
behind a repeated +1 or +10 step. Refresh ydelta and yincrease expectations.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Simplify additivity_reset_late scenario comment.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Consolidate REPLACE_RATE_FUNCS parser/function repoint helpers

Mirror the refactor from invoca-2.55.1/replace-rate-funcs-keep-orig:
unify preserve/repoint helpers into replaceStandardRateFuncs with
setParserFunctionFrom and setFunctionCallFrom.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Split xrate and yrate into separate promql files

Rename preRangeExtrapolation to extendedXRate (2.55.1 extendedRate lineage)
in extended_xrate_funcs.go. Move yrate helpers and REPLACE_RATE_FUNCS init
to yrate_funcs.go so xrate support can be dropped independently.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Update yrate vs xrate showcase comment wording

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix punctuation in ExtRange lookback comment

Co-authored-by: Cursor <cursoragent@cursor.com>

* Move REPLACE_RATE_FUNCS init to replace_rate_funcs.go

Pair with replace_rate_funcs_test.go. yrate_funcs init registers y* names
then calls initReplaceRateFuncs so x* and y* are both available first.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Trim showcase comment in functions.test

Remove parenthetical about plain 1 2 3 ladder from /bar series comment.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Update test comments

Co-authored-by: Cursor <cursoragent@cursor.com>

* Add license header to replace_rate_funcs_test.go

Satisfy the required Apache header check in GHA.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Update features.json golden for xrate/yrate family.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Regenerate PromQL UI function signatures for xrate/yrate family.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Remove xrate/xincrease/xdelta and their REPLACE_RATE_FUNCS modes.

Keep only the yrate family and REPLACE_RATE_FUNCS=2/y/Y for swapping
standard rate/increase/delta.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Regenerate PromQL UI function signatures for the yrate family.

make check-generated-promql-functions requires functionSignatures.ts to
match parser.Functions after dropping xrate.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Drop xrate family from features.json golden file.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Add start timestamp support to yrate/yincrease (#32)

* Collect StartTimestamps for direct yrate/yincrease calls

Extend the engine function-name gate so ST slices are allocated when
yrate or yincrease is invoked directly, not only via REPLACE_RATE_FUNCS=2.

Co-authored-by: Cursor <cursoragent@cursor.com>

* promql: use start timestamps in yrate functions

Thread aligned start timestamps into yIncrease so yrate and yincrease can detect fresh starts and epoch resets that value drops alone miss.

Signed-off-by: Colin Kelley <colin@invoca.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* promql: add yrate start timestamp promqltests

Signed-off-by: Colin Kelley <colin@invoca.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* Refine yIncrease ST reset handling and lock in first-in-range cases.

When start timestamps are present, skip implied zero-origin; treat value
drops and in-window ST changes as resets; and cover the first-in-range
reset matrix including a lone ST-reset sample.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Use a triangular series in yrate start-timestamp promqltests.

Constant steps can mask boundary and off-by-one mistakes; deltas +1..+4
make expected increases easier to verify by hand.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Clarify yrate start-timestamp promqltest header comments.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Drop 'in-window' from yrate ST reset comment.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Drop redundant empty-range comment from yIncrease.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Clarify coverage scope at top of yrate ST test files.

Co-authored-by: Cursor <cursoragent@cursor.com>

* build: add Invoca Dockerfile and Buildkite pipeline (#34)

* build: add Invoca Dockerfile and Buildkite pipeline

Self-contained multi-stage Dockerfile.invoca (Go 1.26 compile + busybox
runtime) and Buildkite pipeline that pushes to invocaops/prometheus with
commit SHA and branch-safe tags via buildkit-daemonless.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Shannon Price <sprice@invoca.com>

* build: fix Go version, missing pnpm, and pipeline escaping in Dockerfile.invoca

Dockerfile.invoca pinned golang:1.26, copied from the thanos fork's
Dockerfile, but this repo's go.mod declares go 1.25.0 — use golang:1.25
instead. It also never installed pnpm, so `make build`'s ui-install step
(`pnpm install`) failed; add corepack-activated pnpm@11 to match the
version pinned by .github/workflows/ci.yml, and pin the Node major
version to web/ui/.nvmrc instead of floating on setup_lts.x.

Also bring .buildkite/pipeline.yml's buildctl-daemonless command in line
with every other buildkit-daemonless pipeline in the org (docker-base,
mysql-anonymizer, invoca-metrics): a commands: list with the --output
type=image,... quotes/vars backslash-escaped, rather than an unescaped
singular command: block.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Shannon Price <sprice@invoca.com>

* build: drop removed consoles/console_libraries from Dockerfile.invoca

Upstream removed the console example files (ceb844a, "Remove console
static files", prometheus#14807) as part of the v3.13.2 LTS merge-up, so `make
build` no longer produces /build/consoles or /build/console_libraries.
Dockerfile.invoca still copied them, breaking the image build. Drop
those COPY lines and the console_libraries symlink, matching the
upstream root Dockerfile, which no longer references them either.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Shannon Price <sprice@invoca.com>

* build: pin Dockerfile.invoca dependencies per GHAS/Wiz scorecard findings

Addresses automated security findings on PR #34:
- Pin golang:1.25 and quay.io/prometheus/busybox-linux-amd64:latest by
  digest (GHAS Scorecard: containerImage not pinned by hash).
- Download the NodeSource setup script to a file, verify its SHA-256
  checksum, then execute it, instead of piping curl straight to bash
  (GHAS Scorecard: downloadThenRun not pinned by hash).
- Pin nodejs and build-essential to the exact apt package versions
  already observed in a successful build (Wiz: Apt Get Install Pin
  Version Not Defined).
- Pin corepack's pnpm activation to the exact resolved version 11.25.0
  instead of floating on the major version 11 (matches the busybox
  image's tag, which has no versioned alternative to 'latest' upstream
  — corepack's packageManager-field integrity-hash suffix is no longer
  accepted by the current corepack CLI, so an exact version pin is the
  available mitigation).

Confirmed locally: the build still progresses through the pinned/
verified steps into the Go compile and UI build stage unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Shannon Price <sprice@invoca.com>

---------

Signed-off-by: Shannon Price <sprice@invoca.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

---------

Signed-off-by: Colin Kelley <colin@invoca.com>
Signed-off-by: Shannon Price <sprice@invoca.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Shannon Price <github@sprice.me>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* build: bump stale busybox base image digest in Dockerfile.invoca (#36)

quay.io repointed the busybox-linux-amd64:latest tag to a new digest;
the old pinned digest was garbage-collected and image builds started
failing with 'not found'. Bump to the current digest for :latest.

Signed-off-by: Shannon Price <sprice@invoca.com>

* ci: bump test_go_oldest to Go 1.26 base image

scripts/check-go-mod-version.sh requires test_go_oldest to match the oldest Go minor still listed on go.dev, which is now 1.26. Unblocks the post-test gate on PR 37.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Signed-off-by: Colin Kelley <colin@invoca.com>
Signed-off-by: Shannon Price <sprice@invoca.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Shannon Price <github@sprice.me>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread Dockerfile.invoca
COPY . .
RUN make build

FROM quay.io/prometheus/busybox-linux-amd64:latest@sha256:267c901b759acf876e23c8d36eb9e50315f7b795d651dc4062d0d02151698e25

ghost Sep 22, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Medium IaC Finding

Image Version Using 'latest'

More Details
When building images, always tag them with useful tags which codify version information, intended destination (prod or test, for instance), stability, or other information that is useful when deploying the application in different environments. Do not rely on the automatically-created latest tag

Expected

FROM quay.io/prometheus/busybox-linux-amd64:latest@sha256:267c901b759acf876e23c8d36eb9e50315f7b795d651dc4062d0d02151698e25 should use a specific version instead of 'latest'

Found

FROM quay.io/prometheus/busybox-linux-amd64:latest@sha256:267c901b759acf876e23c8d36eb9e50315f7b795d651dc4062d0d02151698e25 uses the 'latest' tag

Rule ID: 91ba29eb-0fe8-4885-9fd8-7f3667a8b689


To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).


To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

Comment thread tsdb/head_wal.go
}

path := filepath.Join(h.wal.Dir(), seriesStateFilename)
f, err := os.Open(path)

ghost Sep 22, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Medium SAST Finding

Improper Path Validation in File Operations (CWE-22)

More Details

This vulnerability arises when an application fails to properly validate file paths or filenames before performing operations on them. If user input is used to construct file paths or filenames without proper sanitization, an attacker could exploit this vulnerability to access unauthorized files or directories on the system.

The consequences of this vulnerability can be severe, as it may allow an attacker to read sensitive data, overwrite critical system files, or even gain elevated privileges on the system. Path traversal attacks, where an attacker attempts to access files outside the intended directory, are a common exploitation technique for this vulnerability.

To mitigate this risk, it is crucial to validate and sanitize all user input used in file operations. This includes properly handling directory separators, removing any path traversal sequences, and restricting access to only the intended directories. Additionally, it is recommended to use a whitelist approach, where only a predefined set of safe paths or filenames are allowed.

Attribute Value
Impact Medium
Likelihood Medium

Remediation

This vulnerability arises when an application fails to properly validate and sanitize user-supplied file paths or filenames before performing file operations. If an attacker can control the file path or filename, they may be able to access unauthorized files or directories on the system, potentially leading to data breaches, system compromise, or privilege escalation.

To mitigate this vulnerability, it is crucial to validate and sanitize all user input used in file operations. This includes properly handling directory separators, removing any path traversal sequences, and restricting access to only the intended directories. It is recommended to use a whitelist approach, where only a predefined set of safe paths or filenames are allowed.

Code examples

// VULNERABLE CODE - User input is used directly in file operations without validation
func handleRequest(r *http.Request) {
    filename := r.URL.Query().Get("file")
    data, err := os.ReadFile(filename)
    // ...
}
// SECURE CODE - User input is validated and sanitized before file operations
import (
    "path/filepath"
    "strings"
)

func handleRequest(r *http.Request) {
    filename := r.URL.Query().Get("file")
    cleanPath := filepath.Clean(filename)
    if !strings.HasPrefix(cleanPath, "/safe/directory/") {
        // Reject the request if the path is not within the allowed directory
        http.Error(w, "Invalid file path", http.StatusBadRequest)
        return
    }
    data, err := os.ReadFile(cleanPath)
    // ...
}

Additional recommendations

  • Use a whitelist approach to restrict file operations to a predefined set of safe paths or filenames.
  • Implement strict input validation and sanitization for all user-supplied data used in file operations.
  • Follow the principle of least privilege and restrict file access permissions as much as possible.
  • Regularly update and patch your software to address known vulnerabilities.
  • Adhere to security best practices and standards, such as the OWASP Top 10 and CWE-22 (Improper Limitation of a Pathname to a Restricted Directory).
  • Consider using secure coding libraries or frameworks that provide built-in protection against path traversal vulnerabilities.

Rule ID: WS-I011-GO-00013


To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).


To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.