File tree Expand file tree Collapse file tree 3 files changed +11
-18
lines changed
powershell/ql/src/experimental Expand file tree Collapse file tree 3 files changed +11
-18
lines changed Original file line number Diff line number Diff line change 11/**
22 * @name Hardcoded Computer Name
3- * @description Using externally controlled strings in a command line may allow a malicious
4- * user to change the meaning of the command.
3+ * @description Do not hardcode computer names in powershell scripts.
54 * @kind problem
65 * @problem.severity error
7- * @security-severity 9.8
6+ * @security-severity 7.0
87 * @precision high
9- * @id powershell/microsoft/public/command-injection
8+ * @id powershell/microsoft/public/hardcoded-computer-name
109 * @tags correctness
1110 * security
1211 * external/cwe/cwe-078
Original file line number Diff line number Diff line change 11/**
2- * @name Hardcoded Computer Name
3- * @description Using externally controlled strings in a command line may allow a malicious
4- * user to change the meaning of the command.
2+ * @name Reserved Characters in Function Name
3+ * @description Do not use reserved characters in function names
54 * @kind problem
65 * @problem.severity error
7- * @security-severity 9.8
6+ * @security-severity 7.0
87 * @precision high
9- * @id powershell/microsoft/public/command-injection
8+ * @id powershell/microsoft/public/reserved-characters-in-function-name
109 * @tags correctness
1110 * security
1211 * external/cwe/cwe-078
Original file line number Diff line number Diff line change 11/**
2- * @name Hardcoded Computer Name
3- * @description Using externally controlled strings in a command line may allow a malicious
4- * user to change the meaning of the command.
2+ * @name Use of Username or Password parameter
3+ * @description Do not use username or password parameters
54 * @kind problem
65 * @problem.severity error
7- * @security-severity 9.8
6+ * @security-severity 7.0
87 * @precision high
9- * @id powershell/microsoft/public/command-injection
8+ * @id powershell/microsoft/public/username-or-password-parameter
109 * @tags correctness
1110 * security
1211 * external/cwe/cwe-078
1514
1615 import powershell
1716
18- // from Expr e
19- // where e.getLocation().getFile().getBaseName() = "AvoidUsingUsernameAndPasswordParams.ps1"
20- // select e, e.getAQlClass()
21-
2217from Parameter p
2318where p .getName ( ) .toLowerCase ( ) = [ "username" , "password" ]
2419select p , "Do not use username or password parameters."
You can’t perform that action at this time.
0 commit comments