Skip to content

Commit 4e67ec1

Browse files
committed
Python: Adjust alert text of py/pam-auth-bypass
1 parent f8442cc commit 4e67ec1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

python/ql/src/Security/CWE-285/PamAuthorization.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ import semmle.python.security.dataflow.PamAuthorizationQuery
1818
from Configuration config, DataFlow::PathNode source, DataFlow::PathNode sink
1919
where config.hasFlowPath(source, sink)
2020
select sink.getNode(), source, sink,
21-
"This PAM authentication call may lead to an authorization bypass, since `pam_acct_mgmt` is not called afterwards."
21+
"This PAM authentication depends on a $@, and `pam_acct_mgmt` is not called afterwards.",
22+
source.getNode(), "user-provided value"

python/ql/test/query-tests/Security/CWE-285-PamAuthorization/PamAuthorization.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ nodes
1313
| pam_test.py:76:14:76:40 | ControlFlowNode for pam_authenticate() | semmle.label | ControlFlowNode for pam_authenticate() |
1414
subpaths
1515
#select
16-
| pam_test.py:76:14:76:40 | ControlFlowNode for pam_authenticate() | pam_test.py:4:26:4:32 | ControlFlowNode for ImportMember | pam_test.py:76:14:76:40 | ControlFlowNode for pam_authenticate() | This PAM authentication call may lead to an authorization bypass, since `pam_acct_mgmt` is not called afterwards. |
16+
| pam_test.py:76:14:76:40 | ControlFlowNode for pam_authenticate() | pam_test.py:4:26:4:32 | ControlFlowNode for ImportMember | pam_test.py:76:14:76:40 | ControlFlowNode for pam_authenticate() | This PAM authentication depends on a $@, and `pam_acct_mgmt` is not called afterwards. | pam_test.py:4:26:4:32 | ControlFlowNode for ImportMember | user-provided value |

0 commit comments

Comments
 (0)