diff --git a/ql/lib/codeql/actions/Ast.qll b/ql/lib/codeql/actions/Ast.qll index 0685b2fc14d..c7573dfb839 100644 --- a/ql/lib/codeql/actions/Ast.qll +++ b/ql/lib/codeql/actions/Ast.qll @@ -96,11 +96,13 @@ class OutputsStmt extends Statement instanceof YamlMapping { } } -// TODO: Needs a characteristic predicate otherwise anything is an output expression -class InputExpr extends Expression instanceof YamlString { } +class InputExpr extends Expression instanceof YamlString { + InputExpr() { exists(InputsStmt inputs | inputs.(YamlMapping).maps(this, _)) } +} -// TODO: Needs a characteristic predicate otherwise anything is an output expression -class OutputExpr extends Expression instanceof YamlString { } +class OutputExpr extends Expression instanceof YamlString { + OutputExpr() { exists(OutputsStmt outputs | outputs.(YamlMapping).maps(_, this)) } +} /** * A Job is a collection of steps that run in an execution environment. diff --git a/ql/lib/codeql/actions/controlflow/internal/Cfg.qll b/ql/lib/codeql/actions/controlflow/internal/Cfg.qll index bb0c25dbdf6..8d044c827a2 100644 --- a/ql/lib/codeql/actions/controlflow/internal/Cfg.qll +++ b/ql/lib/codeql/actions/controlflow/internal/Cfg.qll @@ -35,11 +35,7 @@ module Completion { override string toString() { result = "BooleanCompletion(" + value + ")" } - override predicate isValidForSpecific(AstNode e) { - none() - // TODO: add support for conditional expressions? - //e = any(ConditionalExpression c).getCondition() - } + override predicate isValidForSpecific(AstNode e) { none() } override BooleanSuccessor getAMatchingSuccessorType() { result.getValue() = value }