mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
C++: Loosen a few constraints slightly.
This commit is contained in:
@@ -18,13 +18,13 @@ private string privateNames() {
|
||||
[
|
||||
// Inspired by the list on https://cwe.mitre.org/data/definitions/359.html
|
||||
// Government identifiers, such as Social Security Numbers
|
||||
"%social%security%number%",
|
||||
"%social%security%",
|
||||
// Contact information, such as home addresses and telephone numbers
|
||||
"%postcode%", "%zipcode%", "%telephone%",
|
||||
// Geographic location - where the user is (or was)
|
||||
"%latitude%", "%longitude%",
|
||||
// Financial data - such as credit card numbers, salary, bank accounts, and debts
|
||||
"%creditcard%", "%salary%", "%bankaccount%",
|
||||
"%credit%card%", "%salary%", "%bank%account%",
|
||||
// Communications - e-mail addresses, private e-mail messages, SMS text messages, chat logs, etc.
|
||||
"%email%", "%mobile%", "%employer%",
|
||||
// Health - medical conditions, insurance status, prescription records
|
||||
|
||||
@@ -224,10 +224,13 @@ nodes
|
||||
| test3.cpp:429:7:429:14 | password | semmle.label | password |
|
||||
| test3.cpp:431:8:431:15 | password | semmle.label | password |
|
||||
| test3.cpp:507:18:507:39 | social_security_number | semmle.label | social_security_number |
|
||||
| test3.cpp:508:18:508:33 | socialSecurityNo | semmle.label | socialSecurityNo |
|
||||
| test3.cpp:509:18:509:29 | homePostCode | semmle.label | homePostCode |
|
||||
| test3.cpp:511:18:511:26 | telephone | semmle.label | telephone |
|
||||
| test3.cpp:512:18:512:36 | mobile_phone_number | semmle.label | mobile_phone_number |
|
||||
| test3.cpp:513:18:513:22 | email | semmle.label | email |
|
||||
| test3.cpp:514:18:514:38 | my_credit_card_number | semmle.label | my_credit_card_number |
|
||||
| test3.cpp:515:18:515:35 | my_bank_account_no | semmle.label | my_bank_account_no |
|
||||
| test3.cpp:516:18:516:29 | employerName | semmle.label | employerName |
|
||||
| test3.cpp:517:18:517:29 | medical_info | semmle.label | medical_info |
|
||||
| test3.cpp:526:44:526:54 | my_latitude | semmle.label | my_latitude |
|
||||
@@ -268,10 +271,13 @@ subpaths
|
||||
| test3.cpp:420:3:420:6 | call to recv | test3.cpp:420:17:420:24 | password | test3.cpp:420:17:420:24 | password | This operation receives into 'password', which may put unencrypted sensitive data into $@ | test3.cpp:420:17:420:24 | password | password |
|
||||
| test3.cpp:431:2:431:6 | call to fgets | test3.cpp:429:7:429:14 | password | test3.cpp:431:8:431:15 | password | This operation receives into 'password', which may put unencrypted sensitive data into $@ | test3.cpp:429:7:429:14 | password | password |
|
||||
| test3.cpp:507:2:507:5 | call to send | test3.cpp:507:18:507:39 | social_security_number | test3.cpp:507:18:507:39 | social_security_number | This operation transmits 'social_security_number', which may contain unencrypted sensitive data from $@ | test3.cpp:507:18:507:39 | social_security_number | social_security_number |
|
||||
| test3.cpp:508:2:508:5 | call to send | test3.cpp:508:18:508:33 | socialSecurityNo | test3.cpp:508:18:508:33 | socialSecurityNo | This operation transmits 'socialSecurityNo', which may contain unencrypted sensitive data from $@ | test3.cpp:508:18:508:33 | socialSecurityNo | socialSecurityNo |
|
||||
| test3.cpp:509:2:509:5 | call to send | test3.cpp:509:18:509:29 | homePostCode | test3.cpp:509:18:509:29 | homePostCode | This operation transmits 'homePostCode', which may contain unencrypted sensitive data from $@ | test3.cpp:509:18:509:29 | homePostCode | homePostCode |
|
||||
| test3.cpp:511:2:511:5 | call to send | test3.cpp:511:18:511:26 | telephone | test3.cpp:511:18:511:26 | telephone | This operation transmits 'telephone', which may contain unencrypted sensitive data from $@ | test3.cpp:511:18:511:26 | telephone | telephone |
|
||||
| test3.cpp:512:2:512:5 | call to send | test3.cpp:512:18:512:36 | mobile_phone_number | test3.cpp:512:18:512:36 | mobile_phone_number | This operation transmits 'mobile_phone_number', which may contain unencrypted sensitive data from $@ | test3.cpp:512:18:512:36 | mobile_phone_number | mobile_phone_number |
|
||||
| test3.cpp:513:2:513:5 | call to send | test3.cpp:513:18:513:22 | email | test3.cpp:513:18:513:22 | email | This operation transmits 'email', which may contain unencrypted sensitive data from $@ | test3.cpp:513:18:513:22 | email | email |
|
||||
| test3.cpp:514:2:514:5 | call to send | test3.cpp:514:18:514:38 | my_credit_card_number | test3.cpp:514:18:514:38 | my_credit_card_number | This operation transmits 'my_credit_card_number', which may contain unencrypted sensitive data from $@ | test3.cpp:514:18:514:38 | my_credit_card_number | my_credit_card_number |
|
||||
| test3.cpp:515:2:515:5 | call to send | test3.cpp:515:18:515:35 | my_bank_account_no | test3.cpp:515:18:515:35 | my_bank_account_no | This operation transmits 'my_bank_account_no', which may contain unencrypted sensitive data from $@ | test3.cpp:515:18:515:35 | my_bank_account_no | my_bank_account_no |
|
||||
| test3.cpp:516:2:516:5 | call to send | test3.cpp:516:18:516:29 | employerName | test3.cpp:516:18:516:29 | employerName | This operation transmits 'employerName', which may contain unencrypted sensitive data from $@ | test3.cpp:516:18:516:29 | employerName | employerName |
|
||||
| test3.cpp:517:2:517:5 | call to send | test3.cpp:517:18:517:29 | medical_info | test3.cpp:517:18:517:29 | medical_info | This operation transmits 'medical_info', which may contain unencrypted sensitive data from $@ | test3.cpp:517:18:517:29 | medical_info | medical_info |
|
||||
| test3.cpp:527:3:527:6 | call to send | test3.cpp:526:44:526:54 | my_latitude | test3.cpp:527:15:527:20 | buffer | This operation transmits 'buffer', which may contain unencrypted sensitive data from $@ | test3.cpp:526:44:526:54 | my_latitude | my_latitude |
|
||||
|
||||
@@ -505,14 +505,14 @@ void tests2(person_info *pi)
|
||||
{
|
||||
// direct cases
|
||||
send(val(), pi->social_security_number, strlen(pi->social_security_number), val()); // BAD
|
||||
send(val(), pi->socialSecurityNo, strlen(pi->socialSecurityNo), val()); // BAD [NOT DETECTED]
|
||||
send(val(), pi->socialSecurityNo, strlen(pi->socialSecurityNo), val()); // BAD
|
||||
send(val(), pi->homePostCode, strlen(pi->homePostCode), val()); // BAD
|
||||
send(val(), pi->my_zip_code, strlen(pi->my_zip_code), val()); // BAD [NOT DETECTED]
|
||||
send(val(), pi->telephone, strlen(pi->telephone), val()); // BAD
|
||||
send(val(), pi->mobile_phone_number, strlen(pi->mobile_phone_number), val()); // BAD
|
||||
send(val(), pi->email, strlen(pi->email), val()); // BAD
|
||||
send(val(), pi->my_credit_card_number, strlen(pi->my_credit_card_number), val()); // BAD [NOT DETECTED]
|
||||
send(val(), pi->my_bank_account_no, strlen(pi->my_bank_account_no), val()); // BAD [NOT DETECTED]
|
||||
send(val(), pi->my_credit_card_number, strlen(pi->my_credit_card_number), val()); // BAD
|
||||
send(val(), pi->my_bank_account_no, strlen(pi->my_bank_account_no), val()); // BAD
|
||||
send(val(), pi->employerName, strlen(pi->employerName), val()); // BAD
|
||||
send(val(), pi->medical_info, strlen(pi->medical_info), val()); // BAD
|
||||
send(val(), pi->license_key, strlen(pi->license_key), val()); // BAD [NOT DETECTED]
|
||||
|
||||
Reference in New Issue
Block a user