Skip to content

Commit 96476c4

Browse files
authored
Merge branch 'main' into dotty/test-updates-2025-Jun-15
2 parents 081c6c7 + 8717d65 commit 96476c4

114 files changed

Lines changed: 4645 additions & 3544 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,16 @@ updates:
2323
# docker:
2424
# patterns:
2525
# - "*"
26-
26+
27+
# Update all NuGet packages used by core agent projects
2728
- package-ecosystem: nuget
2829
directories: # not recursive - only the specified directory will be scanned for .csproj or .sln files
30+
- /build # BuildTools.sln
2931
- /src/Agent/NewRelic/Agent/Core # Core.csproj
3032
- /src/Agent/NewRelic.Api.Agent # NewRelic.Api.Agent.csproj
31-
- /build # BuildTools.sln
32-
- /src/Agent/MsiInstaller # MsiInstaller.sln
33-
# We do not scan the /src/Agent/NewRelic/Agent/Extensions folder, as those projects
34-
# intentionally reference old versions of the Nuget packages they instrument.
33+
- /src/Agent/NewRelic/Agent/Extensions/NewRelic.Agent.Extensions # NewRelic.Agent.Extensions.csproj
34+
# Do not scan the /src/Agent/NewRelic/Agent/Extensions/Providers folder, as those projects intentionally reference old versions of the Nuget packages they instrument.
35+
# Do not scan the src/Agent/MsiInstaller folder. We are not updating Wix packages to v6.x currently and there are no non-Wix packages referenced there.
3536
schedule:
3637
interval: weekly
3738
commit-message:
@@ -40,9 +41,6 @@ updates:
4041
nuget-agent:
4142
patterns:
4243
- "*"
43-
ignore:
44-
- dependency-name: "WixToolset*"
45-
versions: [ "6.*" ] # WIX 6.0+ requires payment for commerical projects, avoiding upgrade for now
4644

4745
# Update a specific set of packages for unit and integration tests
4846
- package-ecosystem: nuget

.github/workflows/all_solutions.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
runs-on: ubuntu-latest
4343
steps:
4444
- name: Harden Runner
45-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
45+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
4646
with:
4747
disable-sudo: true
4848
egress-policy: audit
@@ -568,7 +568,7 @@ jobs:
568568

569569
steps:
570570
- name: Harden Runner
571-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
571+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
572572
with:
573573
disable-sudo: true
574574
egress-policy: audit
@@ -635,7 +635,7 @@ jobs:
635635

636636
steps:
637637
- name: Harden Runner
638-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
638+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
639639
with:
640640
disable-sudo: true
641641
egress-policy: audit
@@ -746,7 +746,7 @@ jobs:
746746
if: always()
747747
steps:
748748
- name: Harden Runner
749-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
749+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
750750
with:
751751
disable-sudo: true
752752
egress-policy: audit

.github/workflows/build_profiler.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ jobs:
191191

192192
steps:
193193
- name: Harden Runner
194-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
194+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
195195
with:
196196
egress-policy: audit
197197

@@ -344,7 +344,7 @@ jobs:
344344

345345
steps:
346346
- name: Harden Runner
347-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
347+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
348348
with:
349349
egress-policy: audit
350350

.github/workflows/check_modified_files.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
non-workflow-files-changed: ${{ steps.filter.outputs.non-workflow-files-changed }}
2323
steps:
2424
- name: Harden Runner
25-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
25+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
2626
with:
2727
disable-sudo: true
2828
egress-policy: audit

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
fetch-depth: 0
5353

5454
- name: Initialize CodeQL
55-
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
55+
uses: github/codeql-action/init@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
5656
with:
5757
languages: csharp
5858
config-file: ./.github/codeql/codeql-config.yml
@@ -63,7 +63,7 @@ jobs:
6363
shell: powershell
6464

6565
- name: Perform CodeQL Analysis
66-
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
66+
uses: github/codeql-action/analyze@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
6767
with:
6868
category: "/language:csharp"
6969

@@ -88,7 +88,7 @@ jobs:
8888
fetch-depth: 0
8989

9090
- name: Initialize CodeQL
91-
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
91+
uses: github/codeql-action/init@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
9292
with:
9393
languages: c-cpp
9494
config-file: ./.github/codeql/codeql-config.yml
@@ -105,6 +105,6 @@ jobs:
105105
shell: powershell
106106

107107
- name: Perform CodeQL Analysis
108-
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
108+
uses: github/codeql-action/analyze@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
109109
with:
110110
category: "/language:c-cpp"

.github/workflows/deploy_agent.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
workflow_run_id: ${{ steps.step2.outputs.workflow_run_id }}
6262
steps:
6363
- name: Harden Runner
64-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
64+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
6565
with:
6666
disable-sudo: true
6767
egress-policy: audit
@@ -155,7 +155,7 @@ jobs:
155155
runs-on: ubuntu-latest
156156
steps:
157157
- name: Harden Runner
158-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
158+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
159159
with:
160160
disable-sudo: true
161161
egress-policy: audit
@@ -350,7 +350,7 @@ jobs:
350350
runs-on: ubuntu-latest
351351
steps:
352352
- name: Harden Runner
353-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
353+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
354354
with:
355355
egress-policy: audit
356356

@@ -371,19 +371,25 @@ jobs:
371371
name: deploy-artifacts
372372
path: ${{ github.workspace }}/
373373

374-
- name: Get GPG Key
375-
id: write_gpgkey
374+
- name: Get GPG Keys
375+
id: write_gpgkeys
376376
run: |
377-
filePath="/tmp/gpg.tar.bz2"
378-
echo "${{ secrets.GPG_KEY }}" | base64 -d > $filePath
379-
echo "filePath=$filePath" >> $GITHUB_OUTPUT
377+
# old signing key
378+
old_key_file="/tmp/old-secret-key.gpg"
379+
echo "${{ secrets.OLD_GPG_KEY }}" | base64 -d > $old_key_file
380+
echo "old_key_file=$old_key_file" >> $GITHUB_OUTPUT
381+
# new signing key
382+
new_key_file="/tmp/new-secret-key.gpg"
383+
echo "${{ secrets.NEW_GPG_KEY }}" | base64 -d > $new_key_file
384+
echo "new_key_file=$new_key_file" >> $GITHUB_OUTPUT
380385
shell: bash
381386

382-
- name: Move Artifacts and GPG Key to Staging Location
387+
- name: Move Artifacts and GPG Keys to Staging Location
383388
run: |
384389
cp LinuxRpm/*.rpm ${{ github.workspace }}/deploy/linux/packages
385390
cp LinuxDeb/*.deb ${{ github.workspace }}/deploy/linux/packages
386-
cp -f ${{ steps.write_gpgkey.outputs.filePath }} ${{ github.workspace }}/deploy/linux/deploy_scripts/gpg.tar.bz2
391+
cp -f ${{ steps.write_gpgkeys.outputs.old_key_file }} ${{ github.workspace }}/deploy/linux/deploy_scripts/old-private-key.gpg
392+
cp -f ${{ steps.write_gpgkeys.outputs.new_key_file }} ${{ github.workspace }}/deploy/linux/deploy_scripts/new-private-key.gpg
387393
shell: bash
388394

389395
- name: Prepare docker.env
@@ -414,7 +420,11 @@ jobs:
414420
echo "AWS_ACCESS_KEY_ID=${{ secrets.TEST_BUCKET_AWS_ACCESS_KEY_ID }}" >> docker.env
415421
echo "AWS_SECRET_ACCESS_KEY=${{ secrets.TEST_BUCKET_AWS_SECRET_ACCESS_KEY }}" >> docker.env
416422
fi
417-
echo "GPG_KEYS=/data/deploy_scripts/gpg.tar.bz2" >> docker.env
423+
echo "OLD_PRIVATE_KEY=/data/deploy_scripts/old-private-key.gpg" >> docker.env
424+
echo "NEW_PRIVATE_KEY=/data/deploy_scripts/new-private-key.gpg" >> docker.env
425+
echo "NEW_PRIVATE_KEY_PASSPHRASE=${{ secrets.NEW_GPG_KEY_PASSPHRASE }}" >> docker.env
426+
echo "OLD_KEY_ID=${{ secrets.OLD_GPG_KEY_ID }}" >> docker.env
427+
echo "NEW_KEY_ID=${{ secrets.NEW_GPG_KEY_ID }}" >> docker.env
418428
shell: bash
419429

420430
- name: Build and Run Container

.github/workflows/dotty.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
steps:
3737
- name: Harden Runner
38-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
38+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
3939
with:
4040
egress-policy: audit # Leave it audit mode
4141

.github/workflows/linux_container_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242

4343
steps:
4444
- name: Harden Runner
45-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
45+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
4646
with:
4747
egress-policy: audit
4848

@@ -105,7 +105,7 @@ jobs:
105105

106106
steps:
107107
- name: Harden Runner
108-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
108+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
109109
with:
110110
egress-policy: audit
111111

.github/workflows/markdowncheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
steps:
2424
- name: Harden Runner
25-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
25+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
2626
with:
2727
egress-policy: audit # Leave it audit mode
2828

.github/workflows/post_deploy_agent.yml

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ env:
4040
DOTNET_NOLOGO: true
4141

4242
jobs:
43-
validate-apt-repo:
43+
validate-apt-repo-ubuntu-latest:
4444
name: Validate APT-based repo
4545
runs-on: ubuntu-latest
4646
steps:
4747
- name: Harden Runner
48-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
48+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
4949
with:
5050
disable-sudo: false
5151
egress-policy: audit
@@ -54,7 +54,40 @@ jobs:
5454
run: |
5555
echo "Sleeping 5 minutes to wait for apt to update itself"
5656
sleep 300
57-
shell: bash
57+
shell: bash
58+
- name: Validate
59+
run: |
60+
echo 'deb [signed-by=/usr/share/keyrings/newrelic-apt.gpg] https://apt.newrelic.com/debian/ newrelic non-free' | sudo tee /etc/apt/sources.list.d/newrelic.list
61+
wget -O- https://download.newrelic.com/NEWRELIC_APT_2DAD550E.public | sudo gpg --dearmor -o /usr/share/keyrings/newrelic-apt.gpg
62+
sudo apt-get update
63+
sudo apt-get install newrelic-dotnet-agent
64+
installed_version=$(dpkg -s newrelic-dotnet-agent | grep -i version)
65+
if [ "$AGENT_VERSION" = "$installed_version" ]; then
66+
echo "Versions match."
67+
exit 0
68+
else
69+
echo "ERROR: Version mismatch: Expected $AGENT_VERSION was $installed_version"
70+
exit 1
71+
fi
72+
shell: bash
73+
env:
74+
AGENT_VERSION: "Version: ${{ inputs.agent_version }}"
75+
76+
validate-apt-repo-ubuntu-2204:
77+
name: Validate APT-based repo
78+
runs-on: ubuntu-22.04
79+
steps:
80+
- name: Harden Runner
81+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
82+
with:
83+
disable-sudo: false
84+
egress-policy: audit
85+
- name: Wait for APT to update
86+
if: ${{ inputs.wait_for_apt_and_yum }} # only wait if requested
87+
run: |
88+
echo "Sleeping 5 minutes to wait for apt to update itself"
89+
sleep 300
90+
shell: bash
5891
- name: Validate
5992
run: |
6093
echo 'deb https://apt.newrelic.com/debian/ newrelic non-free' | sudo tee /etc/apt/sources.list.d/newrelic.list
@@ -70,15 +103,15 @@ jobs:
70103
exit 1
71104
fi
72105
shell: bash
73-
env:
106+
env:
74107
AGENT_VERSION: "Version: ${{ inputs.agent_version }}"
75108

76109
validate-yum-repo:
77110
name: Validate YUM-based repo
78111
runs-on: ubuntu-latest
79112
steps:
80113
- name: Harden Runner
81-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
114+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
82115
with:
83116
disable-sudo: true
84117
egress-policy: audit
@@ -119,7 +152,7 @@ jobs:
119152
runs-on: ubuntu-latest
120153
steps:
121154
- name: Harden Runner
122-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
155+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
123156
with:
124157
disable-sudo: true
125158
egress-policy: audit
@@ -143,7 +176,7 @@ jobs:
143176
runs-on: ubuntu-latest
144177
steps:
145178
- name: Harden Runner
146-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
179+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
147180
with:
148181
disable-sudo: true
149182
egress-policy: audit
@@ -171,7 +204,7 @@ jobs:
171204

172205
steps:
173206
- name: Harden Runner
174-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
207+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
175208
with:
176209
disable-sudo: true
177210
egress-policy: audit
@@ -195,7 +228,7 @@ jobs:
195228
runs-on: ubuntu-latest
196229
steps:
197230
- name: Harden Runner
198-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
231+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
199232
with:
200233
disable-sudo: true
201234
egress-policy: audit

0 commit comments

Comments
 (0)