-
Notifications
You must be signed in to change notification settings - Fork 222
Expand file tree
/
Copy pathcriteria.yml
More file actions
1590 lines (1585 loc) · 77.5 KB
/
criteria.yml
File metadata and controls
1590 lines (1585 loc) · 77.5 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
# This YAML file provides information about each criterion.
# The top level key is the major (top-level) group key,
# within that is the minor (secondary) group key,
# and within each minor group is a set of criteria identifiers.
# With each criterion identifiers the following keys may be inside:
# category: MUST|SHOULD|SUGGESTED # required
# future: true|false # optional, default false
# obsolete: true|false # optional, default false; criterion has been retired
# na_allowed: true|false # optional, default false
# na_justification_required: true|false # optional, default false
# met_justification_required: true|false # optional, default false
# met_url_required: true|false # optional, default false
# description: ...HTML description... # required
# details: ...HTML description... # optional
# met_placeholder: ...special met_placeholder text... # optional
# unmet_placeholder: ...special unmet_placeholder text... # optional
# na_placeholder: ...special na_placeholder text... # optional
# met_suppress: true|false # optional, default false. Suppress justification?
# unmet_suppress: true|false # optional, default false. Suppress just.
# rationale: ...text describing the rationale for this criterion.
# autofill: ...text describing *ideas* for how to autofill, in markdown
#
# Please note that autofill text is *not* a guarantee of how it will
# be implemented (or even if it will be automated); it is simply a way
# to record ideas that might be implemented. Also, autofill is often
# used to *guess* correct values, to help speed filling in the form;
# we only force values if we are confident in their answer or are willing
# to require that the information be provided in a specific way.
# We've focused on GitHub, but where reasonable we'd like to create
# portability layers and support other forges like SourceForge,
# Savannah, Bitbucket, and GitLab; we'd also like to be able to support
# standalone sites (e.g., detect use of Bugzilla and work with that).
#
# We use an *ordered* map (omap), because the order below is used to determine
# the order of presentation. In Ruby this doesn't really matter because
# (current) Ruby hashes are ordered anyway. We use !!omap so that
# any other tool reading this format will know to preserve the order.
--- !!omap
- '0': !!omap
- Basics: !!omap
- Basic project website content: !!omap
- description_good:
category: MUST
autofill: >
We could try examining the project website or README for an
early sentence of the form (This software|project name).
It's unclear how effective this would be; we could survey a number
of existing projects to see if there are common patterns.
- interact:
category: MUST
autofill: >
Look on the project website for words like "download|obtain",
"contribute|bug report|feedback|enhancement", and
"contribute|pull request|merge request".
- contribution:
category: MUST
met_url_required: true
autofill: >
Look on the project website for words like
"contribute|bug report|feedback|enhancement" and
"contribute|pull request|merge request".
rationale: >
Contributors need to understand not only how to contribute,
but also the overall contribution process, so that they'll
understand how their work could be incorporated and what
the expectations are after the initial submission.
This means that wherever the project describes how to contribute,
the project must include (directly or by reference) information
on the contribution process. Note that criterion "interact"
(listed earlier) requires that the contribution information
be on the project website.
- contribution_requirements:
category: SHOULD
met_url_required: true
autofill: >
Look for a CONTRIBUTING{,.md,.txt,.html} file.
- FLOSS license: !!omap
- floss_license:
category: MUST
rationale: >
These criteria are designed for FLOSS projects,
so we need to ensure that they're only used where they apply.
Some projects may be mistakenly considered FLOSS even though they
are not (e.g., they might not have any license, in which case the
defaults of the country's legal system apply, or they might use a
non-FLOSS license).
We've added "produced by the project" as a clarification -
many projects use non-FLOSS software/services in the process of
creating software, or depend on them to run,
and that is allowed.
autofill: >
We currently use GitHub's API to request license information.
This API examines the LICENSE file using the gem licensee.
This only works on GitHub, and only in simple cases
(when there's a single license).
We could in addition look for the file LICENSE.spdx for the
entry 'PackageLicenseDeclared' - these aren't included often,
but it would let people declare *exactly* what license is in use.
We could add running Ben Balter's gem
[licensee](https://github.com/benbalter/licensee), this is the same
library used by GitHub but we can then apply it outside of GitHub.
[Licensee issue #85](https://github.com/benbalter/licensee/issues/85)
proposes adding LICENSE.spdx support to licensee.
See [“Open Source Licensing by the Numbers” by Ben Balter](https://speakerdeck.com/benbalter/open-source-licensing-by-the-numbers).
We could also do more specialized analysis (e.g., looking for
license information in various packaging formats) - this would
probably be best done by improving some existing library
like licensee.
- floss_license_osi:
category: SUGGESTED
met_suppress: true
rationale: >
Unusual licenses can cause long-term problems
for FLOSS projects and are more difficult for tools to handle.
That said, there are FLOSS licenses that are not OSI-approved,
e.g., the CC0 license is used by many projects but is not
OSI-approved at the time of this writing.
We expect that more advanced badges would set a higher bar (e.g.,
that it <em>must</em> be released under an OSI-approved license).
autofill: >
Currently we compare the license to see if it's on a simple list
from OSI. We could add support for automatically getting the list
from elsewhere (e.g., OSI or SPDX), and support more complex
license structures (OR, AND, and WITH).
- license_location:
category: MUST
met_url_required: true
rationale: >
The goal is to make the license very clear and connected with
the project results it applies to. It is a good idea to also
make the license clear on the project website, but there isn't
a widely-accepted way to do that today.
autofill: >
Look for files with the name LICENSE, COPYING, or COPYING-(name)
optionally extensions .txt or .md. Name could include
GPL, LGPL, and MIT.
- Documentation: !!omap
- documentation_basics:
category: MUST
na_allowed: true
na_justification_required: true
rationale: >
Potential users need documentation so that they can learn how to
use the software.
This documentation could be provided
via the project website or repository, or even
via hyperlink to some external information, so we do not specify
exactly where this information is.
autofill: >
Look for the project web page,
or a direct links from it on the same site,
that includes words like "install(ation)?", "use|using",
and "security|secure".
If examining the project repo discovers a nontrivial amount of code,
then this should not be N/A.
- documentation_interface:
category: MUST
na_allowed: true
na_justification_required: true
autofill: >
Look for a "docs" or "doc" directory, or the main site, with
.txt, .html, .md, .tex extension and uses the word "interface".
If examining the project repo discovers a nontrivial amount of code,
then this should not be N/A.
- Other: !!omap
- sites_https:
category: MUST
autofill: >
Look at project, repo, and download URLs. https is okay, http is not.
Typically anything supporting HTTPS also supports TLS, so
it's probably not worth trying to detect that specifically.
- discussion:
category: MUST
autofill: >
Currently if it's on GitHub we assume they will use its mechanisms.
We could do the same for other forges like
SourceForge, GitLab, and Savannah.
We could also look for links from the project website that suggest
the use of Bugzilla, Mantis, or Trac.
- english:
category: SHOULD
autofill: >
Look at project and/or repo page. If it's in English,
then clearly the project can accept English.
We can use more general tools to detect the natural language,
or simple mechanisms like using dictionaries/spellcheckers to
see if it's mostly English.
- maintained:
category: MUST
autofill: >
Look at the repo page.
To detect projects that have expressly stated that they are
not maintained,
look for “DEPRECATED” as the first heading of its README title,
“DEPRECATED” to the beginning of its GitHub project description
(if it is on GitHub), a
<a href="https://unmaintained.tech/“>no-maintenance-intended badge</a>
in its README, and/or
the code repository's marking system (e.g.,
GitHub’s <a href="https://docs.github.com/en/enterprise-server@2.21/github/creating-cloning-and-archiving-repositories/archiving-a-github-repository">”archive” setting</a>,
GitLab’s <a href="https://docs.gitlab.com/ee/user/project/settings/#archiving-a-project”>“archived” marking</a>,
Gerrit’s “readonly” status, or
SourceForge’s “abandoned” project status).
Additional discussion can be found <a href="https://medium.com/maintainer-io/how-to-deprecate-a-repository-on-github-8f0ceb9155e">here</a>.
To detect projects that have simply stopped being maintained,
look for projects more than X lines of code (or size) that
have had no response activity in more than Y months (in either the
project or badge). Creating issues & pull requests do not count
as responses (since they may be from those outside the project);
commits and releases *do* count as response activity.
- 'Change Control': !!omap
- Public version-controlled source repository: !!omap
- repo_public:
category: MUST
autofill: >
We currently assume that being on GitHub is enough.
Again, consider supporting other forges.
- repo_track:
category: MUST
autofill: >
If it uses git, subversion (svn), mercurial (hg), or even CVS
this would normally be met.
- repo_interim:
category: MUST
autofill: >
Consider checking if there are many versions. If versions are
only posted once every 3+ months, there's probably a problem.
- repo_distributed:
category: SUGGESTED
autofill: >
Look for git, subversion (svn), and mercurial (hg).
- Unique version numbering: !!omap
- version_unique:
category: MUST
autofill: >
Look for downloads with version numbers in the filename, or
version tags in a git repo.
- version_semver:
category: SUGGESTED
rationale: >
SemVer is widely used to communicate what an update
is (e.g., if it involves incompatible API changes),
whether something is newer or older. The scheme is simple,
supports multiple simultaneous branches, and because it uses at
least three numbers it can be distinguished from floating point.
However, many find SemVer less useful for identifying software
versions if only one version of the component is run (e.g.,
it is the code for a single website or internet service that
is constantly updated via continuous delivery).
For more discussion of the pros and cons of SemVer, see
<a href="https://news.ycombinator.com/item?id=13378637">Hacker News' Is Semantic Versioning an Anti-Pattern?</a> and
<a href="https://surfingthe.cloud/semantic-versioning-anti-pattern/">The Semantic Versioning Anti-Pattern</a>.
met_suppress: true
autofill: >
Look for git tags (at least on GitHub) that have version format, e.g.,
v?[0-9]+\.[0-9]+\.[0-9]+.* The prefixed 'v' is
sometimes used in tags.
- version_tags:
category: SUGGESTED
autofill: >
Again, look for git tags (at least on GitHub) that have
version format, e.g., v?[0-9]+\.[0-9]+\.[0-9]+.* The
prefixed 'v' is sometimes used in tags.
- Release notes: !!omap
- release_notes:
category: MUST
met_url_required: true
na_allowed: true
na_justification_required: true
rationale: >
Release notes are important because they help users decide whether
or not they will want to update, and what the impact would be (e.g.,
if the new release fixes vulnerabilities). We realize this may not
apply to projects whose main results are continuously updated and
are deployed to primarily one place and so allow "N/A" from
such projects.
autofill: >
Look for version-controlled files named NEWS, CHANGELOG, or ChangeLog
(optionally with an extension .txt, .md, or .html).
Also check to see if it uses a GitHub Releases workflow.
- release_notes_vulns:
category: MUST
na_allowed: true
na_justification_required: true
autofill: >
Examine the release notes (per above) to see if they include
CVE identifiers. Also,
use a vulnerability database such as the
National Vulnerability Database (NVD) to try to identify
publicly known vulnerabilities in this software, and see if all of
them are mentioned in the release notes.
- Reporting: !!omap
- Bug-reporting process: !!omap
- report_process:
category: MUST
met_url_required: true
autofill: >
On GitHub we presume that at least issue trackers can be used.
Search CONTRIBUTING (if it exists) for a phrase like "bug reports".
- report_tracker:
category: SHOULD
autofill: >
On GitHub we presume that at least issue trackers can be used.
Search CONTRIBUTING (if it exists) for a phrase like "issue tracker".
- report_responses:
category: MUST
autofill: >
Examine issue tracker, and see what is marked as a "bug".
Exclude the top contributor(s) as reported by the repo changes.
Then examine the responses for the rest.
Measuring "top contributors" is tricky; one potential rule is
those who contribute more than 10% of the system, or, when you
sort people by their contributions, the ones who cumulatively wrote
2/3s of the system. However,
these measures may be difficult to obtain
in a short time - perhaps just exclude anyone listed in AUTHORS or
CREDITS, or someone listed in the last X commits?
- enhancement_responses:
category: SHOULD
autofill: >
Examine issue tracker, and see what is marked as an "enhancement".
Exclude the top contributor(s) as reported by the repo changes.
Then examine the responses for the rest.
- report_archive:
category: MUST
met_url_required: true
autofill: >
If on GitHub, Savannah, SourceForge, GitLab, this is probably fine.
- Vulnerability report process: !!omap
- vulnerability_report_process:
category: MUST
met_url_required: true
autofill: >
Look for phrase like "vulnerability reporting" or
"how to report vulnerabilities" in various documents
like README, CONTRIBUTING, or a doc/* file.
- vulnerability_report_private:
category: MUST
na_allowed: true
met_url_required: true
autofill: >
Look for a phrase like "private vulnerability reporting" or
"how to report private vulnerabilities" in various documents
like README, CONTRIBUTING, or a doc/* file, and *also*
look for an OpenPGP key to use for encrypting the information.
Sadly, while Bugzilla easily supports this,
GitHub doesn't currently support this in its issue tracker, see
https://github.com/isaacs/github/issues/37
- vulnerability_report_response:
category: MUST
na_allowed: true
autofill: >
If GitHub is used, and the issue tracker has something marked
"security" or "vulnerability", measure the appropriate times.
GitHub doesn't support private reports, though, so a lot of people
won't use this.
If Bugzilla is used, grab the information publicly available and
track this.
- Quality: !!omap
- Working build system: !!omap
- build:
category: MUST
na_allowed: true
rationale: >
If a project needs to be built but there is no
working build system, then potential co-developers will not be
able to easily contribute and many security analysis tools will be
ineffective.
This is related to
<a href="https://www.joelonsoftware.com/2000/08/09/the-joel-test-12-steps-to-better-code/">Joel Test</a>
point 2, "Can you make a build in one step?"
autofill: >
See build_common_tools.
- build_common_tools:
category: SUGGESTED
na_allowed: true
autofill: >
Look for files that suggest the use of a common build systems, e.g.:
the autotools (configure.ac, makefile.am),
traditional make (Makefile, makefile),
cmake, rake, ant, maven, etc.
See http://www.dwheeler.com/essays/releasing-floss-software.html
- build_floss_tools:
category: SHOULD
na_allowed: true
autofill: >
If it's packaged in a Linux distribution repo that is FLOSS-only,
then this is met. That includes official Debian distribution
(but not contrib or non-free) or Fedora's official distribution.
If it's only source code file extensions that don't normally require
building (.py, .rb, etc.), then it is likely NA.
If the build_common_tools answers are themselves FLOSS, then this
is more likely to *also* be true. The only *real* way to check this
is to install and build on a system that only has FLOSS, and we
won't have the time to do that ourselves.
- Automated test suite: !!omap
- test:
category: MUST
rationale: >
Automated test suites immediately help detect a
variety of problems. A large test suite can find more problems, but
even a small test suite can detect problems and provide a framework
to build on.
E.g., "Tip #62: Test Early, Test Often, Test Automatically"
("The Pragmatic Programmer" by Andrew Hunt and David Thomas,
p. 237)
autofill: >
See test_invocation, and use its value here also.
- test_invocation:
category: SHOULD
autofill: >
Look in the build scripts for a non-empty test command.
E.g., look for a Makefile (including Makefile.am) with a non-empty
"check" or "test" entry. Similarly look for an entry for
maven (mvn test) or rake (rake test).
- test_most:
category: SUGGESTED
autofill: >
We could run a test suite with coverage enabled, but that would
take far too long for our time budget.
However, we *could* look for a Coveralls or Codecov badge
(a link to a badge under <https://coveralls.io>) and pull in
*that* data (since that would be the final result).
Coveralls or Code prefer 90% or more statement coverage.
- test_continuous_integration:
category: SUGGESTED
rationale: >
See
<a href="http://martinfowler.com/articles/continuousIntegration.html">Martin Fowler</a>
There has been some shift in the meaning of the term
continuous integration. Historically the term continuous
integration focused on the first part - the frequent
integration - and not on its testing. However, over time the
emphasis has shifted to include the notion of running automated
tests as soon as the code is integrated. We realize that this
can be difficult for some projects to apply, which is why it
is only SUGGESTED at the passing level.
autofill: >
Look for a .travis.yml or circle.yml file.
We also see if it has a badge from CircleCI or Travis.
Extra points: We could ask Travis or CircleCI if it's enabled.
We could look for evidence of pulls each of which are "relatively"
small (instead of rare massive changes being the norm), though
that by itself would give less confidence.
Also, make this depend on the "test" or "test_invocation" criterion.
- New functionality testing: !!omap
- test_policy:
category: MUST
autofill: >
Look for text patterns hinting at this in README, CONTRIBUTING,
or the doc/* directory.
Also, make this depend on the "test" or "test_invocation" criterion.
- tests_are_added:
category: MUST
autofill: >
Look for evidence that new tests are created.
E.G., do at least some contributions include new tests
(e.g., changes to contents in a directory whose full pathname
contains the phrase "test").
- tests_documented_added:
category: SUGGESTED
autofill: >
Look in CONTRIBUTING and README. See also test_policy.
- Warning flags: !!omap
- warnings:
category: MUST
na_allowed: true
autofill: >
See the "details" - search the build script and source code
for these.
rationale: >
"We routinely set compiler warning levels as high as possible.
It doesn't make sense to waste time trying to find a problem
that the compiler could find for you!
We need to concentrate on the harder problems at hand."
("The Pragmatic Programmer" by Andrew Hunt and David Thomas,
p. 91-92)
"Tip #23: Always use Source Code Control.
Always. Even if you are a single-person team on
a one-week project."
("The Pragmatic Programmer" by Andrew Hunt and David Thomas,
p. 88)
- warnings_fixed:
category: MUST
na_allowed: true
autofill: >
The only good way to do this is to actually do a build.
If it uses CircleCI we could look at that.
- warnings_strict:
category: SUGGESTED
na_allowed: true
autofill: >
If we find "-Wall -Wextra" in the build that's pretty strict.
- Security: !!omap
- Secure development knowledge: !!omap
- know_secure_design:
category: MUST
autofill: >
We could try to search the documentation for evidence of phrases
that suggest security knowledge, such as the phrases listed above.
- know_common_errors:
category: MUST
autofill: >
We could try to search the documentation for evidence of phrases
that suggest security knowledge, such as the phrases for common
types of vulnerabilities such as CWE/SANS top 25 or OWASP top 10.
Simply mentioning those could also be an indicator.
- Use basic good cryptographic practices: !!omap
- crypto_published:
category: MUST
na_allowed: true
# autofill: TODO
- crypto_call:
category: SHOULD
na_allowed: true
# autofill: TODO
- crypto_floss:
category: MUST
na_allowed: true
rationale: >
Software must interoperate with other software. If the
functionality cannot be implemented with FLOSS, e.g., because
of patents, then this can set a trap for others who depend on
the software.
# autofill: TODO
- crypto_keylength:
category: MUST
na_allowed: true
# autofill: TODO
- crypto_working:
category: MUST
na_allowed: true
rationale: >
If a cryptographic algorithm or mode is completely broken,
then it cannot provide a useful cryptographic service.
This is different from having a weakness;
many cryptographic algorithms have some weaknesses, yet for
backwards-compatibility it may sometimes be appropriate to use
the algorithm anyway.
"EAX" appears to be a name, not an abbreviation.
The paper describing EAX,
<a href="http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/eax/eax-spec.pdf">"A
Conventional Authenticated-Encryption Mode" by
M. Bellare, P. Rogaway D. Wagner (April 13, 2003)</a>,
does not give an expansion.
# autofill: TODO
- crypto_weaknesses:
category: SHOULD
na_allowed: true
rationale: >
SHA-1 has been known to be weak for many years;
<a href="https://security.googleblog.com/2017/02/announcing-first-sha1-collision.html">In February 2017 Google demonstrated a SHA-1 collision</a>.
There are a number of alternatives to SHA-1 that are not
patent-encumbered, such as the
SHA-2 suite (including SHA-256 and SHA-512) and SHA-3.
There is some disagreement on how important it is to avoid
CBC mode in SSH. The
<a href="http://www.openssh.com/txt/cbc.adv">OpenSSH cbc.adv</a>
page argues that the attack on SSH CBC is not a practical attack.
However, others clearly think it's more important; CERT notes it,
as does
<a href="https://developer.ibm.com/answers/questions/187318/faq-how-do-i-disable-cipher-block-chaining-cbc-mod.html">FAQ: Disable CBC in SSH</a>.
It is also easy to use a different mode than CBC; generally
when there are safer widely-available options, you should use
the safe ones instead.
This is a SHOULD, not a MUST; sometimes these weaker
mechanisms need to be used for backwards compatibility.
# autofill: TODO
- crypto_pfs:
category: SHOULD
na_allowed: true
# autofill: TODO
- crypto_password_storage:
category: MUST
na_allowed: true
rationale: >
This is a bare minimum today when storing passwords.
Sometimes software needs to have a credential, such as a password,
to authenticate it to other systems; those are intentionally
out of scope for this criterion, because in many cases it's not
possible to store them as iterated hashes using per-user salt.
# autofill: TODO
- crypto_random:
category: MUST
na_allowed: true
# autofill: TODO
- Secured delivery against man-in-the-middle (MITM) attacks: !!omap
- delivery_mitm:
category: MUST
autofill: >
Look for a download site using https.
- delivery_unsigned:
category: MUST
autofill: >
Again, look for a download site using https.
- Publicly known vulnerabilities fixed: !!omap
- vulnerabilities_fixed_60_days:
category: MUST
rationale: >
We intentionally chose to start measurement from the
time of public knowledge,
and not from the time reported to the project, because this is much
easier to measure and
verify by those outside the project.
autofill: >
Look at vulnerability databases (such as NVD),
pull out unpatched ones, and look at days since report.
- vulnerabilities_critical_fixed:
category: SHOULD
autofill: >
Look at vulnerability databases for say the last 2 years, and
find the worst-case time for response to any
critical vulnerabilities.
More than 60 days is not a good sign.
- Other security issues: !!omap
- no_leaked_credentials:
category: MUST
autofill: >
Search repo for filenames that suggest credential leaking, e.g.,
id_dsa (SSH private key). Could also look at file contents for
things like Amazon keys or Heroku keys.
Could look at .env file, though "SECRETS" there might not really
be secrets.
- Analysis: !!omap
- Static code analysis: !!omap
- static_analysis:
category: MUST
na_allowed: true
met_justification_required: true
na_justification_required: true
autofill: >
Look in build scripts for execution of common tools, and in
documentation for names of tools and the URL of a Coverity scan entry.
- static_analysis_common_vulnerabilities:
category: SUGGESTED
na_allowed: true
rationale: >
We'd like all projects to use this kind of static analysis tool,
but there may not be one in the chosen language, or it may only be
proprietary (and some developers will therefore not use it).
autofill: >
We might start by looking primarily for tools that also meet this.
E.g., brakeman for Ruby on Rails.
- static_analysis_fixed:
category: MUST
na_allowed: true
# autofill: TODO
- static_analysis_often:
category: SUGGESTED
na_allowed: true
autofill: >
Look for commit hooks or continuous integration tools like CircleCI
that would meet this.
- Dynamic code analysis: !!omap
- dynamic_analysis:
category: SUGGESTED
rationale: >
Static source code analysis and dynamic analysis tend
to find different kinds of defects (including defects that lead to
vulnerabilities), so combining them is more likely to be effective.
For example,
<a href="https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1513352.html">Linus Torvalds' "Linux 4.14-rc5" announcement
(October 15, 2017)</a>
notes that "(people are doing) random fuzzing...
and it's finding things... Very nice to see."
autofill: >
Look in documentation for references to such tools.
- dynamic_analysis_unsafe:
category: SUGGESTED
na_allowed: true
autofill: >
Look in build/test script for reference to invocation of
valgrind or ASAN.
- dynamic_analysis_enable_assertions:
category: SUGGESTED
autofill: >
Perhaps look in source code for many asserts.
rationale: >
Assertions make dynamic analysis more effective, because they
increase the number of problems (including vulnerabilities)
that dynamic analysis can detect.
Other sources also recommend the use of assertions.
"Tip #33: If it Can't happen,
use assertions to ensure that it won't."
("The Pragmatic Programmer" by Andrew Hunt and David Thomas,
p. 122)
The paper <a href="https://www.microsoft.com/en-us/research/publication/assessing-the-relationship-between-software-assertions-and-code-qualityan-empirical-investigation">"Assessing the Relationship between Software Assertions
and Code Quality: An Empirical Investigation" by
Gunnar Kudrjavets, Nachi Nagappan, and Tom Ball, May 1, 2006,
Technical report MSR-TR-2006-54</a>, presented
"... an empirical case study of two commercial software
components at Microsoft Corporation. The developers of these
components systematically employed assertions, which allowed
us to investigate the relationship between software assertions
and code quality... with an increase in the assertion density
in a file there is a statistically significant decrease in
fault density. Further, the usage of software assertions in
these components found a large percentage of the faults in
the bug database."
- dynamic_analysis_fixed:
category: MUST
na_allowed: true
# autofill: TODO
- '1': !!omap
- Basics: !!omap
- Prerequisites: !!omap
- achieve_passing:
category: MUST
- Basic project website content: !!omap
- contribution_requirements:
category: MUST
met_url_required: true
autofill: >
Look for a CONTRIBUTING{,.md,.txt,.html} file.
- Project oversight: !!omap
- dco:
category: SHOULD
met_url_required: true
#autofill: TODO
- governance:
category: MUST
met_url_required: true
rationale: >
There are many different governance models used by a wide array of
successful projects. Therefore, we do not believe that we should
specify a particular governance model. However, we do think
it is important to have a governance model, and clearly define
it, so that all participants and potential participants will
know how decisions will be made. This was inspired by the
<a href="https://web.archive.org/web/20171123114606/https://projects.ow2.org/bin/view/ow2/OMM">OW2 Open-source Maturity Model</a>,
in particular RDMP-1 and STK-1.
#autofill: TODO
- code_of_conduct:
category: MUST
met_url_required: true
rationale: >
Suggested in
<a href="https://github.com/coreinfrastructure/best-practices-badge/issues/608">issue#608</a>
by Dan Kohn and in the NYC 2016 brainstorm session.
#autofill: TODO
- roles_responsibilities:
category: MUST
met_url_required: true
rationale: >
Much knowledge about the project roles builds up
over the years, and is not sufficiently passed down to new people.
Documenting the roles can help recruit, train, and mentor new
project members. Projects may choose document the roles
and responsibilities in one place, and identify who has the roles
separately, so that the project doesn't need to update the role
information when people change roles.
The goal is to make underlying assumptions clear.
#autofill: TODO
- access_continuity:
category: MUST
met_url_required: true
#autofill: TODO
- bus_factor:
category: SHOULD
met_url_required: true
#autofill: TODO
- Documentation: !!omap
- documentation_roadmap:
category: MUST
met_url_required: true
#autofill: TODO
- documentation_architecture:
category: MUST
na_allowed: true
na_justification_required: true
met_url_required: true
rationale: >
Documenting the basic design makes it easier for potential
new developers to understand its basics.
This is related to know_secure_design, as well
as implement_secure_design and proposed documentation_security.
#autofill: TODO
- documentation_security:
category: MUST
na_allowed: true
met_url_required: true
rationale: >
Writing the specification helps the developers think about the
interface (including the API) the developers are providing, as well
letting any user or researcher know what to expect.
- documentation_quick_start:
category: MUST
na_allowed: true
na_justification_required: true
met_url_required: true
rationale: >
This is based on a conversation with Mike Milinkovich,
Executive Director of the Eclipse Foundation, about the OSS project
criteria and "what is important".
He believes, based on his long experience, that it is critically
important that any project have some sort of "quick start" guide to
help someone get started and do something with the software;
this feeling of accomplishment and demonstration that it works
builds understanding and confidence in the user. See
<a href="https://github.com/coreinfrastructure/best-practices-badge/issues/645">issue#645</a>.
- documentation_current:
category: MUST
na_allowed: true
na_justification_required: true
met_justification_required: true
rationale: >
It's difficult to keep documentation up-to-date, so the
criterion is worded this way to make it more practical.
Information on differences or changes between versions of the
software helps users of older versions
and users who are transitioning from older versions.
#autofill: TODO
- documentation_achievements:
category: MUST
met_url_required: true
rationale: >
Users and potential co-developers need to be able to
see what achievements have been attained by a project they are
considering using or contributing to. This information can
help them determine if they should. In addition, if projects
identify their achievements, other projects will be encouraged to
follow suit and also make those achievements, benefitting everyone.
#autofill: TODO
- Accessibility and internationalization: !!omap
- accessibility_best_practices:
category: SHOULD
na_allowed: true
na_justification_required: true
met_justification_required: true
#autofill:TODO
- internationalization:
category: SHOULD
na_allowed: true
na_justification_required: true
met_justification_required: true
rationale: >
When software is internationalized, the software can be used by far
more people. By itself, that's valuable.
In addition, software that can be used by far more people is more
likely to lead to larger communities, which increases the
likelihood of contributions and reviews.
#autofill:TODO
- Other: !!omap
- sites_password_security:
category: MUST
na_allowed: true
na_justification_required: true
met_justification_required: true
#autofill:TODO
- 'Change Control': !!omap
- Previous versions: !!omap
- maintenance_or_update:
category: MUST
na_allowed: true
na_justification_required: true
met_justification_required: true
rationale: >
This was inspired by
<a href="https://web.archive.org/web/20171123114606/https://projects.ow2.org/bin/view/ow2/OMM">DFCT-1.2</a>
#autofill:TODO
- Reporting: !!omap
- Bug-reporting process: !!omap
- report_tracker:
category: MUST
na_allowed: true
na_justification_required: true
met_justification_required: true
autofill: >
On GitHub we presume that at least issue trackers can be used.
Search CONTRIBUTING (if it exists) for a phrase like "issue tracker".
- Vulnerability report process: !!omap
- vulnerability_report_credit:
category: MUST
na_allowed: true
na_justification_required: true
met_url_required: true
rationale: >
It is only fair to credit those who provide vulnerability
reports. In many cases, the only reporter requirement is that
they receive credit. This is also important long-term, because
giving credit encourages additional reporting.
This was recommended in the
<a href="https://github.com/coreinfrastructure/best-practices-badge/issues/473">NYC 2016 brainstorming session</a>.
#autofill:TODO
- vulnerability_response_process:
category: MUST
met_url_required: true
rationale: >
This is inspired by
<a href="http://community.apache.org/apache-way/apache-project-maturity-model.html">Apache Project Maturity Model</a>
QU30.
#autofill: TODO
- Quality: !!omap
- Coding standards: !!omap
- coding_standards:
category: MUST
na_allowed: true
na_justification_required: true
met_url_required: true
#autofill: TODO
- coding_standards_enforced:
category: MUST
na_allowed: true
na_justification_required: true
met_justification_required: true
#autofill: TODO
- Working build system: !!omap
- build_standard_variables:
category: MUST
na_allowed: true
na_justification_required: true
met_justification_required: true
rationale: >
See
<a href="https://github.com/coreinfrastructure/best-practices-badge/issues/453">Build system should honor CC, CFLAGS, CXX, CXXFLAGS</a>
- build_preserve_debug:
category: SHOULD
na_allowed: true
na_justification_required: true
met_justification_required: true
#autofill: TODO
- build_non_recursive:
category: MUST
na_allowed: true
na_justification_required: true
met_justification_required: true
rationale: >
For more information, see
<a href="https://web.archive.org/web/20200209034547/http://aegis.sourceforge.net/auug97.pdf">"Recursive Make Considered Harmful" by Peter Miller</a>
(note that this incorrect approach can be used in any build system,
not just <em>make</em>).
Note that
<a href="http://research.microsoft.com/en-us/um/people/simonpj/papers/ghc-shake/ghc-shake.pdf">"Non-recursive Make Considered Harmful"</a>
agrees that recursive builds are bad; its argument is that
for large projects you should use a tool other than make.
In many cases it is better to automatically determine the
dependencies, but this is not always accurate or practical,
so we did not require that dependencies be automatically generated.
#autofill: TODO
- build_repeatable:
category: MUST
na_allowed: true
na_justification_required: true
met_justification_required: true
rationale: >
This is a step towards having a
<a href="https://reproducible-builds.org/">reproducible build</a>.
This criterion is much easier to meet, because it does not require
that external parties be able to reproduce the results - merely
that the project can.
Supporting full reproducible builds requires that projects provide
external parties enough information about their
build environment(s), which can be harder to do - so we have
split this requirement up.
#autofill: TODO
- Installation system: !!omap
- installation_common:
category: MUST
na_allowed: true
na_justification_required: true
met_justification_required: true
autofill: >
Look for a standard install format, or a build instruction for one.
- installation_standard_variables:
category: MUST
na_allowed: true
na_justification_required: true
met_justification_required: true
rationale: >
This supports capturing the artifacts (e.g., for analysis)
without interfering with the build or installation system due to
system-wide changes. See
<a href="https://github.com/coreinfrastructure/best-practices-badge/issues/455">DESTDIR honored at install time</a>
This doesn't apply when there's no "installation" process, or
when POSIX filesystems aren't supported during installation (e.g.,
Windows-only programs). See
<a href="https://github.com/coreinfrastructure/best-practices-badge/issues/453">Build system should honor CC, CFLAGS, CXX, CXXFLAGS</a>
#autofill: TODO
- installation_development_quick:
category: MUST
na_allowed: true
na_justification_required: true
met_justification_required: true
rationale: >
Recommended in the
<a href="https://github.com/coreinfrastructure/best-practices-badge/issues/473">NYC 2016 brainstorming session</a>.
#autofill: TODO
- Externally-maintained components: !!omap
- external_dependencies:
category: MUST
na_allowed: true
na_justification_required: true
met_justification_required: true
met_url_required: true
rationale: >
Inspired by the
<a href="https://github.com/coreinfrastructure/best-practices-badge/issues/473">NYC 2016 brainstorming session</a>.
#autofill: TODO
- dependency_monitoring:
category: MUST