mirror of
https://github.com/github/codeql.git
synced 2026-05-25 00:27:09 +02:00
PS: Add tests.
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
models
|
||||
edges
|
||||
nodes
|
||||
subpaths
|
||||
testFailures
|
||||
#select
|
||||
@@ -0,0 +1,6 @@
|
||||
$a.f = Source "1"
|
||||
Sink $a.f # $ MISSING: hasValueFlow=1
|
||||
|
||||
$a.f = Source "2"
|
||||
$a.f = 0
|
||||
Sink $a.f # clean
|
||||
13
powershell/ql/test/library-tests/dataflow/fields/test.ql
Normal file
13
powershell/ql/test/library-tests/dataflow/fields/test.ql
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* @kind path-problem
|
||||
*/
|
||||
|
||||
import powershell
|
||||
import semmle.code.powershell.dataflow.DataFlow
|
||||
private import TestUtilities.InlineFlowTest
|
||||
import DefaultFlowTest
|
||||
import ValueFlow::PathGraph
|
||||
|
||||
from ValueFlow::PathNode source, ValueFlow::PathNode sink
|
||||
where ValueFlow::flowPath(source, sink)
|
||||
select sink, source, sink, "$@", source, source.toString()
|
||||
Reference in New Issue
Block a user