We are cleared to enrich internal telemetry.
This commit is contained in:
Winston Liu 2024-03-04 16:44:16 -08:00 коммит произвёл GitHub
Родитель 1f530c61dd
Коммит 8087a3239f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
4 изменённых файлов: 31 добавлений и 13 удалений

15
.vscode/tasks.json поставляемый Normal file
Просмотреть файл

@ -0,0 +1,15 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build:dev",
"group": {
"kind": "build",
"isDefault": true
},
"label": "npm: build:dev",
"detail": "webpack --mode development"
}
]
}

Просмотреть файл

@ -44,19 +44,17 @@ addEventListener('unhandledrejection', e => appInsights.trackException({
const organization = SDK.getHost().name
const accessToken = await SDK.getAccessToken();
const identitiesUri = `https://vssps.dev.azure.com/${organization}/_apis/identities?searchFilter=General&filterValue=${user.name}&queryMembership=None&api-version=7.0`
const headers = new Headers();
headers.append("Accept", "application/json");
headers.append("Authorization", "Bearer " + accessToken);
headers.append("X-VSS-ReauthenticationAction", "Suppress");
const options: RequestInit = {
method: "GET",
mode: "cors",
headers: headers
};
try {
const response = await fetch(identitiesUri, options)
const response = await fetch(identitiesUri, {
method: "GET",
mode: "cors",
headers: {
"Accept": "application/json",
"Authorization": `Bearer ${accessToken}`,
"X-VSS-ReauthenticationAction": "Suppress",
}
})
if (response.ok) {
const json = await response.json()
@ -71,6 +69,10 @@ addEventListener('unhandledrejection', e => appInsights.trackException({
appInsights.trackException({ exception: e })
}
if (this.tenant === '72f988bf-86f1-41af-91ab-2d7cd011db47') {
appInsights.setAuthenticatedUserContext(user.name, organization)
}
const projectService = await SDK.getService<IProjectPageService>(CommonServiceIds.ProjectPageService)
const project = await projectService.getProject()
@ -170,6 +172,7 @@ addEventListener('unhandledrejection', e => appInsights.trackException({
})
})()
}
render() {
const { logs, toolNames, user } = this
const numberOfScans = toolNames?.size ?? 0

Просмотреть файл

@ -3,7 +3,7 @@
"id": "scans-dev",
"name": "SARIF SAST Scans Tab DEV",
"public": false,
"version": "0.4.1",
"version": "0.4.2",
"contributions": [
{
"id": "build-tab",

Просмотреть файл

@ -2,7 +2,7 @@
"publisher": "sariftools",
"id": "scans",
"name": "SARIF SAST Scans Tab",
"version": "0.5.2",
"version": "0.5.3",
"public": true,
"contributions": [
{