You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am getting some strange behavior when running one of my queries,
/**
* @name Find all SensitiveVariableExpr instances
* @description Identifies all variables that are considered SensitiveVariableExpr.
* @kind problem
* @problem.severity warning
* @id java/find-sensitive-variable-expr
*/
import java
import SensitiveInfo.SensitiveInfo
from SensitiveVariableExpr sve, Variable v
where sve = v.getAnAccess()
select sve, v.getName().toString() + "|" + v.getType().toString()
This is producing this error
Error was: Expected result pattern(s) are not present for problem query: Expected at least 2 columns. [INVALID_RESULT_PATTERNS]
It looks like I am following the entry-to-string pattern.
This is the full command, I have flags such as max-paths because I am running it with another query in the same dir that is a path problem.
I call this strange because it works just fine in the extension without any errors. Usually, the extension won't display anything if there is a pattern issue.
Here is the SensitiveVariableExpr class for more context
class SensitiveVariableExpr extends Expr {
SensitiveVariableExpr() {
exists(Variable v, File f |
this = v.getAnAccess() and
f = v.getCompilationUnit().getFile() and
sensitiveVariables(f.getBaseName(), v.getName()) and
not this instanceof CompileTimeConstantExpr and
not v.getName().toLowerCase().matches("%encrypted%")
)
}
}
The text was updated successfully, but these errors were encountered:
It looks like @aibaars provided you with information to resolve your issue, therefore I'm closing this issue. If you still need further support, feel free to open a new issue.
Hello, I am getting some strange behavior when running one of my queries,
This is producing this error
It looks like I am following the entry-to-string pattern.
This is the full command, I have flags such as max-paths because I am running it with another query in the same dir that is a path problem.
I call this strange because it works just fine in the extension without any errors. Usually, the extension won't display anything if there is a pattern issue.
Here is the SensitiveVariableExpr class for more context
The text was updated successfully, but these errors were encountered: