次の方法で共有


Project Enablement - Get

プロジェクトの Advanced Security の現在の状態を取得する

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

URI パラメーター

名前 / 必須 説明
organization
path True

string

Azure DevOps 組織の名前。

project
path True

string

プロジェクト ID またはプロジェクト名

api-version
query True

string

使用する API のバージョン。 このバージョンの API を使用するには、これを '7.2-preview.3' に設定する必要があります。

includeAllProperties
query

boolean

true の場合は、プッシュにシークレットが含まれている場合にブロックされるかどうかも確認します

応答

名前 説明
200 OK

ProjectEnablementSettings

成功した操作

セキュリティ

oauth2

型: oauth2
フロー: accessCode
Authorization URL (承認 URL): https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL (トークン 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

スコープ

名前 説明
vso.advsec アラート、結果インスタンス、分析結果インスタンスを読み取る機能を付与します

定義

名前 説明
CodeSecurityFeatures
EnablementOnCreateSettings
ProjectEnablementSettings
RepoEnablementSettings
SecretProtectionFeatures

CodeSecurityFeatures

名前 説明
codeQLEnabled

boolean

CodeQL 有効化状態が無効の場合は False に設定され、有効な場合は True に設定されます。Null が明示的に設定されることはありません。

codeSecurityChangedBy

string (uuid)

Code Security の有効化状態を変更した最後のユーザーの VSID。

codeSecurityEnabled

boolean

Code Security enablement status set to False when disabled and True when enabled;Null が明示的に設定されることはありません。

codeSecurityEnablementLastChangedDate

string (date-time)

このリポジトリのコード セキュリティの状態が最後に更新された時刻

dependencyScanningInjectionEnabled

boolean

依存関係スキャン挿入の有効化状態が無効の場合は False に、有効な場合は True に設定されます。Null が明示的に設定されることはありません。
Advanced Security がまだ有効になっていない場合、動作は Advanced Security を有効または無効にするかどうかによって異なります。 DependencyScanningInjectionEnabled は、このシナリオでは何も影響しません。
Advanced Security を無効にする場合、DependencyScanningInjectionEnabled の値は無効になります。

EnablementOnCreateSettings

名前 説明
enableBlockPushesOnCreate

boolean

シークレット保護が自動有効になっている場合、シークレットを含むプッシュのブロックを自動的に有効にします。 EnableSecretProtectionOnCreate が true でない場合、このフラグは無視されます。

enableCodeQLOnCreate

boolean

Code Security が自動有効になっている場合は、CodeQL を自動的に有効にします。 EnableCodeSecurityOnCreate が true でない場合、このフラグは無視されます。

enableCodeSecurityOnCreate

boolean

新しく作成されたリポジトリで Code Security を自動的に有効にします。

enableDependabotOnCreate

boolean

コード セキュリティが自動的に有効になっているときに、Dependabot を自動的に有効にします。 EnableCodeSecurityOnCreate が true でない場合、このフラグは無視されます。

enableDependencyScanningInjectionOnCreate

boolean

コード セキュリティが自動有効になっている場合、依存関係スキャンの挿入を自動的に有効にします。 EnableCodeSecurityOnCreate が true でない場合、このフラグは無視されます。

enableSecretProtectionOnCreate

boolean

新しく作成されたリポジトリで Secret Protection を自動的に有効にします。

ProjectEnablementSettings

名前 説明
codeSecurityFeatures

CodeSecurityFeatures

有効にできるコード セキュリティ機能が含まれています。

enablementOnCreateSettings

EnablementOnCreateSettings

新しく作成されたリポジトリの自動有効化設定。

reposEnablementStatus

RepoEnablementSettings[]

指定した組織内またはプロジェクト内のリポジトリの有効化状態の一覧。

secretProtectionFeatures

SecretProtectionFeatures

有効にできるシークレット保護機能が含まれています。

RepoEnablementSettings

名前 説明
codeSecurityFeatures

CodeSecurityFeatures

有効にできるコード セキュリティ機能が含まれています。

projectId

string (uuid)

プロジェクト ID

repositoryId

string (uuid)

リポジトリ ID

secretProtectionFeatures

SecretProtectionFeatures

有効にできるシークレット保護機能が含まれています。

SecretProtectionFeatures

名前 説明
blockPushes

boolean

true の場合、シークレットを含むプッシュはブロックされます。
false の場合、プッシュはシークレットをスキャンし、ブロックされません。
要求に includeAllProperties が false の場合、この値は null になります。

secretProtectionChangedBy

string (uuid)

シークレット保護の有効化状態を変更した最後のユーザーの VSID。

secretProtectionEnabled

boolean

シークレット保護の有効化状態が無効の場合は False に設定され、有効な場合は True に設定されます。Null が明示的に設定されることはありません。

secretProtectionEnablementLastChangedDate

string (date-time)

このリポジトリのシークレット保護の状態が最後に更新された時刻