Org Enablement - Get

获取组织的“高级安全”的当前状态

GET https://advsec.dev.azure.com/{organization}/_apis/management/enablement?api-version=7.2-preview.1
GET https://advsec.dev.azure.com/{organization}/_apis/management/enablement?includeAllProperties={includeAllProperties}&api-version=7.2-preview.1

URI 参数

名称 必需 类型 说明
organization
path True

string

Azure DevOps 组织的名称。

api-version
query True

string

要使用的 API 版本。 这应设置为“7.2-preview.1”才能使用此版本的 API。

includeAllProperties
query

boolean

如果为 true,则还要确定是否阻止推送(如果它们包含机密)

响应

名称 类型 说明
200 OK

AdvSecEnablementSettings

成功的操作

安全性

oauth2

Type: oauth2
Flow: accessCode
Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

Scopes

名称 说明
vso.advsec 授予读取警报、结果实例、分析结果实例的能力

定义

名称 说明
AdvSecEnablementFeatures
AdvSecEnablementSettings
AdvSecEnablementStatus

AdvSecEnablementFeatures

名称 类型 说明
dependabotEnabled

boolean

Dependabot 启用状态在禁用时设置为 False,启用时设置为 True;从不显式设置 Null。
如果为 true,Dependabot 将打开 PR,以支持过时依赖项的安全更新。
目前,仅支持启用存储库,而不支持组织或项目启用,设置 Dependabot 启用状态。

AdvSecEnablementSettings

名称 类型 说明
enableOnCreate

boolean

在新创建的存储库上自动启用高级安全。

reposEnablementStatus

AdvSecEnablementStatus[]

AdvSecEnablementStatus

名称 类型 说明
advSecEnabled

boolean

禁用时将高级安全启用状态设置为 False,启用时设置为 True;从不显式设置 Null。

advSecEnablementFeatures

AdvSecEnablementFeatures

包括可与高级安全一起启用的其他功能。

advSecEnablementLastChangedDate

string

此存储库的“高级安全”状态上次更新的时间

blockPushes

boolean

如果为 true,将阻止包含机密的推送。
如果为 false,则扫描推送以查找机密,并且不会阻止。
如果请求中的 includeAllProperties 为 false,则此值将为 null。

projectId

string

repositoryId

string