mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
24 lines
1.1 KiB
Plaintext
24 lines
1.1 KiB
Plaintext
import javascript
|
|
import testUtilities.ConsistencyChecking
|
|
import semmle.javascript.security.dataflow.CommandInjectionQuery as CommandInjection
|
|
import semmle.javascript.security.dataflow.IndirectCommandInjectionQuery as IndirectCommandInjection
|
|
import semmle.javascript.security.dataflow.ShellCommandInjectionFromEnvironmentQuery as ShellCommandInjectionFromEnvironment
|
|
import semmle.javascript.security.dataflow.UnsafeShellCommandConstructionQuery as UnsafeShellCommandConstruction
|
|
import semmle.javascript.security.dataflow.SecondOrderCommandInjectionQuery as SecondOrderCommandInjectionQuery
|
|
|
|
class CommandInjectionConsistency extends ConsistencyConfiguration {
|
|
CommandInjectionConsistency() { this = "ComandInjection" }
|
|
|
|
override File getAFile() { not result.getBaseName() = "uselesscat.js" }
|
|
}
|
|
|
|
import semmle.javascript.security.UselessUseOfCat
|
|
|
|
class UselessCatConsistency extends ConsistencyConfiguration {
|
|
UselessCatConsistency() { this = "Cat" }
|
|
|
|
override DataFlow::Node getAnAlert() { result instanceof UselessCat }
|
|
|
|
override File getAFile() { result.getBaseName() = "uselesscat.js" }
|
|
}
|