Skip to content

Commit

Permalink
JS-234 Update S5332: Add "schemas.microsoft.com" to the list of host …
Browse files Browse the repository at this point in the history
…exceptions (#4838)
  • Loading branch information
yassin-kammoun-sonarsource authored Sep 20, 2024
1 parent ebce909 commit ca71ee8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/jsts/src/rules/S5332/rule.lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const EXCEPTION_FULL_HOSTS = [
'docbook.org',
'graphml.graphdrawing.org',
'json-schema.org',
'schemas.microsoft.com',
];
const EXCEPTION_TOP_HOSTS = [
/\.example$/,
Expand Down
7 changes: 7 additions & 0 deletions packages/jsts/src/rules/S5332/unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,13 @@ ruleTester.run('Using clear-text protocols is security-sensitive', rule, {
},
});`,
},
{
code: `
url = 'http://schemas.microsoft.com/ws/2008/06/identity/claims/groups';
url = 'http://schemas.microsoft.com/identity/claims/displayname';
url = 'http://schemas.microsoft.com';
`,
},
],
invalid: [
{
Expand Down

0 comments on commit ca71ee8

Please sign in to comment.