blob: 01845a48cc2762bb974d2113531c49ef6d46c7b7 [file] [log] [blame]
Alex Gaynor99b69d92013-10-19 17:52:58 -07001Security
2========
3
Ayrxffd8d432014-06-05 17:11:59 +08004We take the security of ``cryptography`` seriously. The following are a set of
5policies we have adopted to ensure that security issues are addressed in a
6timely fashion.
7
Alex Gaynor13e9a6f2017-08-23 16:46:55 -04008Infrastructure
9--------------
10
11In addition to ``cryptography``'s code, we're also concerned with the security
12of the infrastructure we run (primarily ``cryptography.io`` and
13``ci.cryptography.io``). If you discover a security vulnerability in our
14infrastructure, we ask you to report it using the same procedure.
15
Alex Gaynor940c92f2016-02-19 06:34:39 -050016What is a security issue?
17-------------------------
18
19Anytime it's possible to write code using ``cryptography``'s public API which
Alex Gaynorebcd0372016-02-19 07:06:54 -050020does not provide the guarantees that a reasonable developer would expect it to
Alex Gaynor940c92f2016-02-19 06:34:39 -050021based on our documentation.
22
23That's a bit academic, but basically it means the scope of what we consider a
24vulnerability is broad, and we do not require a proof of concept or even a
25specific exploit, merely a reasonable threat model under which ``cryptography``
26could be attacked.
27
28To give a few examples of things we would consider security issues:
29
30* If a recipe, such as Fernet, made it easy for a user to bypass
31 confidentiality or integrity with the public API (e.g. if the API let a user
32 reuse nonces).
33* If, under any circumstances, we used a CSPRNG which wasn't fork-safe.
34* If ``cryptography`` used an API in an underlying C library and failed to
35 handle error conditions safely.
36
37Examples of things we wouldn't consider security issues:
38
Alex Gaynorf7721aa2016-02-19 07:11:03 -050039* Offering ECB mode for symmetric encryption in the *Hazmat* layer. Though ECB
40 is critically weak, it is documented as being weak in our documentation.
Alex Gaynor940c92f2016-02-19 06:34:39 -050041* Using a variable time comparison somewhere, if it's not possible to
42 articulate any particular program in which this would result in problematic
43 information disclosure.
44
45In general, if you're unsure, we request that you to default to treating things
46as security issues and handling them sensitively, the worst thing that can
Alex Gaynor9ef1d6f2017-03-24 21:03:15 -040047happen is that we'll ask you to file a public issue.
Alex Gaynor940c92f2016-02-19 06:34:39 -050048
Ayrxffd8d432014-06-05 17:11:59 +080049Reporting a security issue
50--------------------------
51
52We ask that you do not report security issues to our normal GitHub issue
53tracker.
54
55If you believe you've identified a security issue with ``cryptography``, please
Alex Gaynor09dd2872014-10-22 14:15:43 -070056report it to ``alex.gaynor@gmail.com``. Messages may be optionally encrypted
57with PGP using key fingerprint
Alex Gaynor940c92f2016-02-19 06:34:39 -050058``F7FC 698F AAE2 D2EF BECD E98E D1B3 ADC0 E023 8CA6`` (this public key is
Alex Gaynor09dd2872014-10-22 14:15:43 -070059available from most commonly-used key servers).
Alex Gaynor99b69d92013-10-19 17:52:58 -070060
Alex Gaynor9cd4b212014-01-10 06:54:21 -080061Once you've submitted an issue via email, you should receive an acknowledgment
Alex Gaynor99b69d92013-10-19 17:52:58 -070062within 48 hours, and depending on the action to be taken, you may receive
Alex Gaynor59075df2014-01-10 11:40:03 -080063further follow-up emails.
Ayrxffd8d432014-06-05 17:11:59 +080064
65Supported Versions
66------------------
67
68At any given time, we will provide security support for the `master`_ branch
Alex Gaynor940c92f2016-02-19 06:34:39 -050069as well as the most recent release.
Ayrxffd8d432014-06-05 17:11:59 +080070
Terry Chia81fed662014-07-07 11:25:51 +080071New releases for OpenSSL updates
72--------------------------------
73
Alex Gaynor56669aa2017-10-04 21:25:55 -040074As of versions 0.5, 1.0.1, and 2.0.0, ``cryptography`` statically links OpenSSL
75on Windows, macOS, and Linux respectively, to ease installation. Due to this,
76``cryptography`` will release a new version whenever OpenSSL has a security or
77bug fix release to avoid shipping insecure software.
Terry Chia81fed662014-07-07 11:25:51 +080078
79Like all our other releases, this will be announced on the mailing list and we
80strongly recommend that you upgrade as soon as possible.
81
Ayrxffd8d432014-06-05 17:11:59 +080082Disclosure Process
83------------------
84
Alex Gaynorb7114e92018-08-30 11:46:41 -040085When we become aware of a security bug in ``cryptography``, we will endeavor to
86fix it and issue a release as quickly as possible. We will generally issue a new
87release for any security issue.
Ayrxffd8d432014-06-05 17:11:59 +080088
Alex Gaynorb7114e92018-08-30 11:46:41 -040089The steps for issuing a security release are described in our
90:doc:`/doing-a-release` documentation.
Ayrxffd8d432014-06-05 17:11:59 +080091
Ayrxffd8d432014-06-05 17:11:59 +080092
93.. _`master`: https://github.com/pyca/cryptography