Skip to content

Commit

Permalink
Remove multiple send test
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlesDD committed Nov 22, 2024
1 parent c823d90 commit 8a16b64
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions packages/dd-trace/test/appsec/iast/vulnerability-reporter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,23 +382,6 @@ describe('vulnerability-reporter', () => {
expect(prioritySampler.setPriority).to.have.been.calledOnceWithExactly(span, USER_KEEP, SAMPLING_MECHANISM_APPSEC)
})

it.skip('should not send duplicated vulnerabilities in multiple sends', () => {
const iastContext = { rootSpan: span }
addVulnerability(iastContext,
vulnerabilityAnalyzer._createVulnerability('INSECURE_HASHING', { value: 'sha1' }, 888,
{ path: 'filename.js', line: 88 }))
addVulnerability(iastContext,
vulnerabilityAnalyzer._createVulnerability('INSECURE_HASHING', { value: 'sha1' }, 888,
{ path: 'filename.js', line: 88 }))
sendVulnerabilities(iastContext.vulnerabilities, span)
sendVulnerabilities(iastContext.vulnerabilities, span)
expect(span.addTags).to.have.been.calledOnceWithExactly({
'_dd.iast.json': '{"sources":[],"vulnerabilities":[{"type":"INSECURE_HASHING","hash":3410512691,' +
'"evidence":{"value":"sha1"},"location":{"spanId":888,"path":"filename.js","line":88}}]}'
})
expect(prioritySampler.setPriority).to.have.been.calledOnceWithExactly(span, USER_KEEP, SAMPLING_MECHANISM_APPSEC)
})

it('should not deduplicate vulnerabilities if not enabled', () => {
start({
iast: {
Expand Down

0 comments on commit 8a16b64

Please sign in to comment.