Skip to content

Commit 8ae887b

Browse files
authored
security: add all cspm product endpoints (#1144)
* security: add all cspm product endpoints * security/cspm: fix lint errors * security/cspm: make severity enum capital * security/cspm: refactor to reuse severity, also capitalize * security/cspm: add enum for scan status
1 parent 1bd3add commit 8ae887b

29 files changed

Lines changed: 992 additions & 20 deletions

specification/DigitalOcean-public.v2.yaml

Lines changed: 63 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ tags:
7070
7171
- name: Billing
7272
description: |-
73-
The billing endpoints allow you to retrieve your account balance, invoices,
73+
The billing endpoints allow you to retrieve your account balance, invoices,
7474
billing history, and insights.
7575
7676
**Balance:** By sending requests to the `/v2/customers/my/balance` endpoint, you can
@@ -88,13 +88,13 @@ tags:
8888
issued, or credits granted. To interact with invoices, you
8989
will generally send requests to the invoices endpoint at
9090
`/v2/customers/my/billing_history`.
91-
92-
**Billing Insights:** Day-over-day changes in billing resource usage based on nightly invoice items,
93-
including total amount, region, SKU, and description for a specified date range.
94-
It is important to note that the daily resource usage may not reflect month-end billing totals when totaled for
91+
92+
**Billing Insights:** Day-over-day changes in billing resource usage based on nightly invoice items,
93+
including total amount, region, SKU, and description for a specified date range.
94+
It is important to note that the daily resource usage may not reflect month-end billing totals when totaled for
9595
a given month as nightly invoice items do not necessarily encompass all invoicing factors for the entire month.
96-
`v2/billing/{account_urn}/insights/{start_date}/{end_date}` where account_urn is the URN of the customer
97-
account, can be a team (do:team:uuid) or an organization (do:teamgroup:uuid). The date range specified by
96+
`v2/billing/{account_urn}/insights/{start_date}/{end_date}` where account_urn is the URN of the customer
97+
account, can be a team (do:team:uuid) or an organization (do:teamgroup:uuid). The date range specified by
9898
start_date and end_date must be in YYYY-MM-DD format.
9999
100100
- name: Block Storage
@@ -124,7 +124,7 @@ tags:
124124
- name: "BYOIP Prefixes"
125125
description: |-
126126
Bring your own IP (BYOIP) lets you provision your own IPv4 network prefixes
127-
to your account, then assign those IPs to your DigitalOcean resources.
127+
to your account, then assign those IPs to your DigitalOcean resources.
128128
BYOIP supports the following features:
129129
* IPv4 addresses
130130
* Network sizes of anywhere from `/24` (256 addresses) to `/18` (16,384 addresses)
@@ -170,10 +170,10 @@ tags:
170170
171171
- name: Container Registries
172172
description: |-
173-
DigitalOcean now supports up to nine additional registries (for a total maximum of 10) per team
174-
if your container registry uses the Professional subscription plan. The storage is shared among
175-
the registries. This set of new APIs is backward compatible with `/v2/registry`. However, if you
176-
create more than one registry under a Professional plan, some of the `/v2/registry` APIs would not work.
173+
DigitalOcean now supports up to nine additional registries (for a total maximum of 10) per team
174+
if your container registry uses the Professional subscription plan. The storage is shared among
175+
the registries. This set of new APIs is backward compatible with `/v2/registry`. However, if you
176+
create more than one registry under a Professional plan, some of the `/v2/registry` APIs would not work.
177177
Hence, it is recommended to use `/v2/registries` for multiple registries.
178178
179179
- name: Databases
@@ -400,7 +400,7 @@ tags:
400400
401401
- name: NFS
402402
description: |-
403-
NFS lets you create fully managed, POSIX-compliant network file storage that delivers secure,
403+
NFS lets you create fully managed, POSIX-compliant network file storage that delivers secure,
404404
high-performance shared storage right inside your VPC. This enables seamless data sharing across Droplets in a VPC.
405405
406406
- name: NFS Actions
@@ -521,6 +521,10 @@ tags:
521521
An action object is returned. These objects hold the current status of the
522522
requested action.
523523
524+
- name: Security
525+
description: |-
526+
Security CSPM endpoints for scans, scan findings, and settings.
527+
524528
- name: Sizes
525529
description: |-
526530
The sizes objects represent different packages of hardware resources that
@@ -636,17 +640,17 @@ paths:
636640
/v2/add-ons/apps:
637641
get:
638642
$ref: "resources/addons/addons_get_app.yml"
639-
643+
640644
/v2/add-ons/apps/{app_slug}/metadata:
641645
get:
642646
$ref: "resources/addons/addons_get_app_metadata.yml"
643-
647+
644648
/v2/add-ons/saas:
645649
get:
646650
$ref: "resources/addons/addons_list.yml"
647651
post:
648652
$ref: "resources/addons/addons_create.yml"
649-
653+
650654
/v2/add-ons/saas/{resource_uuid}:
651655
get:
652656
$ref: "resources/addons/addons_get.yml"
@@ -721,7 +725,7 @@ paths:
721725

722726
/v2/apps/{app_id}/job-invocations:
723727
get:
724-
$ref: "resources/apps/apps_list_job_invocations.yml"
728+
$ref: "resources/apps/apps_list_job_invocations.yml"
725729

726730
/v2/apps/{app_id}/job-invocations/{job_invocation_id}:
727731
get:
@@ -1795,13 +1799,13 @@ paths:
17951799
/v2/nfs/{nfs_id}/actions:
17961800
post:
17971801
$ref: "resources/nfs/nfs_actions_create.yml"
1798-
1802+
17991803
/v2/nfs/snapshots:
18001804
get:
18011805
$ref: "resources/nfs/nfs_snapshot_list.yml"
18021806

18031807
/v2/nfs/snapshots/{nfs_snapshot_id}:
1804-
get:
1808+
get:
18051809
$ref: "resources/nfs/nfs_snapshot_get.yml"
18061810

18071811
delete:
@@ -2088,6 +2092,45 @@ paths:
20882092
get:
20892093
$ref: "resources/byoip_prefixes/byoip_prefix_list_resources.yml"
20902094

2095+
/v2/security/scans:
2096+
get:
2097+
$ref: "resources/security/security_scans_list.yml"
2098+
2099+
post:
2100+
$ref: "resources/security/security_scans_create.yml"
2101+
2102+
/v2/security/scans/{scan_id}:
2103+
get:
2104+
$ref: "resources/security/security_scans_get.yml"
2105+
2106+
/v2/security/scans/latest:
2107+
get:
2108+
$ref: "resources/security/security_scans_get_latest.yml"
2109+
2110+
/v2/security/scans/rules:
2111+
post:
2112+
$ref: "resources/security/security_scan_rule_create.yml"
2113+
2114+
/v2/security/scans/{scan_id}/findings/{finding_uuid}/affected_resources:
2115+
get:
2116+
$ref: "resources/security/security_scan_finding_list_affected_resources.yml"
2117+
2118+
/v2/security/settings:
2119+
get:
2120+
$ref: "resources/security/security_settings_list.yml"
2121+
2122+
/v2/security/settings/plan:
2123+
put:
2124+
$ref: "resources/security/security_settings_plan_update.yml"
2125+
2126+
/v2/security/settings/suppressions:
2127+
post:
2128+
$ref: "resources/security/security_suppression_create.yml"
2129+
2130+
/v2/security/settings/suppressions/{suppression_uuid}:
2131+
delete:
2132+
$ref: "resources/security/security_suppression_delete.yml"
2133+
20912134
/v2/sizes:
20922135
get:
20932136
$ref: "resources/sizes/sizes_list.yml"
@@ -2527,7 +2570,7 @@ paths:
25272570
/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}:
25282571
put:
25292572
$ref: 'resources/gen-ai/genai_update_knowledge_base_data_source.yml'
2530-
2573+
25312574
delete:
25322575
$ref: 'resources/gen-ai/genai_delete_knowledge_base_data_source.yml'
25332576

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lang: cURL
2+
source: |-
3+
curl -X GET \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
"https://api.digitalocean.com/v2/security/scans/497dcba3-ecbf-4587-a2dd-5eb0665e6880/findings/50e14f43-dd4e-412f-864d-78943ea28d91/affected_resources"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
lang: cURL
2+
source: |-
3+
curl -X POST \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
-d '{"resource": "do:droplet:fe3a2fd7-903d-46e6-ada3-3e4f285fb89d"}' \
7+
"https://api.digitalocean.com/v2/security/scans/rules"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lang: cURL
2+
source: |-
3+
curl -X POST \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
"https://api.digitalocean.com/v2/security/scans"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lang: cURL
2+
source: |-
3+
curl -X GET \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
"https://api.digitalocean.com/v2/security/scans/497dcba3-ecbf-4587-a2dd-5eb0665e6880"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lang: cURL
2+
source: |-
3+
curl -X GET \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
"https://api.digitalocean.com/v2/security/scans/latest"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lang: cURL
2+
source: |-
3+
curl -X GET \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
"https://api.digitalocean.com/v2/security/scans"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lang: cURL
2+
source: |-
3+
curl -X GET \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
"https://api.digitalocean.com/v2/security/settings"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
lang: cURL
2+
source: |-
3+
curl -X PUT \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
-d '{"tier_coverage":{"basic":{"resources":["do:droplet:fe3a2fd7-903d-46e6-ada3-3e4f285fb89d"],"tags":["production"]}}}' \
7+
"https://api.digitalocean.com/v2/security/settings/plan"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
lang: cURL
2+
source: |-
3+
curl -X POST \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
-d '{"rule_uuid":"497dcba3-ecbf-4587-a2dd-5eb0665e6880","resources":["do:droplet:fe3a2fd7-903d-46e6-ada3-3e4f285fb89d"]}' \
7+
"https://api.digitalocean.com/v2/security/settings/suppressions"

0 commit comments

Comments
 (0)