Skip to content

Conversation

@benjamin-awd
Copy link
Contributor

Summary

This PR adds redaction for sensitive headers within the http_request function.

Currently, sensitive information can be leaked at runtime when the function fails:

function call error for "http_request" at (4:263): HTTP request failed: Request failed after 3 
  retries (url: http://127.0.0.1:1/test, method: GET, headers: { "Authorization": "Bearer 
  secret_12345", "Content-Type": "application/json", "X-Api-Key": "key-67890" })

With the changes within this PR:

  function call error for "http_request" at (4:263): HTTP request failed: Request failed after 3 
  retries (url: http://127.0.0.1:1/test, method: GET, headers: { "Authorization": "***", 
  "Content-Type": "application/json", "X-Api-Key": "***" })

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

How did you test this PR?

Unit tests

Run VRL binary locally:
./target/debug/vrl

$ . = http_request!("http://127.0.0.1:1/test",
    method: "GET",
    headers: {
        "Authorization": "Bearer secret_12345",
        "X-Api-Key": "key-67890",
        "Content-Type": "application/json"
    }
)
function call error for "http_request" at (4:211): HTTP request failed: 
Request failed after 3 retries (url: http://127.0.0.1:1/test, method: GET, headers: 
{ "Authorization": "***", "Content-Type": "application/json", "X-Api-Key": "***" })

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on
    our guidelines.
  • No. A maintainer will apply the "no-changelog" label to this PR.

Checklist

  • Our CONTRIBUTING.md is a good starting place.
  • If this PR introduces changes to LICENSE-3rdparty.csv, please
    run dd-rust-license-tool write and commit the changes. More details here.
  • For new VRL functions, please also create a sibling PR in Vector to document the new function.

References

@benjamin-awd benjamin-awd requested a review from a team as a code owner November 24, 2025 05:54
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.

1 participant