diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-17 00:09:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-17 00:09:48 +0300 |
commit | 9b8433e5ecd54f93ee8df3bb9d9038e978d57afc (patch) | |
tree | b94758d475fe9ffe547eb838fbf15b3910234426 /doc/development/internal_api | |
parent | dbfedde341ef6434d40c4c2495f2be751f8bb973 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/internal_api')
-rw-r--r-- | doc/development/internal_api/index.md | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/development/internal_api/index.md b/doc/development/internal_api/index.md index 3605172ceb5..288c0056821 100644 --- a/doc/development/internal_api/index.md +++ b/doc/development/internal_api/index.md @@ -590,6 +590,39 @@ curl --request POST --header "Gitlab-Kas-Api-Request: <JWT token>" \ --data '{ "uuids": ["102e8a0a-fe29-59bd-b46c-57c3e9bc6411", "5eb12985-0ed5-51f4-b545-fd8871dc2870"] }' ``` +### Scan Execution Policies + +Called from GitLab agent server (`kas`) to retrieve `scan_execution_policies` +configured for the project belonging to the agent token. GitLab `kas` uses +this to configure the agent to scan images in the Kubernetes cluster based on the policy. + +```plaintext +GET /internal/kubernetes/modules/starboard_vulnerability/scan_execution_policies +``` + +Example Request: + +```shell +curl --request GET --header "Gitlab-Kas-Api-Request: <JWT token>" \ + --header "Authorization: Bearer <agent token>" "http://localhost:3000/api/v4/internal/kubernetes/modules/starboard_vulnerability/scan_execution_policies" +``` + +Example response: + +```json +{ + "policies": [ + { + "name": "Policy", + "description": "Policy description", + "enabled": true, + "yaml": "---\nname: Policy\ndescription: 'Policy description'\nenabled: true\nactions:\n- scan: container_scanning\nrules:\n- type: pipeline\n branches:\n - main\n", + "updated_at": "2022-06-02T05:36:26+00:00" + } + ] +} +``` + ## Subscriptions The subscriptions endpoint is used by [CustomersDot](https://gitlab.com/gitlab-org/customers-gitlab-com) (`customers.gitlab.com`) |