securitytxt
Creates, updates, deletes, gets or lists a securitytxt resource.
Overview
| Name | securitytxt |
| Type | Resource |
| Id | cloudflare.security_txt.securitytxt |
Fields
The following fields are returned by SELECT queries:
- list
The request was successful.
| Name | Datatype | Description |
|---|---|---|
acknowledgments | array | |
canonical | array | |
contact | array | |
enabled | boolean | |
encryption | array | |
expires | string (date-time) | |
hiring | array | |
policy | array | |
preferred_languages | string | (example: en, es, fr) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | zone_id | Retrieves the current security.txt file configuration for a zone, used for security vulnerability reporting. | |
update | replace | zone_id | Updates the security.txt file configuration for a zone, which provides security researchers with vulnerability reporting information. | |
delete | delete | zone_id | Removes the security.txt file configuration for a zone. The /.well-known/security.txt endpoint will no longer be served. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
zone_id | string | The Cloudflare zone ID. |
SELECT examples
- list
Retrieves the current security.txt file configuration for a zone, used for security vulnerability reporting.
SELECT
acknowledgments,
canonical,
contact,
enabled,
encryption,
expires,
hiring,
policy,
preferred_languages
FROM cloudflare.security_txt.securitytxt
WHERE zone_id = '{{ zone_id }}' -- required
;
REPLACE examples
- update
Updates the security.txt file configuration for a zone, which provides security researchers with vulnerability reporting information.
REPLACE cloudflare.security_txt.securitytxt
SET
acknowledgments = '{{ acknowledgments }}',
canonical = '{{ canonical }}',
contact = '{{ contact }}',
enabled = {{ enabled }},
encryption = '{{ encryption }}',
expires = '{{ expires }}',
hiring = '{{ hiring }}',
policy = '{{ policy }}',
preferred_languages = '{{ preferred_languages }}'
WHERE
zone_id = '{{ zone_id }}' --required
RETURNING
errors,
messages,
success;
DELETE examples
- delete
Removes the security.txt file configuration for a zone. The /.well-known/security.txt endpoint will no longer be served.
DELETE FROM cloudflare.security_txt.securitytxt
WHERE zone_id = '{{ zone_id }}' --required
;