Skip to main content

securitytxt

Creates, updates, deletes, gets or lists a securitytxt resource.

Overview

Namesecuritytxt
TypeResource
Idcloudflare.security_txt.securitytxt

Fields

The following fields are returned by SELECT queries:

The request was successful.

NameDatatypeDescription
acknowledgmentsarray
canonicalarray
contactarray
enabledboolean
encryptionarray
expiresstring (date-time)
hiringarray
policyarray
preferred_languagesstring (example: en, es, fr)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectzone_idRetrieves the current security.txt file configuration for a zone, used for security vulnerability reporting.
updatereplacezone_idUpdates the security.txt file configuration for a zone, which provides security researchers with vulnerability reporting information.
deletedeletezone_idRemoves 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.

NameDatatypeDescription
zone_idstringThe Cloudflare zone ID.

SELECT examples

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

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

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
;