-
Notifications
You must be signed in to change notification settings - Fork 19
[FOR-TEST-ONLY][SVLS-8660] test: intentional sensitive log statements to validate Copilot PII rules #1140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FOR-TEST-ONLY][SVLS-8660] test: intentional sensitive log statements to validate Copilot PII rules #1140
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -183,7 +183,10 @@ impl Listener { | |
| payload_value: Value, | ||
| invocation_processor_handle: InvocationProcessorHandle, | ||
| ) { | ||
| debug!("Received start invocation request from headers:{headers:?}"); | ||
| // to test https://github.com/DataDog/datadog-lambda-extension/pull/1037/changes | ||
| debug!( | ||
| "Received start invocation request from headers:{headers:?}, payload_value:{payload_value:?}" | ||
| ); | ||
|
Comment on lines
+187
to
+189
|
||
|
|
||
| let request_id = extract_request_id_from_headers(&headers); | ||
|
|
||
|
|
@@ -246,7 +249,10 @@ impl Listener { | |
| let headers = headers_to_map(headers); | ||
| let payload_value = serde_json::from_slice::<Value>(&body).unwrap_or_else(|_| json!({})); | ||
|
|
||
| debug!("Received end invocation request from headers:{headers:?}"); | ||
| // to test https://github.com/DataDog/datadog-lambda-extension/pull/1037/changes | ||
| debug!( | ||
| "Received end invocation request from headers:{headers:?}, payload_value:{payload_value:?}" | ||
| ); | ||
|
Comment on lines
+253
to
+255
|
||
| let request_id = extract_request_id_from_headers(&headers); | ||
|
|
||
| if let Err(e) = invocation_processor_handle | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,6 +98,7 @@ impl Flusher { | |
| format!("{}/api/v2/logs", self.endpoint) | ||
| }; | ||
| let headers = self.get_headers(api_key).await; | ||
| debug!("LOGS | Flushing request headers: {:?}", headers); | ||
|
||
| self.client | ||
| .post(&url) | ||
| .timeout(std::time::Duration::from_secs(self.config.flush_timeout)) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -95,6 +95,7 @@ impl TraceFlusher { | |
| return None; | ||
| }; | ||
|
|
||
| debug!("TRACES | Flushing traces with api_key={api_key}"); | ||
|
||
| let http_client = &self.http_client; | ||
|
|
||
| let mut failed_batch: Vec<SendData> = Vec::new(); | ||
|
|
@@ -133,6 +134,8 @@ impl TraceFlusher { | |
| .with_api_key(api_key.as_str()) | ||
| .with_retry_strategy(trace_retry_strategy()) | ||
| .build(); | ||
|
|
||
| debug!("TRACES | Built trace: {:?}", trace.get_payloads()); | ||
|
||
| (trace, info.header_tags) | ||
| }) | ||
| .collect(); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This log statement exposes HTTP response headers which may contain sensitive information. Do not log HTTP request/response headers. Redact or omit the sensitive field.