Skip to content

Commit

Permalink
remove DB source
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasShabi committed Jan 3, 2025
1 parent 424a1ca commit 8c5b5bc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ class UntrustedDeserializationAnalyzer extends InjectionAnalyzer {
onConfigure () {
this.addSub('datadog:node-serialize:unserialize:start', ({ obj }) => this.analyze(obj))
}

_areRangesVulnerable () {
return true
}
}

module.exports = new UntrustedDeserializationAnalyzer()
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const { prepareTestServerForIast } = require('../utils')
const { storage } = require('../../../../../datadog-core')
const iastContextFunctions = require('../../../../src/appsec/iast/iast-context')
const { newTaintedString } = require('../../../../src/appsec/iast/taint-tracking/operations')
const { SQL_ROW_VALUE } = require('../../../../src/appsec/iast/taint-tracking/source-types')

describe('untrusted-deserialization-analyzer with node-serialize', () => {
withVersions('node-serialize', 'node-serialize', version => {
Expand All @@ -28,14 +27,6 @@ describe('untrusted-deserialization-analyzer with node-serialize', () => {
lib.unserialize(str)
}, 'UNTRUSTED_DESERIALIZATION')

testThatRequestHasVulnerability(() => {
const store = storage.getStore()
const iastContext = iastContextFunctions.getIastContext(store)
const str = newTaintedString(iastContext, obj, 'query', SQL_ROW_VALUE)
lib.unserialize(str)
}, 'UNTRUSTED_DESERIALIZATION', undefined, undefined, undefined,
'Should detect UNTRUSTED_DESERIALIZATION vulnerability with DB source')

testThatRequestHasNoVulnerability(() => {
lib.unserialize(obj)
}, 'UNTRUSTED_DESERIALIZATION')
Expand Down

0 comments on commit 8c5b5bc

Please sign in to comment.