Skip to content

Commit

Permalink
Merge branch 'automatic_userid_blocking' into appsec_session_id
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-id authored Jan 18, 2025
2 parents 2e652bb + 1cb83fb commit a0031d6
Show file tree
Hide file tree
Showing 149 changed files with 5,699 additions and 2,686 deletions.
2 changes: 2 additions & 0 deletions .github/actions/plugins/test-and-upstream/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ runs:
- uses: codecov/codecov-action@v3
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: test-and-upstream-${{ github.job }}
2 changes: 2 additions & 0 deletions .github/actions/plugins/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ runs:
- uses: codecov/codecov-action@v3
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: test-${{ github.job }}
2 changes: 2 additions & 0 deletions .github/actions/plugins/upstream/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ runs:
- uses: codecov/codecov-action@v3
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: upstream-${{ github.job }}
7 changes: 5 additions & 2 deletions .github/actions/testagent/logs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ inputs:
container-id:
description: "ID of the Docker Container to get logs from (optional)"
required: false
suffix:
description: "suffix of the artifact file name"
required: false
runs:
using: composite
steps:
Expand Down Expand Up @@ -34,7 +37,7 @@ runs:
rm "$headers"
shell: bash
- name: Archive Test Agent Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: supported-integrations
name: supported-integrations-${{inputs.suffix}}
path: ./artifacts
33 changes: 33 additions & 0 deletions .github/workflows/appsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,23 @@ jobs:
- 18
- latest
range: ['>=10.2.0 <11', '>=11.0.0 <13', '11.1.4', '>=13.0.0 <14', '13.2.0', '>=14.0.0 <=14.2.6', '>=14.2.7 <15', '>=15.0.0']
include:
- range: '>=10.2.0 <11'
range_clean: gte.10.2.0.and.lt.11
- range: '>=11.0.0 <13'
range_clean: gte.11.0.0.and.lt.13
- range: '11.1.4'
range_clean: 11.1.4
- range: '>=13.0.0 <14'
range_clean: gte.13.0.0.and.lt.14
- range: '13.2.0'
range_clean: 13.2.0
- range: '>=14.0.0 <=14.2.6'
range_clean: gte.14.0.0.and.lte.14.2.6
- range: '>=14.2.7 <15'
range_clean: gte.14.2.7.and.lt.15
- range: '>=15.0.0'
range_clean: gte.15.0.0
runs-on: ubuntu-latest
env:
PLUGINS: next
Expand All @@ -226,6 +243,8 @@ jobs:
- run: yarn test:appsec:plugins:ci
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: appsec-${{ github.job }}-${{ matrix.version }}-${{ matrix.range_clean }}
- uses: codecov/codecov-action@v3

lodash:
Expand Down Expand Up @@ -279,3 +298,17 @@ jobs:
- uses: ./.github/actions/node/latest
- run: yarn test:appsec:plugins:ci
- uses: codecov/codecov-action@v3

node-serialize:
runs-on: ubuntu-latest
env:
PLUGINS: node-serialize
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/node/setup
- uses: ./.github/actions/install
- uses: ./.github/actions/node/oldest
- run: yarn test:appsec:plugins:ci
- uses: ./.github/actions/node/latest
- run: yarn test:appsec:plugins:ci
- uses: codecov/codecov-action@v3
2 changes: 2 additions & 0 deletions .github/workflows/debugger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ jobs:
- run: yarn test:integration:debugger
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: debugger
- uses: codecov/codecov-action@v3
2 changes: 2 additions & 0 deletions .github/workflows/lambda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ jobs:
- run: yarn test:lambda:ci
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: lambda
- uses: codecov/codecov-action@v3
25 changes: 25 additions & 0 deletions .github/workflows/llmobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
- run: yarn test:llmobs:sdk:ci
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: llmobs-${{ github.job }}
- uses: codecov/codecov-action@v3

openai:
Expand All @@ -47,3 +49,26 @@ jobs:
- uses: codecov/codecov-action@v3
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: llmobs-${{ github.job }}

langchain:
runs-on: ubuntu-latest
env:
PLUGINS: langchain
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/testagent/start
- uses: ./.github/actions/node/setup
- uses: ./.github/actions/install
- uses: ./.github/actions/node/18
- run: yarn test:llmobs:plugins:ci
shell: bash
- uses: ./.github/actions/node/latest
- run: yarn test:llmobs:plugins:ci
shell: bash
- uses: codecov/codecov-action@v3
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: llmobs-${{ github.job }}
30 changes: 30 additions & 0 deletions .github/workflows/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ jobs:
run: yarn test:plugins:ci
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: plugins-${{ github.job }}-${{ matrix.node-version }}-${{ github.run_id }}
- uses: codecov/codecov-action@v3

amqp10:
Expand Down Expand Up @@ -164,6 +166,8 @@ jobs:
- run: yarn test:plugins:ci
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: plugins-${{ github.job }}-${{ matrix.node-version }}
- uses: codecov/codecov-action@v3

axios:
Expand Down Expand Up @@ -305,6 +309,8 @@ jobs:
- run: yarn test:plugins:ci
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: plugins-${{ github.job }}
- uses: codecov/codecov-action@v3

dns:
Expand All @@ -324,6 +330,8 @@ jobs:
- run: yarn test:plugins:ci
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: plugins-${{ github.job }}
- uses: codecov/codecov-action@v3

elasticsearch:
Expand All @@ -347,6 +355,8 @@ jobs:
- run: yarn test:plugins:ci
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: plugins-${{ github.job }}
- uses: codecov/codecov-action@v3

express:
Expand Down Expand Up @@ -452,6 +462,8 @@ jobs:
- run: yarn test:plugins:ci
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: plugins-${{ github.job }}-${{ matrix.node-version }}
- uses: codecov/codecov-action@v3

http2:
Expand All @@ -471,6 +483,8 @@ jobs:
- run: yarn test:plugins:ci
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: plugins-${{ github.job }}
- uses: codecov/codecov-action@v3

# TODO: fix performance issues and test more Node versions
Expand All @@ -486,6 +500,8 @@ jobs:
- run: yarn test:plugins:ci
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: plugins-${{ github.job }}
- uses: codecov/codecov-action@v3

kafkajs:
Expand Down Expand Up @@ -549,6 +565,8 @@ jobs:
- uses: codecov/codecov-action@v3
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: plugins-${{ github.job }}

limitd-client:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -718,6 +736,8 @@ jobs:
- run: yarn test:plugins:ci
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: plugins-${{ github.job }}
- uses: codecov/codecov-action@v3

# TODO: fix performance issues and test more Node versions
Expand All @@ -741,6 +761,8 @@ jobs:
- run: yarn test:plugins:ci
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: plugins-${{ github.job }}-${{ matrix.version }}-${{ github.run_id }matrix.range}
- uses: codecov/codecov-action@v3

openai:
Expand Down Expand Up @@ -831,6 +853,8 @@ jobs:
- run: yarn test:plugins:ci
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: plugins-${{ github.job }}
- uses: codecov/codecov-action@v3

# TODO: re-enable upstream tests if it ever stops being flaky
Expand All @@ -850,6 +874,8 @@ jobs:
# - run: yarn test:plugins:upstream
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: plugins-${{ github.job }}
- uses: codecov/codecov-action@v3

postgres:
Expand Down Expand Up @@ -963,6 +989,8 @@ jobs:
- run: yarn test:plugins:ci
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: plugins-${{ github.job }}
- uses: codecov/codecov-action@v3

tedious:
Expand All @@ -989,6 +1017,8 @@ jobs:
- run: yarn test:plugins:upstream
- if: always()
uses: ./.github/actions/testagent/logs
with:
suffix: plugins-${{ github.job }}
- uses: codecov/codecov-action@v3

undici:
Expand Down
4 changes: 3 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ onboarding_tests_installer:
onboarding_tests_k8s_injection:
parallel:
matrix:
- WEBLOG_VARIANT: sample-app
- WEBLOG_VARIANT: [sample-app]
SCENARIO: [K8S_LIB_INJECTION, K8S_LIB_INJECTION_UDS, K8S_LIB_INJECTION_NO_AC, K8S_LIB_INJECTION_NO_AC_UDS, K8S_LIB_INJECTION_PROFILING_DISABLED, K8S_LIB_INJECTION_PROFILING_ENABLED, K8S_LIB_INJECTION_PROFILING_OVERRIDE]
K8S_CLUSTER_VERSION: ['7.56.2', '7.57.0', '7.59.0']

requirements_json_test:
rules:
Expand Down
3 changes: 3 additions & 0 deletions benchmark/sirun/debugger/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Dynamic Instrumentation Benchmarks

Benchmark the overhead on the instrumented application of different probe configurations.
46 changes: 46 additions & 0 deletions benchmark/sirun/debugger/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
'use strict'

// WARNING: CHANGES TO THIS FUNCTION WILL AFFECT THE LINE NUMBERS OF THE BREAKPOINTS

if (process.env.DD_DYNAMIC_INSTRUMENTATION_ENABLED === 'true') {
require('./start-devtools-client')
}

let n = 0

// Give the devtools client time to connect before doing work
setTimeout(doSomeWork, 250)

function doSomeWork (arg1 = 1, arg2 = 2) {
const data = getSomeData()
data.n = n
if (++n <= 250) {
setTimeout(doSomeWork, 1)
}
}

// Location to put dummy breakpoint that is never hit:
// eslint-disable-next-line no-unused-vars
function dummy () {
throw new Error('This line should never execute')
}

function getSomeData () {
const str = 'a'.repeat(1000)
const arr = Array.from({ length: 1000 }, (_, i) => i)

const data = {
foo: 'bar',
nil: null,
undef: undefined,
bool: true
}
data.recursive = data

for (let i = 0; i < 20; i++) {
data[`str${i}`] = str
data[`arr${i}`] = arr
}

return data
}
Loading

0 comments on commit a0031d6

Please sign in to comment.