Skip to content

Commit e91912e

Browse files
committed
cleanup
1 parent 7359f91 commit e91912e

File tree

3 files changed

+11
-18
lines changed

3 files changed

+11
-18
lines changed

powershell/ql/src/experimental/HardcodedComputerName.ql

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
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

powershell/ql/src/experimental/UseOfReservedCmdletChar.ql

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
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
Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
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
@@ -15,10 +14,6 @@
1514

1615
import powershell
1716

18-
// from Expr e
19-
// where e.getLocation().getFile().getBaseName() = "AvoidUsingUsernameAndPasswordParams.ps1"
20-
// select e, e.getAQlClass()
21-
2217
from Parameter p
2318
where p.getName().toLowerCase() = ["username", "password"]
2419
select p, "Do not use username or password parameters."

0 commit comments

Comments
 (0)