-
-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathdraft-foudil-securitytxt-06.txt
More file actions
1232 lines (780 loc) · 43.4 KB
/
Copy pathdraft-foudil-securitytxt-06.txt
File metadata and controls
1232 lines (780 loc) · 43.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Network Working Group E. Foudil
Internet-Draft
Intended status: Informational Y. Shafranovich
Expires: October 10, 2019 Nightwatch Cybersecurity
April 08, 2019
A Method for Web Security Policies
draft-foudil-securitytxt-06
Abstract
When security vulnerabilities are discovered by independent security
researchers, they often lack the channels to report them properly.
As a result, security vulnerabilities may be left unreported. This
document defines a format ("security.txt") to help organizations
describe the process for security researchers to follow in order to
report security vulnerabilities.
Status of This Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on October 10, 2019.
Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
Foudil & Shafranovich Expires October 10, 2019 [Page 1]
Internet-Draft A Method for Web Security Policies April 2019
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Motivation and Prior Work . . . . . . . . . . . . . . . . 3
1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4
2. Note to Readers . . . . . . . . . . . . . . . . . . . . . . . 4
3. The Specification . . . . . . . . . . . . . . . . . . . . . . 4
3.1. Scope . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2. Comments . . . . . . . . . . . . . . . . . . . . . . . . 5
3.3. Separate Fields . . . . . . . . . . . . . . . . . . . . . 6
3.4. Digital signature . . . . . . . . . . . . . . . . . . . . 6
3.5. Field Definitions . . . . . . . . . . . . . . . . . . . . 6
3.5.1. Acknowledgments . . . . . . . . . . . . . . . . . . . 6
3.5.2. Canonical . . . . . . . . . . . . . . . . . . . . . . 7
3.5.3. Contact . . . . . . . . . . . . . . . . . . . . . . . 7
3.5.4. Encryption . . . . . . . . . . . . . . . . . . . . . 7
3.5.5. Hiring . . . . . . . . . . . . . . . . . . . . . . . 8
3.5.6. Policy . . . . . . . . . . . . . . . . . . . . . . . 8
3.5.7. Preferred-Languages . . . . . . . . . . . . . . . . . 8
3.6. Example of an unsigned "security.txt" file . . . . . . . 9
3.7. Example of a signed "security.txt" file . . . . . . . . . 9
4. Location of the security.txt file . . . . . . . . . . . . . . 10
4.1. Web-based services . . . . . . . . . . . . . . . . . . . 10
4.2. Filesystems . . . . . . . . . . . . . . . . . . . . . . . 10
4.3. Internal hosts . . . . . . . . . . . . . . . . . . . . . 10
4.4. Extensibility . . . . . . . . . . . . . . . . . . . . . . 10
5. File Format Description and ABNF Grammar . . . . . . . . . . 11
6. Security Considerations . . . . . . . . . . . . . . . . . . . 12
6.1. Compromised Files and Redirects . . . . . . . . . . . . . 12
6.2. Incorrect or Stale Information . . . . . . . . . . . . . 12
6.3. Intentionally Malformed Files, Resources and Reports . . 13
6.4. No Implied Permission for Testing . . . . . . . . . . . . 13
6.5. Multi-user Environments . . . . . . . . . . . . . . . . . 13
6.6. Protecting Data in Transit . . . . . . . . . . . . . . . 14
6.7. Spam and Spurious Reports . . . . . . . . . . . . . . . . 14
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14
7.1. Well-Known URIs registry . . . . . . . . . . . . . . . . 14
7.2. Registry for security.txt Header Fields . . . . . . . . . 15
8. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 16
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 17
9.1. Normative References . . . . . . . . . . . . . . . . . . 17
9.2. Informative References . . . . . . . . . . . . . . . . . 19
Appendix A. Note to Readers . . . . . . . . . . . . . . . . . . 19
Appendix B. Document History . . . . . . . . . . . . . . . . . . 20
B.1. Since draft-foudil-securitytxt-00 . . . . . . . . . . . . 20
Foudil & Shafranovich Expires October 10, 2019 [Page 2]
Internet-Draft A Method for Web Security Policies April 2019
B.2. Since draft-foudil-securitytxt-01 . . . . . . . . . . . . 20
B.3. Since draft-foudil-securitytxt-02 . . . . . . . . . . . . 21
B.4. Since draft-foudil-securitytxt-03 . . . . . . . . . . . . 21
B.5. Since draft-foudil-securitytxt-04 . . . . . . . . . . . . 21
B.6. Since draft-foudil-securitytxt-05 . . . . . . . . . . . . 22
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 22
1. Introduction
1.1. Motivation and Prior Work
Many security researchers encounter situations where they are unable
to report security vulnerabilities to organizations because there is
no course of action laid out or no way indicated to contact the owner
of a particular resource.
As per section 4 of [RFC2142], there is an existing convention of
using the <SECURITY@domain> email address for communications
regarding security vulnerabilities. That convention provides only a
single, email-based channel of communication for security
vulnerabilities per domain, and does not provide a way for domain
owners to publish information about their security disclosure
policies.
There are also contact conventions prescribed for Internet Service
Providers (ISPs) in section 2 of [RFC3013], for Computer Security
Incident Response Teams (CSIRTs) in section 3.2 of [RFC2350] and for
site operators in section 5.2 of [RFC2196]. As per [RFC7485], there
is also contact information provided by Regional Internet Registries
(RIRs) and domain registries for owners of IP addresses, autonomous
system numbers (ASNs) and domain names. However, none of these
address the issue of how security researchers can locate disclosure
policies and contact information for organizations in order to report
security vulnerabilities.
In this document, we define a richer, machine-parsable and more
extensible way for organizations to communicate information about
their security disclosure policies, which is not limited to email and
also allows for additional features such as encryption. This format
is designed to help assist with the security disclosure process by
making it easier for organizations to designate the preferred steps
for researchers to take when trying to reach out to them with
security vulnerabilities.
Foudil & Shafranovich Expires October 10, 2019 [Page 3]
Internet-Draft A Method for Web Security Policies April 2019
1.2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
2. Note to Readers
*Note to the RFC Editor:* Please remove this section prior to
publication.
Development of this draft takes place on Github at:
https://github.com/securitytxt/security-txt
3. The Specification
This document defines a text file to be placed in a known location
that provides information for security researchers to assist in
disclosing security vulnerabilities.
The file is named "security.txt", and this file SHOULD be placed
under the /.well-known/ path ("/.well-known/security.txt") [RFC5785]
of a domain name or IP address for web properties. If it is not
possible to place the security.txt file in the /.well-known/ path or
setup a redirect, web-based services MAY place the file in the top-
level path of a given web domain or IP address ("/security.txt") as a
fallback option (see Section 4.1).
For web-based services, the file MUST be accessible via the Hypertext
Transfer Protocol (HTTP) [RFC1945] as a resource of Internet Media
Type "text/plain" with the default charset parameter set to "utf-8"
per section 4.1.3 of [RFC2046], and it MUST be served with "https"
(as per section 2.7.2 of [RFC7230]). For file systems and version
control repositories a "security.txt" file SHOULD be placed in the
root directory of a particular file system or source code project.
This text file contains multiple directives with different values.
The "directive" is the first part of a field all the way up to the
colon ("Contact:") and follows the syntax defined for "field-name" in
section 3.6.8 of [RFC5322]. Directives MUST be case-insensitive (as
per section 2.3 of [RFC5234]). The "value" comes after the directive
("https://example.com/security") and follows the syntax defined for
"unstructured" in section 3.2.5 of [RFC5322].
A "field" MUST always consist of a directive and a value ("Contact:
https://example.com/security"). A security.txt file can have an
Foudil & Shafranovich Expires October 10, 2019 [Page 4]
Internet-Draft A Method for Web Security Policies April 2019
unlimited number of fields. It is important to note that you MUST
have a separate line for every field. One MUST NOT chain multiple
values for a single directive unless it is explicitly defined by that
particular field. Unless otherwise indicated in a definition of a
particular field, any directive MAY appear multiple times.
3.1. Scope
A "security.txt" file MUST only apply to the domain in the URI used
to retrieve it, not to any of its subdomains or parent domains. A
"security.txt" file that is found in a file system or version control
repository MUST only apply to the folder or repository in which it is
located, and not to any of its parent or sibling folders, or
repositories. However, it will apply to all subfolders.
Some examples appear below:
# The following only applies to example.com.
https://example.com/.well-known/security.txt
# This only applies to subdomain.example.com.
https://subdomain.example.com/.well-known/security.txt
# This security.txt file applies to IPv4 address of 192.0.2.0.
https://192.0.2.0/.well-known/security.txt
# This security.txt file applies to IPv6 address of 2001:db8:8:4::2.
https://[2001:db8:8:4::2]/.well-known/security.txt
# This security.txt file applies to the /example/folder1 directory and subfolders.
/example/folder1/security.txt
3.2. Comments
Any line beginning with the "#" (%x30) symbol MUST be interpreted as
a comment. The content of the comment may contain any ASCII or
Unicode characters in the %x21-7E and %x80-FFFFF ranges plus the tab
(%x09) and space (%x20) characters.
Example:
# This is a comment.
You MAY use one or more comments as descriptive text immediately
before the field. Parsers SHOULD associate the comments with the
respective field.
Foudil & Shafranovich Expires October 10, 2019 [Page 5]
Internet-Draft A Method for Web Security Policies April 2019
3.3. Separate Fields
A separate line is REQUIRED for every new value and field. You MUST
NOT chain everything into a single field unless defined by that
field. Every line MUST end either with a carriage return and line
feed characters (CRLF / %x0D %x0A) or just a line feed character (LF
/ %x0A).
3.4. Digital signature
It is RECOMMENDED that a security.txt file be digitally signed using
an OpenPGP cleartext signature as described in section 7 of
[RFC4880]. When digital signatures are used, it is also RECOMMENDED
that implementors use the "Canonical" directive (as per
Section 3.5.2), thus allowing the digital signature to authenticate
the location of the file.
When it comes to verifying the key used to generate the signature, it
is always the security researcher's responsibility to make sure the
key being used is indeed one they trust.
3.5. Field Definitions
3.5.1. Acknowledgments
This directive allows you to link to a page where security
researchers are recognized for their reports. The page being linked
to SHOULD list individuals or organizations that reported security
vulnerabilities and worked with you to remediate the issue.
Organizations SHOULD be careful to limit the vulnerability
information being published in order to prevent future attacks.
If this directive indicates a web URL, then it MUST begin with
"https://" (as per section 2.7.2 of [RFC7230]).
Example:
Acknowledgments: https://example.com/hall-of-fame.html
Example security acknowledgments page:
We would like to thank the following researchers:
(2017-04-15) Frank Denis - Reflected cross-site scripting
(2017-01-02) Alice Quinn - SQL injection
(2016-12-24) John Buchner - Stored cross-site scripting
(2016-06-10) Anna Richmond - A server configuration issue
Foudil & Shafranovich Expires October 10, 2019 [Page 6]
Internet-Draft A Method for Web Security Policies April 2019
3.5.2. Canonical
This directive indicates the canonical URI where the security.txt
file is located, which is usually something like
"https://example.com/.well-known/security.txt". If this directive
indicates a web URL, then it MUST begin with "https://" (as per
section 2.7.2 of [RFC7230]). The purpose of this directive is to
allow a digital signature to be applied to the location of the
"security.txt" file.
This directive MUST NOT appear more than once.
Canonical: https://example.com/.well-known/security.txt
3.5.3. Contact
This directive allows you to provide an address that researchers
SHOULD use for reporting security vulnerabilities. The value MAY be
an email address, a phone number and/or a web page with contact
information. The "Contact:" directive MUST always be present in a
security.txt file. If this directive indicates a web URL, then it
MUST begin with "https://" (as per section 2.7.2 of [RFC7230]).
Security email addresses SHOULD use the conventions defined in
section 4 of [RFC2142].
The value MUST follow the URI syntax described in [RFC3986]. This
means that "mailto" and "tel" URI schemes MUST be used when
specifying email addresses and telephone numbers, as defined in
[RFC6068] and [RFC3966]. When the value of this directive is an
email address, it is RECOMMENDED that encryption be used (as per
Section 3.5.4).
The precedence SHOULD be in listed order. The first field is the
preferred method of contact. In the example below, the email address
is the preferred method of contact.
Contact: mailto:security@example.com
Contact: tel:+1-201-555-0123
Contact: https://example.com/security-contact.html
3.5.4. Encryption
This directive allows you to point to an encryption key that security
researchers SHOULD use for encrypted communication. You MUST NOT
directly add your key to the field, instead the value of this field
MUST be a URI pointing to a location where the key can be retrieved
from. If this directive indicates a web URL, then it MUST begin with
"https://" (as per section 2.7.2 of [RFC7230]).
Foudil & Shafranovich Expires October 10, 2019 [Page 7]
Internet-Draft A Method for Web Security Policies April 2019
When it comes to verifying the authenticity of the key, it is always
the security researcher's responsibility to make sure the key being
specified is indeed one they trust. Researchers MUST NOT assume that
this key is used to generate the digital signature referenced in
Section 3.4.
Example of an OpenPGP key available from a web server:
Encryption: https://example.com/pgp-key.txt
Example of an OpenPGP key available from an OPENPGPKEY DNS record:
Encryption: dns:5d2d37ab76d47d36._openpgpkey.example.com?type=OPENPGPKEY
Example of an OpenPGP key being referenced by its fingerprint:
Encryption: openpgp4fpr:5f2de5521c63a801ab59ccb603d49de44b29100f
3.5.5. Hiring
The "Hiring" directive is used for linking to the vendor's security-
related job positions. If this directive indicates a web URL, then
it MUST begin with "https://" (as per section 2.7.2 of [RFC7230]).
Hiring: https://example.com/jobs.html
3.5.6. Policy
This directive allows you to link to where your security policy and/
or disclosure policy is located. This can help security researchers
understand what you are looking for and how to report security
vulnerabilities. If this directive indicates a web URL, then it MUST
begin with "https://" (as per section 2.7.2 of [RFC7230]).
Example:
Policy: https://example.com/security-policy.html
3.5.7. Preferred-Languages
This directive can be used to indicate a set of natural languages
that are preferred when submitting security reports. This set MAY
list multiple values, separated by commas. If this directive is
included then at least one value MUST be listed. The values within
this set are language tags (as defined in [RFC5646]). If this
directive is absent, security researchers MAY assume that English is
the default language to be used (as per section 4.5 of [RFC2277]).
Foudil & Shafranovich Expires October 10, 2019 [Page 8]
Internet-Draft A Method for Web Security Policies April 2019
The order in which they appear MUST NOT be interpreted as an
indication of priority - rather these MUST BE interpreted as all
being of equal priority.
This directive MUST NOT appear more than once.
Example (English, Spanish and French):
Preferred-Languages: en, es, fr
3.6. Example of an unsigned "security.txt" file
# Our security address
Contact: mailto:security@example.com
# Our OpenPGP key
Encryption: https://example.com/pgp-key.txt
# Our security policy
Policy: https://example.com/security-policy.html
# Our security acknowledgments page
Acknowledgments: https://example.com/hall-of-fame.html
3.7. Example of a signed "security.txt" file
----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
# Canonical URL
Canonical: https://example.com/.well-known/security.txt
# Our security address
Contact: mailto:security@example.com
# Our OpenPGP key
Encryption: https://example.com/pgp-key.txt
# Our security policy
Policy: https://example.com/security-policy.html
# Our security acknowledgments page
Acknowledgments: https://example.com/hall-of-fame.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
[signature]
-----END PGP SIGNATURE-----
Foudil & Shafranovich Expires October 10, 2019 [Page 9]
Internet-Draft A Method for Web Security Policies April 2019
4. Location of the security.txt file
4.1. Web-based services
Web-based services SHOULD place the security.txt file under the
/.well-known/ path; e.g. https://example.com/.well-known/security.txt
as per [RFC5785]. A security.txt file located under the top-level
path SHOULD either redirect (as per section 6.4 of [RFC7231]) to the
security.txt file under the /.well-known/ path or be used as a
fallback if the ".well-known" path cannot be used.
If retrieval of a "security.txt" file results in a redirect (as per
section 6.4 of [RFC7231]), the implementors MUST NOT follow redirects
that lead to another domain or subdomain but SHOULD follow redirects
within the same domain name (but not different subdomain on the same
domain).
The guidance regarding redirects SHOULD NOT apply to the resource
locations that appear within the file.
4.2. Filesystems
File systems SHOULD place the "security.txt" file under the root
directory; e.g., "/security.txt", "C:\security.txt".
Example file system:
/example-directory-1/
/example-directory-2/
/example-directory-3/
/example-file
/security.txt
4.3. Internal hosts
A "security.txt" file SHOULD be placed in the root directory of an
internal host.
4.4. Extensibility
Like many other formats and protocols, this format may need to be
extended over time to fit the ever-changing landscape of the
Internet. Therefore, extensibility is provided via an IANA registry
for directives as defined in Section 7.2. Any directives registered
via that process MUST be considered optional. To encourage
extensibility and interoperability, implementors MUST ignore any
fields they do not explicitly support.
Foudil & Shafranovich Expires October 10, 2019 [Page 10]
Internet-Draft A Method for Web Security Policies April 2019
In general, implementors SHOULD "be conservative in what you do, be
liberal in what you accept from others" (as per [RFC0793]).
5. File Format Description and ABNF Grammar
The expected file format of the security.txt file is plain text (MIME
type "text/plain") as defined in section 4.1.3 of [RFC2046] and is
encoded using UTF-8 [RFC3629] in Net-Unicode form [RFC5198].
The following is an ABNF definition of the security.txt format, using
the conventions defined in [RFC5234].
body = signed / unsigned
signed = sign-header unsigned sign-footer
sign-header = <headers and line from section 7 of [RFC4880]>
sign-footer = <OpenPGP signature from section 7 of [RFC4880]>
unsigned = *line (canonical-field eol) (lang-field eol) *line
line = (field / comment) eol
eol = *WSP [CR] LF
field = ack-field /
contact-field /
encryption-field /
hiring-field /
policy-field /
ext-field
fs = ":"
comment = "#" *(WSP / VCHAR / %x80-FFFFF)
ack-field = "Acknowledgments" fs SP uri
canonical-field = "Canonical" fs SP uri
contact-field = "Contact" fs SP uri
lang-tag = <Language-Tag from section 2.1 of [RFC5646]>
uri = <URI as per [RFC3986]>
encryption-field = "Encryption" fs SP uri
Foudil & Shafranovich Expires October 10, 2019 [Page 11]
Internet-Draft A Method for Web Security Policies April 2019
hiring-field = "Hiring" fs SP uri
policy-field = "Policy" fs SP uri
lang-field = "Preferred-Languages" fs SP lang-values
lang-values = lang-tag *("," [WSP] lang-tag)
ext-field = field-name fs SP unstructured
field-name = <imported from section 3.6.8 of [RFC5322]>
unstructured = <imported from section 3.2.5 of [RFC5322]>
"ext-field" refers to extension fields, which are discussed in
Section 4.4
6. Security Considerations
6.1. Compromised Files and Redirects
An attacker that has compromised a website is able to compromise the
"security.txt" file as well or setup a redirect to their own site.
This can result in security reports not being received by the
organization or sent to the attacker.
To protect against this, organizations SHOULD digitally sign their
"security.txt" files (as per Section 3.4), use the canonical
directive to sign the location of the file (as per Section 3.5.2),
and regularly monitor the file and the referenced resources to detect
tampering.
Security researchers SHOULD check the "security.txt" file including
verifying the digital signature and checking any available historical
records before using the information contained in the file. If
"security.txt" file looks suspicious or compromised, it SHOULD NOT be
used.
To avoid redirect attacks, redirects for these files MUST NOT be
followed if they lead to a different domain (as per Section 4.1).
6.2. Incorrect or Stale Information
If information and resources referenced in a "security.txt" file are
incorrect or not kept up to date, this can result in security reports
not being received by the organization or sent to incorrect contacts,
thus exposing possible security issues to third parties.
Foudil & Shafranovich Expires October 10, 2019 [Page 12]
Internet-Draft A Method for Web Security Policies April 2019
Organizations SHOULD ensure that information in this file and any
referenced resources such as web pages, email addresses and telephone
numbers are kept current, are accessible, controlled by the
organization, and are kept secure.
6.3. Intentionally Malformed Files, Resources and Reports
It is possible for attackers to generate files that are
extraordinarily large or otherwise malformed in an attempt to
discover or exploit weaknesses in parsing code. Implementors SHOULD
make sure that any such code be robust against large and malformed
files. ABNF grammar (as defined in Section 5) SHOULD be used as a
way to verify these files.
Same concerns apply to any other resources referenced within
security.txt files, as well as any security reports received as a
result of publishing this file. Such resources and reports may be
hostile, malformed or malicious.
6.4. No Implied Permission for Testing
The presence of a security.txt file can be interpreted by researchers
as providing permission to do security testing against that asset.
This can lead to increased testing against an organization by
researchers. On the other hand, a decision not to publish a
security.txt file, can be interpreted by the organization operating
that website to be a way to signal to researchers that permission to
test that particular site or project is denied. This can lead to
pushback against researchers reporting security issues to that
organization.
Therefore, implementors MUST NOT assume that presence or absence of a
"security.txt" file grants or denies permission for security testing.
Any such permission MAY be defined in a security or disclosure policy
(as per Section 3.5.6) or a new directive (as per Section 4.4).
6.5. Multi-user Environments
In multi-user / multi-tenant environments, it may possible for a user
to take over the location of the "security.txt" file. Organizations
SHOULD reserve the "security.txt" namespace to ensure no third-party
can create a page with the "security.txt" AND "/.well-known/
security.txt" names.
Foudil & Shafranovich Expires October 10, 2019 [Page 13]
Internet-Draft A Method for Web Security Policies April 2019
6.6. Protecting Data in Transit
To protect a "security.txt" file from being tampered in transit,
implementors MUST use HTTPS when serving the file itself and any web
URLs referenced in it (except as noted in this specification).
Implementors MUST also perform the correct TLS verification (as per
[RFC6125]).
As an additional layer of protection, it is also RECOMMENDED that
organizations digitally sign their "security.txt" file with OpenPGP
(as per Section 3.4). Also, to protect security reports from being
tampered with or observed while in transit, organizations SHOULD
specify encryption keys (as per Section 3.5.4) unless HTTPS is being
used.
However, the determination of validity of keys being used is out of
scope for this specification. Implementors MUST establish other
secure means to verify these keys.
6.7. Spam and Spurious Reports
Similar to concerns in [RFC2142], denial of service attacks via spam
reports would become easier once a "security.txt" file is published
by an organization. In addition, there is an increased likelihood of
reports being sent in an automated fashion and/or as result of
automated scans without human triage.
Organizations SHOULD weigh the advantages of publishing this file
versus the possible disadvantages and increased resources required to
triage security reports.
Security researchers SHOULD consult the organization's policy, if
available, before submitting reports in an automated fashion or as
resulting from automated scans.
7. IANA Considerations
example.com is used in this document following the uses indicated in
[RFC2606].
192.0.2.0 and 2001:db8:8:4::2 are used in this document following the
uses indicated in [RFC6890].
7.1. Well-Known URIs registry
The "Well-Known URIs" registry should be updated with the following
additional values (using the template from [RFC5785]):
Foudil & Shafranovich Expires October 10, 2019 [Page 14]
Internet-Draft A Method for Web Security Policies April 2019
URI suffix: security.txt
Change controller: IETF
Specification document(s): this document
7.2. Registry for security.txt Header Fields
IANA is requested to create the "security.txt Header Fields" registry
in accordance with [RFC8126]. This registry will contain header
fields for use in security.txt files, defined by this specification.
New registrations or updates MUST be published in accordance with the
"Expert Review" guidelines as described in section 4.5 of [RFC8126].
Any new field thus registered is considered optional by this
specification unless a new version of this specification is
published.
New registrations and updates MUST contain the following information:
1. Name of the field being registered or updated
2. Short description of the field
3. Whether the field can appear more than once
4. The document in which the specification of the field is published
5. New or updated status, which MUST be one of: current: The field
is in current use deprecated: The field is in current use, but
its use is discouraged historic: The field is no longer in
current use
An update may make a notation on an existing registration indicating
that a registered field is historical or deprecated if appropriate.
The initial registry contains these values:
Foudil & Shafranovich Expires October 10, 2019 [Page 15]
Internet-Draft A Method for Web Security Policies April 2019
Field Name: Acknowledgments
Description: link to page where security researchers are recognized
Multiple Appearances: Yes
Published in: this document
Status: current
Field Name: Canonical
Description: canonical URL for this file
Multiple Appearances: No
Published in: this document
Status: current
Field Name: Contact
Description: contact information to use for reporting vulnerabilities
Multiple Appearances: Yes
Published in: this document
Status: current
Field Name: Encryption
Description: link to a key to be used for encrypted communication
Multiple Appearances: Yes
Published in: this document
Status: current
Field Name: Hiring
Description: link to the vendor's security-related job positions
Multiple Appearances: Yes
Published in: this document
Status: current
Field Name: Policy
Description: link to security policy page
Multiple Appearances: Yes
Published in: this document
Status: current
Field Name: Preferred-Languages
Description: list of preferred languages for security reports
Multiple Appearances: No
Published in: this document
Status: current
8. Contributors
The authors would like to acknowledge the help provided during the
development of this document by Tom Hudson, Jobert Abma, Gerben
Janssen van Doorn, Austin Heap, Stephane Bortzmeyer, Max Smith,
Eduardo Vela and Krzysztof Kotowicz.
Foudil & Shafranovich Expires October 10, 2019 [Page 16]
Internet-Draft A Method for Web Security Policies April 2019
The authors would also like to acknowledge the feedback provided by
multiple members of IETF's SAAG and SEC-DISPATCH lists.
9. References
9.1. Normative References
[RFC1945] Berners-Lee, T., Fielding, R., and H. Frystyk, "Hypertext
Transfer Protocol -- HTTP/1.0", RFC 1945,
DOI 10.17487/RFC1945, May 1996,
<https://www.rfc-editor.org/info/rfc1945>.
[RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part Two: Media Types", RFC 2046,
DOI 10.17487/RFC2046, November 1996,
<https://www.rfc-editor.org/info/rfc2046>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC2142] Crocker, D., "Mailbox Names for Common Services, Roles and
Functions", RFC 2142, DOI 10.17487/RFC2142, May 1997,
<https://www.rfc-editor.org/info/rfc2142>.
[RFC2277] Alvestrand, H., "IETF Policy on Character Sets and
Languages", BCP 18, RFC 2277, DOI 10.17487/RFC2277,
January 1998, <https://www.rfc-editor.org/info/rfc2277>.
[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO
10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November
2003, <https://www.rfc-editor.org/info/rfc3629>.
[RFC3966] Schulzrinne, H., "The tel URI for Telephone Numbers",
RFC 3966, DOI 10.17487/RFC3966, December 2004,
<https://www.rfc-editor.org/info/rfc3966>.
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66,
RFC 3986, DOI 10.17487/RFC3986, January 2005,
<https://www.rfc-editor.org/info/rfc3986>.
[RFC4880] Callas, J., Donnerhacke, L., Finney, H., Shaw, D., and R.
Thayer, "OpenPGP Message Format", RFC 4880,
DOI 10.17487/RFC4880, November 2007,
<https://www.rfc-editor.org/info/rfc4880>.
Foudil & Shafranovich Expires October 10, 2019 [Page 17]
Internet-Draft A Method for Web Security Policies April 2019
[RFC5198] Klensin, J. and M. Padlipsky, "Unicode Format for Network
Interchange", RFC 5198, DOI 10.17487/RFC5198, March 2008,
<https://www.rfc-editor.org/info/rfc5198>.
[RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234,
DOI 10.17487/RFC5234, January 2008,
<https://www.rfc-editor.org/info/rfc5234>.
[RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322,
DOI 10.17487/RFC5322, October 2008,
<https://www.rfc-editor.org/info/rfc5322>.
[RFC5646] Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying
Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646,
September 2009, <https://www.rfc-editor.org/info/rfc5646>.
[RFC5785] Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known
Uniform Resource Identifiers (URIs)", RFC 5785,
DOI 10.17487/RFC5785, April 2010,
<https://www.rfc-editor.org/info/rfc5785>.
[RFC6068] Duerst, M., Masinter, L., and J. Zawinski, "The 'mailto'
URI Scheme", RFC 6068, DOI 10.17487/RFC6068, October 2010,
<https://www.rfc-editor.org/info/rfc6068>.
[RFC6125] Saint-Andre, P. and J. Hodges, "Representation and
Verification of Domain-Based Application Service Identity
within Internet Public Key Infrastructure Using X.509
(PKIX) Certificates in the Context of Transport Layer
Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March
2011, <https://www.rfc-editor.org/info/rfc6125>.
[RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Message Syntax and Routing",
RFC 7230, DOI 10.17487/RFC7230, June 2014,
<https://www.rfc-editor.org/info/rfc7230>.
[RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Semantics and Content", RFC 7231,
DOI 10.17487/RFC7231, June 2014,
<https://www.rfc-editor.org/info/rfc7231>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC