Skip to content

Commit 6364ca3

Browse files
committed
chore: don't prepend newline for url property
1 parent 2b91b0c commit 6364ca3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ export const scanner: Bun.Security.Scanner = {
8585
const name = match[1];
8686
const version = match[2];
8787

88-
const url = `\nhttps://socket.dev/npm/package/${name}/overview/${version}`
88+
const url = `https://socket.dev/npm/package/${name}/overview/${version}`
8989

9090
results.push({
9191
level: alert.action === 'error' ? 'fatal' : 'warn',
9292
package: artifact.inputPurl,
9393
url,
94-
description: description.join('\n\n')
94+
description: description.join('\n\n') + '\n'
9595
})
9696
}
9797
}

test/live.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('live', () => {
3232
description: expect.any(String),
3333
level: 'fatal',
3434
package: 'pkg:npm/[email protected]',
35-
url: '\nhttps://socket.dev/npm/package/lodahs/overview/0.0.1-security'
35+
url: 'https://socket.dev/npm/package/lodahs/overview/0.0.1-security'
3636
})
3737

3838
// Verify authenticated API was called
@@ -58,7 +58,7 @@ describe('live', () => {
5858
description: expect.any(String),
5959
level: 'fatal',
6060
package: 'pkg:npm/[email protected]',
61-
url: '\nhttps://socket.dev/npm/package/lodahs/overview/0.0.1-security'
61+
url: 'https://socket.dev/npm/package/lodahs/overview/0.0.1-security'
6262
})
6363

6464
// Verify firewall API was called

0 commit comments

Comments
 (0)