diff --git a/.github/workflows/all_solutions.yml b/.github/workflows/all_solutions.yml
index 567aa648a..f8dd45d0c 100644
--- a/.github/workflows/all_solutions.yml
+++ b/.github/workflows/all_solutions.yml
@@ -510,7 +510,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: audit
@@ -577,7 +577,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: audit
@@ -688,7 +688,7 @@ jobs:
if: always()
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: audit
diff --git a/.github/workflows/assignproj.yml b/.github/workflows/assignproj.yml
index d5ac11f63..2893ad038 100644
--- a/.github/workflows/assignproj.yml
+++ b/.github/workflows/assignproj.yml
@@ -16,7 +16,7 @@ jobs:
name: Assign to One Project
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: audit
diff --git a/.github/workflows/build_profiler.yml b/.github/workflows/build_profiler.yml
index d34d423e5..1b23d8d98 100644
--- a/.github/workflows/build_profiler.yml
+++ b/.github/workflows/build_profiler.yml
@@ -193,7 +193,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit
@@ -347,7 +347,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit
diff --git a/.github/workflows/check_modified_files.yml b/.github/workflows/check_modified_files.yml
index 7d8cf88d0..d1dc074bd 100644
--- a/.github/workflows/check_modified_files.yml
+++ b/.github/workflows/check_modified_files.yml
@@ -22,7 +22,7 @@ jobs:
non-workflow-files-changed: ${{ steps.filter.outputs.non-workflow-files-changed }}
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: audit
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 5756e10ce..06aa25a90 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -49,7 +49,7 @@ jobs:
fetch-depth: 0
- name: Initialize CodeQL
- uses: github/codeql-action/init@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
+ uses: github/codeql-action/init@2d790406f505036ef40ecba973cc774a50395aac # v3.25.13
with:
languages: csharp
@@ -59,7 +59,7 @@ jobs:
shell: powershell
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
+ uses: github/codeql-action/analyze@2d790406f505036ef40ecba973cc774a50395aac # v3.25.13
with:
category: "/language:csharp"
@@ -84,7 +84,7 @@ jobs:
fetch-depth: 0
- name: Initialize CodeQL
- uses: github/codeql-action/init@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
+ uses: github/codeql-action/init@2d790406f505036ef40ecba973cc774a50395aac # v3.25.13
with:
languages: c-cpp
@@ -100,6 +100,6 @@ jobs:
shell: powershell
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
+ uses: github/codeql-action/analyze@2d790406f505036ef40ecba973cc774a50395aac # v3.25.13
with:
category: "/language:c-cpp"
diff --git a/.github/workflows/deploy_agent.yml b/.github/workflows/deploy_agent.yml
index 027ab6d08..4e0147fb2 100644
--- a/.github/workflows/deploy_agent.yml
+++ b/.github/workflows/deploy_agent.yml
@@ -61,7 +61,7 @@ jobs:
workflow_run_id: ${{ steps.step2.outputs.workflow_run_id }}
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: audit
@@ -155,7 +155,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: audit
@@ -350,7 +350,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit
diff --git a/.github/workflows/markdowncheck.yml b/.github/workflows/markdowncheck.yml
index 74d21818e..70990a0ab 100644
--- a/.github/workflows/markdowncheck.yml
+++ b/.github/workflows/markdowncheck.yml
@@ -22,7 +22,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit # Leave it audit mode
diff --git a/.github/workflows/multiverse_run.yml b/.github/workflows/multiverse_run.yml
index 30d240baa..8eeeab07a 100644
--- a/.github/workflows/multiverse_run.yml
+++ b/.github/workflows/multiverse_run.yml
@@ -36,7 +36,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit
@@ -102,7 +102,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit
diff --git a/.github/workflows/nuget_slack_notifications.yml b/.github/workflows/nuget_slack_notifications.yml
index 4f28da294..fef375015 100644
--- a/.github/workflows/nuget_slack_notifications.yml
+++ b/.github/workflows/nuget_slack_notifications.yml
@@ -34,7 +34,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit # Leave it audit mode
diff --git a/.github/workflows/post_deploy_agent.yml b/.github/workflows/post_deploy_agent.yml
index e6365f5fb..3e7fd52b2 100644
--- a/.github/workflows/post_deploy_agent.yml
+++ b/.github/workflows/post_deploy_agent.yml
@@ -45,7 +45,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: false
egress-policy: audit
@@ -78,7 +78,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: audit
@@ -119,7 +119,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: audit
@@ -143,7 +143,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: audit
@@ -171,7 +171,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: audit
diff --git a/.github/workflows/publish_release_notes.yml b/.github/workflows/publish_release_notes.yml
index 20b0c59bb..9ce277048 100644
--- a/.github/workflows/publish_release_notes.yml
+++ b/.github/workflows/publish_release_notes.yml
@@ -35,7 +35,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit
diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml
index 2fc7c955c..35ab16d39 100644
--- a/.github/workflows/release-please.yml
+++ b/.github/workflows/release-please.yml
@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: audit
diff --git a/.github/workflows/repolinter.yml b/.github/workflows/repolinter.yml
index 0bab8d3fb..512e34081 100644
--- a/.github/workflows/repolinter.yml
+++ b/.github/workflows/repolinter.yml
@@ -31,7 +31,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: audit
diff --git a/.github/workflows/run_integration_tests.yml b/.github/workflows/run_integration_tests.yml
index c9e8f2c59..868257f7b 100644
--- a/.github/workflows/run_integration_tests.yml
+++ b/.github/workflows/run_integration_tests.yml
@@ -44,7 +44,7 @@ jobs:
unbounded-tests-matrix: ${{ steps.configure_unbounded_tests_matrix.outputs.matrix }}
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit
diff --git a/.github/workflows/run_linux_container_tests.yml b/.github/workflows/run_linux_container_tests.yml
index 08bcb4e2c..60cdce8c1 100644
--- a/.github/workflows/run_linux_container_tests.yml
+++ b/.github/workflows/run_linux_container_tests.yml
@@ -42,12 +42,12 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit
- name: Docker Setup QEMU
- uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0
+ uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml
index 4639fbf25..10f9efe75 100644
--- a/.github/workflows/scorecard.yml
+++ b/.github/workflows/scorecard.yml
@@ -32,7 +32,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: audit
@@ -73,6 +73,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
- uses: github/codeql-action/upload-sarif@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
+ uses: github/codeql-action/upload-sarif@2d790406f505036ef40ecba973cc774a50395aac # v3.25.13
with:
sarif_file: results.sarif
diff --git a/.github/workflows/scripts/nugetSlackNotifications/nugetSlackNotifications.csproj b/.github/workflows/scripts/nugetSlackNotifications/nugetSlackNotifications.csproj
index 78ee31f3f..19813cd6b 100644
--- a/.github/workflows/scripts/nugetSlackNotifications/nugetSlackNotifications.csproj
+++ b/.github/workflows/scripts/nugetSlackNotifications/nugetSlackNotifications.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/.github/workflows/set_community_label.yml b/.github/workflows/set_community_label.yml
index 7edbf30b3..77ac76fc0 100644
--- a/.github/workflows/set_community_label.yml
+++ b/.github/workflows/set_community_label.yml
@@ -15,7 +15,7 @@ jobs:
issues: write
steps:
- name: Harden Runner
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
+ uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: audit
diff --git a/src/Agent/MsiInstaller/Installer/Installer.csproj b/src/Agent/MsiInstaller/Installer/Installer.csproj
index 113c76d8b..b74f3a124 100644
--- a/src/Agent/MsiInstaller/Installer/Installer.csproj
+++ b/src/Agent/MsiInstaller/Installer/Installer.csproj
@@ -18,10 +18,10 @@
-
-
-
-
+
+
+
+
diff --git a/src/Agent/MsiInstaller/InstallerActions/InstallerActions.csproj b/src/Agent/MsiInstaller/InstallerActions/InstallerActions.csproj
index 4a6a9cead..d014ec018 100644
--- a/src/Agent/MsiInstaller/InstallerActions/InstallerActions.csproj
+++ b/src/Agent/MsiInstaller/InstallerActions/InstallerActions.csproj
@@ -18,8 +18,8 @@
-
-
+
+
diff --git a/src/Agent/NewRelic/Agent/Extensions/Providers/Wrapper/AwsSdk/AwsSdkPipelineWrapper.cs b/src/Agent/NewRelic/Agent/Extensions/Providers/Wrapper/AwsSdk/AwsSdkPipelineWrapper.cs
index 128fa381b..bc772687c 100644
--- a/src/Agent/NewRelic/Agent/Extensions/Providers/Wrapper/AwsSdk/AwsSdkPipelineWrapper.cs
+++ b/src/Agent/NewRelic/Agent/Extensions/Providers/Wrapper/AwsSdk/AwsSdkPipelineWrapper.cs
@@ -1,15 +1,9 @@
// Copyright 2020 New Relic, Inc. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
-using System.Collections.Concurrent;
-using System;
using System.Collections.Generic;
-using System.Threading.Tasks;
using NewRelic.Agent.Api;
-using NewRelic.Agent.Extensions.AwsSdk;
using NewRelic.Agent.Extensions.Providers.Wrapper;
-using NewRelic.Reflection;
-using System.Linq;
namespace NewRelic.Providers.Wrapper.AwsSdk
{
@@ -18,9 +12,7 @@ public class AwsSdkPipelineWrapper : IWrapper
public bool IsTransactionRequired => true;
private const string WrapperName = "AwsSdkPipelineWrapper";
- private static readonly ConcurrentDictionary> _getRequestResponseFromGeneric = new();
private static HashSet _unsupportedRequestTypes = new();
- private static HashSet _unsupportedSQSRequestTypes = new();
public CanWrapResponse CanWrap(InstrumentedMethodInfo methodInfo)
{
@@ -60,7 +52,7 @@ public AfterWrappedMethodDelegate BeforeWrappedMethod(InstrumentedMethodCall ins
if (requestType.StartsWith("Amazon.SQS"))
{
- return HandleSQSRequest(instrumentedMethodCall, agent, transaction, request, isAsync, executionContext);
+ return SQSRequestHandler.HandleSQSRequest(instrumentedMethodCall, agent, transaction, request, isAsync, executionContext);
}
if (_unsupportedRequestTypes.Add(requestType)) // log once per unsupported request type
@@ -68,113 +60,5 @@ public AfterWrappedMethodDelegate BeforeWrappedMethod(InstrumentedMethodCall ins
return Delegates.NoOp;
}
-
- private static AfterWrappedMethodDelegate HandleSQSRequest(InstrumentedMethodCall instrumentedMethodCall, IAgent agent,
- ITransaction transaction, dynamic request, bool isAsync, dynamic executionContext)
- {
- var requestType = request.GetType().Name;
-
- MessageBrokerAction action;
- switch (requestType)
- {
- case "SendMessageRequest":
- case "SendMessageBatchRequest":
- action = MessageBrokerAction.Produce;
- break;
- case "ReceiveMessageRequest":
- action = MessageBrokerAction.Consume;
- break;
- case "PurgeQueueRequest":
- action = MessageBrokerAction.Purge;
- break;
- default:
- if (_unsupportedSQSRequestTypes.Add(requestType)) // log once per unsupported request type
- agent.Logger.Debug($"AwsSdkPipelineWrapper: SQS Request type {requestType} is not supported. Returning NoOp delegate.");
-
- return Delegates.NoOp;
- }
-
- var dtHeaders = agent.GetConfiguredDTHeaders();
-
- string requestQueueUrl = request.QueueUrl;
- ISegment segment = SqsHelper.GenerateSegment(transaction, instrumentedMethodCall.MethodCall, requestQueueUrl, action);
- if (action == MessageBrokerAction.Produce)
- {
- if (requestType == "SendMessageRequest")
- {
- if (request.MessageAttributes == null)
- {
- agent.Logger.Debug("AwsSdkPipelineWrapper: requestContext.OriginalRequest.MessageAttributes is null, unable to insert distributed trace headers.");
- }
- else
- {
- SqsHelper.InsertDistributedTraceHeaders(transaction, request, dtHeaders.Count);
- }
- }
- else if (requestType == "SendMessageBatchRequest")
- {
- // loop through each message in the batch and insert distributed trace headers
- foreach (var message in request.Entries)
- {
- if (message.MessageAttributes == null)
- {
- agent.Logger.Debug("AwsSdkPipelineWrapper: requestContext.OriginalRequest.Entries.MessageAttributes is null, unable to insert distributed trace headers.");
- }
- else
- {
- SqsHelper.InsertDistributedTraceHeaders(transaction, message, dtHeaders.Count);
- }
- }
- }
- }
-
- // modify the request to ask for DT headers in the response message attributes.
- if (action == MessageBrokerAction.Consume)
- {
- if (request.MessageAttributeNames == null)
- request.MessageAttributeNames = new List();
-
- foreach (var header in dtHeaders)
- request.MessageAttributeNames.Add(header);
- }
-
- if (isAsync)
- {
- return Delegates.GetAsyncDelegateFor(agent, segment, true, ProcessResponse, TaskContinuationOptions.ExecuteSynchronously);
-
- void ProcessResponse(Task responseTask)
- {
- if (!ValidTaskResponse(responseTask) || (segment == null) || action != MessageBrokerAction.Consume)
- return;
-
- // taskResult is a ReceiveMessageResponse
- var taskResultGetter = _getRequestResponseFromGeneric.GetOrAdd(responseTask.GetType(), t => VisibilityBypasser.Instance.GeneratePropertyAccessor