Skip to content

Commit 0dcf32e

Browse files
committed
test(mcp-lecturer): use https for the wrong-issuer negative token
The assertion is that the issuer does not match the expected one, so the scheme is irrelevant to the test — but the http literal on a non-localhost host tripped SonarCloud S5332 and pushed the PR's new-code security rating to B, failing the quality gate.
1 parent 8fcb5f5 commit 0dcf32e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

apps/mcp-lecturer/scripts/smoke-negative.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,10 @@ async function main() {
186186
// 3. Token signed with the wrong issuer.
187187
await expectAuthRejectionAtInitialize(
188188
'wrong issuer rejected',
189-
await mintToken({ issuer: 'http://wrong-issuer.invalid' })
189+
// https, not http: the assertion is that the issuer does not MATCH the
190+
// expected one, so the scheme is irrelevant here — and an http literal
191+
// trips SonarCloud's S5332 (insecure protocol) on a non-localhost host.
192+
await mintToken({ issuer: 'https://wrong-issuer.invalid' })
190193
)
191194

192195
// 4. Token with the wrong purpose (e.g. a manage-assistant proposal token

0 commit comments

Comments
 (0)