File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
powershell/ql/test/query-tests/security/cwe-829/DomainSquattingStatic Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ | test.ps1:2:15:2:46 | https://mail.outlook.us/api/v1 | use of obsolete domain %.outlook.us% |
2+ | test.ps1:5:14:5:45 | https://portal.office.us/admin | use of obsolete domain %.office.us% |
3+ | test.ps1:8:13:8:35 | https://goo.gl/abc123 | use of obsolete domain %goo.gl% |
4+ | test.ps1:11:11:11:70 | https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.5.1.min.js | use of obsolete domain %ajax.aspnetcdn.com% |
5+ | test.ps1:14:14:14:68 | http://ajax.microsoft.com/ajax/4.0/1/MicrosoftAjax.js | use of obsolete domain %ajax.microsoft.com% |
Original file line number Diff line number Diff line change 1+ queries/security/cwe-829/DomainSquattingStatic.ql
Original file line number Diff line number Diff line change 1+ # BAD: Uses outlook.us domain
2+ $outlookUrl = " https://mail.outlook.us/api/v1"
3+
4+ # BAD: Uses office.us domain
5+ $officeUrl = " https://portal.office.us/admin"
6+
7+ # BAD: Uses deprecated goo.gl shortener
8+ $shortUrl = " https://goo.gl/abc123"
9+
10+ # BAD: Uses deprecated ajax.aspnetcdn.com
11+ $cdnUrl = " https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.5.1.min.js"
12+
13+ # BAD: Uses deprecated ajax.microsoft.com
14+ $msAjaxUrl = " http://ajax.microsoft.com/ajax/4.0/1/MicrosoftAjax.js"
15+
16+ # GOOD: Uses valid Microsoft domains
17+ $validUrl1 = " https://outlook.office365.com/api/v1"
18+ $validUrl2 = " https://portal.azure.com"
You can’t perform that action at this time.
0 commit comments