Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into task/deserialisation_improvement_poc
Browse files Browse the repository at this point in the history
# Conflicts:
#	newrelic-security-agent/src/main/java/com/newrelic/agent/security/instrumentator/dispatcher/Dispatcher.java
#	newrelic-security-api/src/main/java/com/newrelic/api/agent/security/schema/AgentMetaData.java
#	newrelic-security-api/src/main/java/com/newrelic/api/agent/security/schema/VulnerabilityCaseType.java
#	settings.gradle
  • Loading branch information
lovesh-ap committed Jan 13, 2025
2 parents ee8d3f3 + fe0ce16 commit 93d10f0
Show file tree
Hide file tree
Showing 1,092 changed files with 59,741 additions and 5,723 deletions.
4 changes: 3 additions & 1 deletion .github/actions/setup-environment-inst-verifier/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ runs:
with:
distribution: 'temurin'
java-version: |
21
20
17
11
Expand All @@ -29,7 +30,8 @@ runs:
sed -i -e "s|jdk8=8|jdk8=${JAVA_HOME_8_X64}|
s|jdk11=11|jdk11=${JAVA_HOME_11_X64}|
s|jdk17=17|jdk17=${JAVA_HOME_17_X64}|
s|jdk20=20|jdk20=${JAVA_HOME_20_X64}|" gradle.properties.gha
s|jdk20=20|jdk20=${JAVA_HOME_20_X64}|
s|jdk21=21|jdk20=${JAVA_HOME_21_X64}|" gradle.properties.gha
cat gradle.properties.gha >> gradle.properties
- name: Setup Gradle
Expand Down
4 changes: 3 additions & 1 deletion .github/actions/setup-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ runs:
with:
distribution: 'temurin'
java-version: |
21
20
17
11
Expand All @@ -48,7 +49,8 @@ runs:
sed -i -e "s|jdk8=8|jdk8=${JAVA_HOME_8_X64}|
s|jdk11=11|jdk11=${JAVA_HOME_11_X64}|
s|jdk17=17|jdk17=${JAVA_HOME_17_X64}|
s|jdk20=20|jdk20=${JAVA_HOME_20_X64}|" gradle.properties.gha
s|jdk20=20|jdk20=${JAVA_HOME_20_X64}|
s|jdk21=21|jdk21=${JAVA_HOME_21_X64}|" gradle.properties.gha
cat gradle.properties.gha >> gradle.properties
- name: Setup Gradle
Expand Down
39 changes: 37 additions & 2 deletions .github/actions/unit-test/action.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,45 @@
name: Instrumentation unit tests
description: Run all the instrumentation unit test.
inputs:
java-version:
description: 'The JVM Version to use'
required: true
default: '8'

runs:
using: composite

steps:
- name: Run instrumentation unit tests
- name: Run instrumentation unit tests on Java ${{ inputs.java-version }} attempt 1
id: run_tests_1
shell: bash
run: ./gradlew ${GRADLE_OPTIONS} --info test
continue-on-error: true
run: |
echo "Running attempt 1"
./gradlew ${GRADLE_OPTIONS} --info test -Ptest${{ inputs.java-version }} --continue
- name: Run instrumentation unit tests on Java ${{ inputs.java-version }} attempt 2
id: run_tests_2
shell: bash
continue-on-error: true
if: steps.run_tests_1.outcome == 'failure'
run: |
echo "Running attempt 2"
./gradlew ${GRADLE_OPTIONS} --info test -Ptest${{ inputs.java-version }} --continue
- name: Run instrumentation unit tests on Java ${{ inputs.java-version }} attempt 3
id: run_tests_3
shell: bash
continue-on-error: true
if: steps.run_tests_2.outcome == 'failure'
run: |
echo "Running attempt 3"
./gradlew ${GRADLE_OPTIONS} --info test -Ptest${{ inputs.java-version }} --continue
- name: Run instrumentation unit tests on Java ${{ inputs.java-version }} attempt 4
id: run_tests_4
shell: bash
if: steps.run_tests_3.outcome == 'failure'
run: |
echo "Running attempt 4"
./gradlew ${GRADLE_OPTIONS} --info test -Ptest${{ inputs.java-version }} --continue
9 changes: 8 additions & 1 deletion .github/workflows/X-Reusable-Build-Security-Agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ jobs:
# this list is paginated and will be used in the verify-module job.
build-agent:
runs-on: ubuntu-20.04
strategy:
matrix:
java-version: [ 8 ]
# java-version: [ 8, 11, 17 ]

steps:
- name: Checkout CSEC Repo
uses: actions/checkout@v3
Expand All @@ -79,4 +84,6 @@ jobs:

- name: Run CSEC unit tests
if: ${{ inputs.run-unit-test == 'true' }}
uses: ./.github/actions/unit-test
uses: ./.github/actions/unit-test
with:
java-version: ${{ matrix.java-version }}
6 changes: 3 additions & 3 deletions .github/workflows/publish-release-to-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
with:
apm-repo: 'k2io/newrelic-java-agent'
apm-source-ref: 'csec-dev'
csec-run-unittest: 'true'
csec-run-instrumentation-verify: 'true'
csec-run-unittest: 'false'
csec-run-instrumentation-verify: 'false'
is-release: 'true'
version-suffix: '-public-preview'
version-suffix: ''
slack-notify: 'true'
6 changes: 3 additions & 3 deletions .github/workflows/snyk-vulnerability-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Java Agent
uses: actions/checkout@v3
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # pin@v4
with:
ref: 'main'

Expand All @@ -25,9 +25,9 @@ jobs:
echo "jdk17=/tmp" >> gradle.properties
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/gradle@master
uses: snyk/actions/gradle-jdk11@8349f9043a8b7f0f3ee8885bf28f0b388d2446e8 # pin@master
env:
SNYK_TOKEN: ${{ secrets.JAVA_AGENT_SNYK_TOKEN }}
with:
command: monitor
args: --all-sub-projects --org=java-agent --configuration-matching='(includeInJar)|(shadowIntoJar)'
args: --all-sub-projects --org=java-agent --configuration-matching='(includeInJar)|(shadowIntoJar)'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ reports/
.settings
.gradle
.metadata
.run
derbyDB
pyvenv.cfg
test_database*
Expand Down
Loading

0 comments on commit 93d10f0

Please sign in to comment.