forked from w3ctag/security-questionnaire
-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
1516 lines (1151 loc) · 60.9 KB
/
index.html
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
<!doctype html>
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Self-Review Questionnaire: Security and Privacy</title>
<style>
@media print {
html { margin: 0 !important; }
body { font-family: serif; }
th, td { font-family: inherit; }
a { color: inherit !important; }
.example:before { font-family: serif !important; }
a:link, a:visited { text-decoration: none !important; }
a:link:after, a:visited:after { /* create a cross-ref "see..." */; }
}
@page {
margin: 1.5cm 1.1cm;
}
h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
figure, div.figure, div.sidefigure, pre, table.propdef, table.propdef-extra,
.example { page-break-inside: avoid; }
dt { page-break-after: avoid; }
body {
background: white;
/* background-image: floating-margin-image-goes-here; */
background-position: top left;
background-attachment: fixed;
background-repeat: no-repeat;
color: black;
counter-reset: exampleno figure issue;
font-family: sans-serif;
line-height: 1.5;
margin: 0 auto;
max-width: 50em;
padding: 2em 1em 2em 70px;
}
/* General structural markup */
h1, h2, h3, h4, h5, h6 { text-align: left; }
h1, h2, h3 { color: #005A9C; }
h1 { font: 170% sans-serif; }
h2 { font: 140% sans-serif; }
h3 { font: 120% sans-serif; }
h4 { font: bold 100% sans-serif; }
h5 { font: italic 100% sans-serif; }
h6 { font: small-caps 100% sans-serif; }
h2, h3, h4, h5, h6 { margin-top: 3em; }
h1 + h2 { margin-top: 0em; }
h2 + h3, h3 + h4, h4 + h5, h5 + h6 { margin-top: 1.2em; }
.head { margin-bottom: 1em; }
.head h1 { margin-top: 2em; clear: both; }
.head table { margin-left: 2em; margin-top: 2em; }
.head dd { margin-bottom: 0; }
p.copyright { font-size: small; }
p.copyright small { font-size: small; }
pre { margin: 1em 0 1em 2em; overflow: auto; }
pre, code, .idl-code {
font-size: .9em;
font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace;
}
pre .idl-code, pre code { font-size: 1em; }
dt dfn code { font-size: inherit; }
dfn { font-weight: bolder; }
dfn var { font-style: normal; }
s, del {text-decoration: line-through; color: red; }
u, ins {text-decoration: underline; background: #bfa; }
sup {
vertical-align: super;
font-size: 80%
}
details { display: block; }
dt { font-weight: bold; }
dd { margin: 0 0 1em 2em; }
ul, ol { margin-left: 0; padding-left: 2em; }
li { margin: 0.25em 2em 0.5em 0; padding-left: 0; }
[data-md] > :first-child { margin-top: 0; }
[data-md] > :last-child { margin-bottom: 0; }
td.pre {
white-space: pre-wrap;
}
.css, .property { color: #005a9c; }
.property { white-space: nowrap; }
/* Boilerplate sections */
ul.indexlist { margin-left: 0; columns: 13em; }
ul.indexlist li { margin-left: 0; list-style: none }
ul.indexlist li li { margin-left: 1em; }
ul.indexlist a { font-weight: bold; }
ul.indexlist ul, ul.indexlist dl { font-size: smaller; }
ul.indexlist dl { margin-top: 0; }
ul.indexlist dt { margin: .2em 0 .2em 20px; }
ul.indexlist dd { margin: .2em 0 .2em 40px; }
.toc {
font-weight: bold;
line-height: 1.3;
list-style: none;
margin: 1em 0 0 5em;
padding: 0;
}
.toc ul { margin: 0; padding: 0; font-weight: normal; }
.toc ul ul { margin: 0 0 0 2em; font-style: italic; }
.toc ul ul ul { margin: 0}
.toc > li { margin: 1.5em 0; padding: 0; }
.toc li { clear: both; }
.toc ul.toc li { margin: 0.3em 0 0 0; }
.toc a { border-bottom-style: none; }
.toc a:hover, ul.toc a:focus { border-bottom-style: solid; }
/* Section numbers in a column of their own */
.toc span.secno {float: left; width: 4em; margin-left: -5em}
.toc ul ul span.secno { margin-left: -7em; }
table.proptable {
font-size: small;
border-collapse: collapse;
border-spacing: 0;
text-align: left;
margin: 1em 0;
}
table.proptable td, table.proptable th {
padding: 0.4em;
text-align: center;
}
table.proptable tr:hover td { background: #DEF; }
/* Links */
a[href] { color: inherit; border-bottom: 1px solid silver; text-decoration: none; }
a[href]:hover { background: #ffa; }
a[href]:active { color: #C00; background: transparent; }
img, a.logo { border-style: none; }
.heading, .issue, .note, .example, li, dt { position: relative; }
/* CSS-ish link types */
[data-link-type="property"]::before,
[data-link-type="propdesc"]::before,
[data-link-type="descriptor"]::before,
[data-link-type="value"]::before,
[data-link-type="function"]::before,
[data-link-type="at-rule"]::before,
[data-link-type="selector"]::before,
[data-link-type="maybe"]::before {content: "“";}
[data-link-type="property"]::after,
[data-link-type="propdesc"]::after,
[data-link-type="descriptor"]::after,
[data-link-type="value"]::after,
[data-link-type="function"]::after,
[data-link-type="at-rule"]::after,
[data-link-type="selector"]::after,
[data-link-type="maybe"]::after {content: "”";}
[data-link-type].production::before,
[data-link-type].production::after,
.prod [data-link-type]::before,
.prod [data-link-type]::after { content: ""; }
/* Element-type link styling */
[data-link-type=element] { font-family: monospace; }
[data-link-type=element]::before { content: "<" }
[data-link-type=element]::after { content: ">" }
/* Self-links */
a.self-link {
position: absolute;
top: 0;
left: -2.5em;
width: 2em;
height: 2em;
text-align: center;
border: none;
transition: opacity .2s;
opacity: .5;
}
a.self-link:hover {
opacity: 1;
}
.heading > a.self-link {
font-size: 83%;
}
li > a.self-link {
left: -3.5em;
}
dfn > a.self-link {
top: auto;
left: auto;
opacity: 0;
width: 1.5em;
height: 1.5em;
background: gray;
color: white;
font-style: normal;
transition: opacity .2s, background-color .2s, color .2s;
}
dfn:hover > a.self-link {
opacity: 1;
}
dfn > a.self-link:hover {
color: black;
}
a.self-link::before { content: "¶"; }
.heading > a.self-link::before { content: "§"; }
dfn > a.self-link::before { content: "#"; }
/* Figures */
figure {
display: block;
text-align: center;
margin: 2.5em 0;
}
figure.sidefigure {
float: right;
width: 50%;
margin: 0 0 0.5em 0.5em
}
figure pre {
text-align: left;
display: table;
margin: 1em auto;
}
figure table {
margin: auto;
}
figure img, figure object {
display: block;
margin: auto;
max-width: 100%
}
figcaption {
counter-increment: figure;
font-size: 90%;
font-style: italic;
text-align: center;
}
figcaption::before {
content: "Figure " counter(figure) ". ";
font-weight: bold;
}
dd figure { margin-left: -2em; }
/* Definition tables */
table.definition {
border-spacing: 0;
padding: 0 1em 0.5em;
width: 100%;
table-layout: fixed;
margin: 1.2em 0;
}
table.definition td, table.definition th {
padding: 0.5em;
vertical-align: baseline;
border-bottom: 1px solid #bbd7e9;
}
table.definition th:first-child {
font-style: italic;
font-weight: normal;
text-align: left;
width: 8.3em;
padding-left: 1em;
}
table.definition > tbody > tr:last-child > th,
table.definition > tbody > tr:last-child > td {
border-bottom: none;
}
table.definition tr:first-child > th,
table.definition tr:first-child > td {
padding-top: 1em;
}
/* Footnotes at the bottom of a definition table */
table.definition td.footnote {
font-style: normal;
padding-top: .6em;
width: auto;
}
table.definition td.footnote::before {
content: " ";
display: block;
height: 0.6em;
width: 4em;
border-top: thin solid;
}
/* IDL fragments */
pre.idl {
padding: .5em 1em;
margin: 1.2em 0;
}
pre.idl :link, pre.idl :visited {
color:inherit;
background:transparent;
}
/* Data tables */
/* Comes in plain, long, complex, or define varieties */
.data {
margin: 1em auto;
border-collapse: collapse;
width: 100%;
border: hidden;
}
.data {
text-align: center;
width: auto;
}
.data caption {
width: 100%;
}
.data td, .data th {
padding: 0.5em;
border-width: 1px;
border-color: silver;
border-top-style: solid;
}
.data thead td:empty {
padding: 0;
border: 0;
}
.data thead th[scope="row"] {
text-align: right;
color: inherit;
}
.data thead,
.data tbody {
color: inherit;
border-bottom: 2px solid;
}
.data colgroup {
border-left: 2px solid;
}
.data tbody th:first-child,
.data tbody td[scope="row"]:first-child {
text-align: right;
color: inherit;
border-right: 2px solid;
border-top: 1px solid silver;
padding-right: 1em;
}
.data.define td:last-child {
text-align: left;
}
.data tbody th[rowspan],
.data tbody td[rowspan] {
border-left: 1px solid silver;
}
.data tbody th[rowspan]:first-child,
.data tbody td[rowspan]:first-child {
border-left: 0;
border-right: 1px solid silver;
}
.data.complex th,
.data.complex td {
border: 1px solid silver;
}
.data td.long {
vertical-align: baseline;
text-align: left;
}
.data img {
vertical-align: middle;
}
/* Switch/case <dl>s */
dl.switch {
padding-left: 2em;
}
dl.switch > dt {
text-indent: -1.5em;
}
dl.switch > dt:before {
content: '↪';
padding: 0 0.5em 0 0;
display: inline-block;
width: 1em;
text-align: right;
line-height: 0.5em;
}
/* Style for At Risk features (intended as editorial aid, not intended for publishing) */
.atrisk::before {
position: absolute;
margin-left: -5em;
margin-top: -2px;
padding: 4px;
border: 1px solid;
content: 'At risk';
font-size: small;
background-color: white;
color: gray;
border-radius: 1em;
text-align: center;
}
/* Obsoletion notice */
details.annoying-warning[open] {
background: #fdd;
color: red;
font-weight: bold;
text-align: center;
padding: .5em;
border: thick solid red;
border-radius: 1em;
position: fixed;
left: 1em;
right: 1em;
bottom: 1em;
z-index: 1000;
}
details.annoying-warning:not([open]) > summary {
background: #fdd;
color: red;
font-weight: bold;
text-align: center;
padding: .5em;
}
/* Examples */
.example {
counter-increment: exampleno;
}
.example::before {
content: "Example";
content: "Example " counter(exampleno);
min-width: 7.5em;
text-transform: uppercase;
display: block;
}
.illegal-example::before {
content: "Invalid Example";
content: "Invalid Example" counter(exampleno);
}
.example, .illegal-example, .html, .illegal-html, .xml, .illegal-xml {
padding: 0.5em;
margin: 1em 0;
position: relative;
clear: both;
}
pre.example, pre.illegal-example, pre.html,
pre.illegal-html, pre.xml, pre.illegal-xml {
padding-top: 1.5em;
}
.illegal-example { color: red; }
.illegal-example p { color: black; }
.html { color: #600; }
.illegal-html { color: red; }
.illegal-html p { color: black; }
.xml { color: #600; }
.illegal-xml { color: red; }
.illegal-xml p { color: black; }
code.css { font-family: inherit; font-size: 100% }
code.html { color: #600 } /* inline HTML */
code.xml { color: #600 } /* inline XML */
/* Issues */
.issue {
border-color: #E05252;
background: #FBE9E9;
counter-increment: issue;
}
.issue:before {
content: "Issue " counter(issue);
padding-right: 1em;
text-transform: uppercase;
color: #E05252;
}
/* Whys */
details.why > summary {
font-style: italic;
}
details.why[open] > summary {
border-bottom: 1px silver solid;
}
/* All the blocks get similarly styled */
table.definition, pre.idl, .example, .note, details.why, .issue {
border: none;
border-left: .5em solid black;
border-left: .5rem solid black;
}
.issue, .note, .example, .why {
padding: .5em;
margin-top: 1em;
margin-bottom: 1em;
}
table.definition, pre.idl {
background: hsl(210, 70%, 95%);
border-color: hsl(210, 80%, 75%);
}
.example {
background: hsl(50, 70%, 95%);
border-color: hsl(50, 70%, 60%);
}
.example::before {
color: hsl(50, 70%, 60%);
}
.note, details.why {
background: hsl(120, 70%, 95%);
border-color: hsl(120, 70%, 60%);
}
.note::before {
color: hsl(120, 70%, 60%);
}
.issue {
background: hsl(0, 70%, 95%);
border-color: hsl(0, 70%, 60%);
}
.issue::before {
color: hsl(0, 70%, 60%);
}
span.issue, span.note {
padding: .1em .5em .15em;
border-right-width: .5em;
border-right-style: solid;
}
</style>
<meta content="Bikeshed 1.0.0" name="generator">
</head>
<body class="h-entry">
<div class="head">
<p data-fill-with="logo"></p>
<h1 class="p-name no-ref" id="title">Self-Review Questionnaire: Security and Privacy</h1>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">A Collection of Interesting Ideas,
<time class="dt-updated" datetime="2015-05-11">11 May 2015</time></span></h2>
<div data-fill-with="spec-metadata">
<dl>
<dt>This version:
<dd><a class="u-url" href="https://w3ctag.github.io/security-questionnaire/">https://w3ctag.github.io/security-questionnaire/</a>
<dt>Version History:
<dd><a href="https://github.com/w3ctag/security-questionnaire/commits/master/index.src.html">https://github.com/w3ctag/security-questionnaire/commits/master/index.src.html</a>
<dt>Issue Tracking:
<dd><a href="#issues-index">Inline In Spec</a>
<dt class="editor">Editor:
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:[email protected]">Mike West</a> (<span class="p-org org">Google Inc.</span>)
<dt>Bug Reports:
<dd><span><a href="https://github.com/w3ctag/security-questionnaire/issues/new">via the w3ctag/security-questionnaire repository on GitHub</a></span>
</dl>
</div>
<div data-fill-with="warning"></div>
<p class="copyright" data-fill-with="copyright"><a href="http://creativecommons.org/publicdomain/zero/1.0/" rel="license"><img alt="CC0" src="https://licensebuttons.net/p/zero/1.0/80x15.png"></a>
To the extent possible under law, the editors have waived all copyright
and related or neighboring rights to this work.
In addition, as of 11 May 2015,
the editors have made this specification available under the
<a href="http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0" rel="license">Open Web Foundation Agreement Version 1.0</a>,
which is available at http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0.
Parts of this work may be from another specification document. If so, those parts are instead covered by the license of that specification document.
</p>
<hr title="Separator for header">
</div>
<h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
<div class="p-summary" data-fill-with="abstract">
<p>This document lists a set of questions one could ask about the security and
privacy impact of a new feature or specification. It is meant as a tool that
groups or individuals can use as a guide during a self-review, pointing
towards important questions in areas where expertise might be lacking.</p>
<p>It is not meant as a "security checklist", nor does an editor or group’s use
of this questionnaire obviate the editor or group’s responsibility to obtain
"wide review" of a specification’s security and privacy properties before
publication.</p>
</div>
<div data-fill-with="at-risk"></div>
<h2 class="no-num no-toc no-ref heading settled" id="contents"><span class="content">Table of Contents</span></h2>
<div data-fill-with="table-of-contents" role="navigation">
<ul class="toc" role="directory">
<li><a href="#intro"><span class="secno">1</span> <span class="content">Introduction</span></a>
<li><a href="#threats"><span class="secno">2</span> <span class="content">Threat Models</span></a>
<ul class="toc">
<li><a href="#passive-network"><span class="secno">2.1</span> <span class="content">Passive Network Attackers</span></a>
<li><a href="#active-network"><span class="secno">2.2</span> <span class="content">Active Network Attackers</span></a>
<li><a href="#sop-violations"><span class="secno">2.3</span> <span class="content">Same-Origin Policy Violations</span></a>
<li><a href="#third-party-tracking"><span class="secno">2.4</span> <span class="content">Third-Party Tracking</span></a>
</ul>
<li><a href="#questions"><span class="secno">3</span> <span class="content">Questions to Consider</span></a>
<ul class="toc">
<li><a href="#pii"><span class="secno">3.1</span> <span class="content">
Does this specification deal with personally-identifiable information?
</span></a>
<li><a href="#credentials"><span class="secno">3.2</span> <span class="content">
Does this specification deal with high-value data?
</span></a>
<li><a href="#persistent-origin-specific-state"><span class="secno">3.3</span> <span class="content">
Does this specification introduce new state for an origin that persists
across browsing sessions?
</span></a>
<li><a href="#persistent-identifiers"><span class="secno">3.4</span> <span class="content">
Does this specification expose persistent, cross-origin state to the web?
</span></a>
<li><a href="#other-data"><span class="secno">3.5</span> <span class="content">
Does this specification expose any other data to an origin that it doesn’t
currently have access to?
</span></a>
<li><a href="#string-to-script"><span class="secno">3.6</span> <span class="content">
Does this specification enable new script execution/loading mechanisms?
</span></a>
<li><a href="#location"><span class="secno">3.7</span> <span class="content">Does this specification allow an origin access to a user’s location?</span></a>
<li><a href="#sensors"><span class="secno">3.8</span> <span class="content">Does this specification allow an origin access to sensors on a user’s device?</span></a>
<li><a href="#local-device"><span class="secno">3.9</span> <span class="content">Does this specification allow an origin access to aspects of a user’s local computing environment?</span></a>
<li><a href="#remote-device"><span class="secno">3.10</span> <span class="content">
Does this specification allow an origin access to other devices?
</span></a>
<li><a href="#native-ui"><span class="secno">3.11</span> <span class="content">
Does this specification allow an origin some measure of control over a user
agent’s native UI?
</span></a>
<li><a href="#temporary-id"><span class="secno">3.12</span> <span class="content">Does this specification expose temporary identifiers to the web?</span></a>
<li><a href="#first-third-party"><span class="secno">3.13</span> <span class="content">Does this specification distinguish between behavior in first-party and third-party contexts?</span></a>
<li><a href="#incognito"><span class="secno">3.14</span> <span class="content">
How should this specification work in the context of a user agent’s
"incognito" mode?
</span></a>
<li><a href="#storage"><span class="secno">3.15</span> <span class="content">
Does this specification persist data to a user’s local device?
</span></a>
<li><a href="#considerations"><span class="secno">3.16</span> <span class="content">
Does this specification have a "Security Considerations" and "Privacy
Considerations" section?
</span></a>
<li><a href="#relaxed-sop"><span class="secno">3.17</span> <span class="content">
Does this specification allow downgrading default security characteristics?
</span></a>
</ul>
<li><a href="#mitigations"><span class="secno">4</span> <span class="content">
Mitigation Strategies
</span></a>
<ul class="toc">
<li><a href="#secure-contexts"><span class="secno">4.1</span> <span class="content">
Secure Contexts
</span></a>
<li><a href="#user-mediation"><span class="secno">4.2</span> <span class="content">
Explicit user mediation
</span></a>
<li><a href="#drop-feature"><span class="secno">4.3</span> <span class="content">
Drop the feature
</span></a>
</ul>
<li><a href="#conformance"><span class="secno"></span> <span class="content">
Conformance</span></a>
<li><a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
<ul class="toc">
<li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
<li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
</ul>
<li><a href="#references"><span class="secno"></span> <span class="content">References</span></a>
<ul class="toc">
<li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
<li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
</ul>
<li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
</ul></div>
<main>
<section>
<h2 class="heading settled" data-level="1" id="intro"><span class="secno">1. </span><span class="content">Introduction</span><a class="self-link" href="#intro"></a></h2>
<p>Adding features to the web is a tricky thing; on the one hand, we want to
provide developers with access to all the things they need in order to build
amazing experiences. On the other, we need to ensure that we don’t
accidentally hand over too much power to malicious folks who could abuse it,
or unintentionally expose people’s private data without adequate controls.
Ideally, careful review of every specification we publish will allow us to
strike the right balance.</p>
<p>Working groups can (and should) begin this review process early, of course.
It’s <em>easy</em> to mitigate risks to users on the web <em>before</em> a
feature is finalized and shipped in user agents. Changing APIs or
introducing restrictions becomes nigh impossible once the web begins to
depend on a particular implementation.</p>
<p>This document encourages early review by posing a number of questions that
you as a individual reader of a specification can ask—and that working
groups and spec editors might consider themselves, before asking for more
formal review. The intent is to highlight areas which have historically had
interesting implications on a user’s security or privacy, and thereby to
focus the editor’s attention and working group’s attention and reviewers'
attention on areas that might previously have been overlooked.</p>
<p class="note" role="note">Note: Answering these questions obviously doesn’t constitute "wide review" in
and of itself, but could provide a helpful basis of understanding upon which
future reviewers can build.</p>
</section>
<section>
<h2 class="heading settled" data-level="2" id="threats"><span class="secno">2. </span><span class="content">Threat Models</span><a class="self-link" href="#threats"></a></h2>
<p>"Security" and "Privacy" are big concepts. In order to pare them down to
something which could feasibly guide working groups' decisions, let’s consider
the types of threats to both which the web makes possible:</p>
<h3 class="heading settled" data-level="2.1" id="passive-network"><span class="secno">2.1. </span><span class="content">Passive Network Attackers</span><a class="self-link" href="#passive-network"></a></h3>
<p>A <dfn data-dfn-type="dfn" data-noexport="" id="passive-network-attacker">passive network attacker<a class="self-link" href="#passive-network-attacker"></a></dfn> has read-access to the bits going over
the wire between users and the servers they’re communicating with. They can’t
<em>modify</em> the bytes, but they can collect and analyze them.</p>
<p>Due to the decentralized nature of the internet, and the general level of
interest in user activity, it’s reasonable to assume that practically every
unencrypted bit that’s bouncing around the network of proxies, routers, and
servers you’re using right now is being read by someone. It’s equally likely
that some of these attackers are doing their best to understand the encrypted
bits as well (though that requires significantly more effort).</p>
<ul>
<li data-md="">
<p>The IETF’s "Pervasive Monitoring Is an Attack" document <a data-link-type="biblio" href="#biblio-rfc7258">[RFC7258]</a> is
useful reading, outlining some of the impacts on privacy that this
assumption entails.</p>
<li data-md="">
<p>Governments aren’t the only concern; your local coffee shop is likely to
be gathering information on its customers, your ISP at home is likely to
be doing the same.</p>
</ul>
<h3 class="heading settled" data-level="2.2" id="active-network"><span class="secno">2.2. </span><span class="content">Active Network Attackers</span><a class="self-link" href="#active-network"></a></h3>
<p>An <dfn data-dfn-type="dfn" data-noexport="" id="active-network-attacker">active network attacker<a class="self-link" href="#active-network-attacker"></a></dfn> has both read- and write-access to the
bits going over the wire between users and the servers they’re communicating
with. They can collect and analyze data, but also modify it in-flight,
injecting and manipulating JavaScript and HTML at will. This is more common
than you might expect, for both benign and malicious purposes:</p>
<ul>
<li data-md="">
<p>ISPs and caching proxies regularly cache and compress images before
delivering them to users in an effort to reduce data usage. This can be
especially useful for users on low-bandwidth, high-latency devices like
phones.</p>
<li data-md="">
<p>ISPs also regularly inject JavaScript <a data-link-type="biblio" href="#biblio-comcast">[COMCAST]</a> and other identifiers
<a data-link-type="biblio" href="#biblio-verizon">[VERIZON]</a> for less benign purposes.</p>
<li data-md="">
<p>If your ISP is willing to modify substantial amounts of traffic flowing
through it for profit, it’s difficult to believe that state-level
attackers will remain passive.</p>
</ul>
<h3 class="heading settled" data-level="2.3" id="sop-violations"><span class="secno">2.3. </span><span class="content">Same-Origin Policy Violations</span><a class="self-link" href="#sop-violations"></a></h3>
<p>The <dfn data-dfn-type="dfn" data-noexport="" id="same_origin-policy">same-origin policy<a class="self-link" href="#same_origin-policy"></a></dfn> is the cornerstone of security on the web;
one origin should not have direct access to another origin’s data (the policy
is more formally defined in Section 3 of <a data-link-type="biblio" href="#biblio-rfc6454">[RFC6454]</a>). A corollary to this
policy is that an origin should not have direct access to data that isn’t
associated with <em>any</em> origin: the contents of a user’s hard drive,
for instance. Various kinds of attacks bypass this protection in one way or
another. For example:</p>
<ul>
<li data-md="">
<p><dfn data-dfn-type="dfn" data-local-lt="XSS" data-noexport="" id="cross_site-scripting-attacks">Cross-site scripting attacks<a class="self-link" href="#cross_site-scripting-attacks"></a></dfn> involve an
attacker tricking an origin into executing attacker-controlled code in
the context of a target origin.</p>
<li data-md="">
<p><dfn data-dfn-type="dfn" data-local-lt="CSRF" data-noexport="" id="cross_site-request-forgery-attacks">Cross-site request forgery attacks<a class="self-link" href="#cross_site-request-forgery-attacks"></a></dfn> trick
user agents into exerting a user’s ambient authority on sites where
they’ve logged in by submitting requests on their behalf.</p>
<li data-md="">
<p>Data leakage occurs when bits of information are inadvertantly made
available cross-origin, either explicitly via CORS headers <a data-link-type="biblio" href="#biblio-cors">[CORS]</a>,
or implicitly, via side-channel attacks like <a data-link-type="biblio" href="#biblio-timing">[TIMING]</a>.</p>
</ul>
<h3 class="heading settled" data-level="2.4" id="third-party-tracking"><span class="secno">2.4. </span><span class="content">Third-Party Tracking</span><a class="self-link" href="#third-party-tracking"></a></h3>
<p class="issue" id="issue-af65255c"><a class="self-link" href="#issue-af65255c"></a>Flesh this out. <a href="https://github.com/w3ctag/security-questionnaire/issues/7"><https://github.com/w3ctag/security-questionnaire/issues/7></a></p>
</section>
<section>
<h2 class="heading settled" data-level="3" id="questions"><span class="secno">3. </span><span class="content">Questions to Consider</span><a class="self-link" href="#questions"></a></h2>
<h3 class="heading settled" data-level="3.1" id="pii"><span class="secno">3.1. </span><span class="content">
Does this specification deal with personally-identifiable information?
</span><a class="self-link" href="#pii"></a></h3>
<p><dfn data-dfn-type="dfn" data-local-lt="personally-identifiable" data-noexport="" id="personally_identifiable-information">Personally-identifiable
information<a class="self-link" href="#personally_identifiable-information"></a></dfn> (PII) includes a large swath of data which could be used on
its own, or in combination with other information, to identify a single
person. The exact definition of what’s considered PII varies from jurisdiction
to jurisdiction, but could certainly include things like a home address, an
email address, birthdates, usernames, fingerprints etc. Wikipedia has a fairly
good description at <a data-link-type="biblio" href="#biblio-pii">[PII]</a>.</p>
<p>If the specification under consideration exposes PII to the web, it’s
important to consider ways to mitigate the obvious impacts. For instance:</p>
<ul>
<li data-md="">
<p>A feature which uses biometric data (fingerprints or retina scans) could
refuse to expose the raw data to the web, instead using the raw data only
to unlock some origin-specific and ephemeral secret and transmitting that
secret instead.</p>
<li data-md="">
<p>User mediation could be required, in order to ensure that no data is
exposed without a user’s explicit choice (and hopefully understanding).</p>
</ul>
<h3 class="heading settled" data-level="3.2" id="credentials"><span class="secno">3.2. </span><span class="content">
Does this specification deal with high-value data?
</span><a class="self-link" href="#credentials"></a></h3>
<p>Data which isn’t <a data-link-type="dfn" href="#personally_identifiable-information">personally-identifiable</a> can still be quite valuable.
Sign-in credentials (like username/password pairs, or OAuth refresh tokens)
can be extrememly powerful in the wrong hands, as can financial instruments
like credit card data. Making this data available to JavaScript, for instance,
could expose it to <a data-link-type="dfn" href="#cross_site-scripting-attacks">XSS</a> attacks and <a data-link-type="dfn" href="#active-network-attacker">active network attackers</a> who
could inject code to read and exfiltrate the data. For instance:</p>
<ul>
<li data-md="">
<p>Credential Management <a data-link-type="biblio" href="#biblio-credential-management">[CREDENTIAL-MANAGEMENT]</a> allows sites to request
a user’s credentials from a user agent’s password manager in order to
sign the user in quickly and easily. This opens the door for abuse, as
a single XSS could expose user data trivially to JavaScript. They mitigate
the risk by only offering the username and password as an opaque
<code>FormData</code> object which cannot be directly read by JavaScript,
and strongly suggest that authors use Content Security Policy <a data-link-type="biblio" href="#biblio-csp">[CSP]</a> with
resonable <code>connect-src</code> and <code>form-action</code> values to
further mitigate the risk of exfiltration.</p>
</ul>
<h3 class="heading settled" data-level="3.3" id="persistent-origin-specific-state"><span class="secno">3.3. </span><span class="content">
Does this specification introduce new state for an origin that persists
across browsing sessions?
</span><a class="self-link" href="#persistent-origin-specific-state"></a></h3>
<p>For example:</p>
<ul>
<li data-md="">
<p>Service Worker <a data-link-type="biblio" href="#biblio-service-workers">[SERVICE-WORKERS]</a> intercept all requests made by an
origin, allowing sites to function perfectly even when offline. A
maliciously-injected service worker, however, would be devastating (as
documented in that spec’s
<a href="http://www.w3.org/TR/service-workers/#security-considerations">security
considerations section</a>). They mitigate the risks an <a data-link-type="dfn" href="#active-network-attacker">active network
attacker</a> or <a data-link-type="dfn" href="#cross_site-scripting-attacks">XSS</a> vulnerability present by requiring an
encrypted and authenticated connection in order to register a service
worker.</p>
<li data-md="">
<p>Platform-specific DRM implementations might expose origin-specific
information in order to help identify users and determine whether they
ought to be granted access to a specific piece of media. These kinds of
identifiers should be carefully evaluated to determine how abuse can be
mitigated; identifiers which a user cannot easily change are very
valuable from a tracking perspective, and protecting the identifiers from
an active network attacker is an important concern.</p>
<li data-md="">
<p>Cookies, <code>ETag</code>, <code>Last Modified</code>, <code>Local
Storage</code>, <code>Indexed DB</code>, etc. all allow an origin to
store information about a user, and retrieve it later, directly or
indirectly. User agents mitigate the risk that these kinds of storage
mechanisms will form a persistent identifier by offering users the
ability to wipe out the data contained in these types of storage.</p>
</ul>
<h3 class="heading settled" data-level="3.4" id="persistent-identifiers"><span class="secno">3.4. </span><span class="content">
Does this specification expose persistent, cross-origin state to the web?
</span><a class="self-link" href="#persistent-identifiers"></a></h3>
<p>For example:</p>
<ul>
<li data-md="">
<p>The <code>GL_RENDERER</code> string exposed by some WebGL implementations
improves performance in some kinds of applications, but does so at the
cost of adding persistent state to a user’s fingerprint. These kinds of
device-level details should be carefully weighed to ensure that the costs
are outweighed by the benefits.</p>
<li data-md="">
<p>The <code class="idl"><a data-link-type="idl" href="http://www.w3.org/TR/html5/webappapis.html#navigatorplugins">NavigatorPlugins</a></code> list exposed via the DOM practically never
changes for most users. Some user agents have taken steps to reduce the