Skip to content

Commit 50946ca

Browse files
committed
Reverting a commit on 2.5 branch, as it was only meant to be on 2.3 (so reverting after the merge)
This reverts commit f2d3223.
1 parent c8928d8 commit 50946ca

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

book/installation.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,18 @@ them all at once:
288288
Depending on the complexity of your project, this update process can take up to
289289
several minutes to complete.
290290

291+
.. tip::
292+
293+
Symfony provides a command to check whether your project's dependencies
294+
contain any know security vulnerability:
295+
296+
.. code-block:: bash
297+
298+
$ php app/console security:check
299+
300+
A good security practice is to execute this command regularly to be able to
301+
update or replace compromised dependencies as soon as possible.
302+
291303
.. _installing-a-symfony2-distribution:
292304

293305
Installing a Symfony Distribution

book/security.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,6 +1293,34 @@ cookie will be ever created by Symfony):
12931293

12941294
.. _book-security-checking-vulnerabilities:
12951295

1296+
Checking for Known Security Vulnerabilities in Dependencies
1297+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1298+
1299+
.. versionadded:: 2.5
1300+
The ``security:check`` command was introduced in Symfony 2.5. This command is
1301+
included in ``SensioDistributionBundle``, which has to be registered in your
1302+
application in order to use this command.
1303+
1304+
When using lots of dependencies in your Symfony projects, some of them may
1305+
contain security vulnerabilities. That's why Symfony includes a command called
1306+
``security:check`` that checks your ``composer.lock`` file to find any known
1307+
security vulnerability in your installed dependencies:
1308+
1309+
.. code-block:: bash
1310+
1311+
$ php app/console security:check
1312+
1313+
A good security practice is to execute this command regularly to be able to
1314+
update or replace compromised dependencies as soon as possible. Internally,
1315+
this command uses the public `security advisories database`_ published by the
1316+
FriendsOfPHP organization.
1317+
1318+
.. tip::
1319+
1320+
The ``security:check`` command terminates with a non-zero exit code if
1321+
any of your dependencies is affected by a known security vulnerability.
1322+
Therefore, you can easily integrate it in your build process.
1323+
12961324
Final Words
12971325
-----------
12981326

@@ -1321,3 +1349,4 @@ Learn more from the Cookbook
13211349

13221350
.. _`online tool`: https://www.dailycred.com/blog/12/bcrypt-calculator
13231351
.. _`frameworkextrabundle documentation`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html
1352+
.. _`security advisories database`: https://github.com/FriendsOfPHP/security-advisories

contributing/code/security.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ confirmed, the core-team works on a solution following these steps:
3838
#. Publish the post on the official Symfony `blog`_ (it must also be added to
3939
the "`Security Advisories`_" category);
4040
#. Update the security advisory list (see below).
41+
#. Update the public `security advisories database`_ maintained by the
42+
FriendsOfPHP organization and which is used by the ``security:check`` command.
4143

4244
.. note::
4345

@@ -93,6 +95,11 @@ of the downstream projects included in this process:
9395
Security Advisories
9496
-------------------
9597

98+
.. tip::
99+
100+
You can check your Symfony application for known security vulnerabilities
101+
using the ``security:check`` command. See :ref:`book-security-checking-vulnerabilities`.
102+
96103
This section indexes security vulnerabilities that were fixed in Symfony
97104
releases, starting from Symfony 1.0.0:
98105

@@ -122,3 +129,4 @@ releases, starting from Symfony 1.0.0:
122129
.. _Git repository: https://github.com/symfony/symfony
123130
.. _blog: http://symfony.com/blog/
124131
.. _Security Advisories: http://symfony.com/blog/category/security-advisories
132+
.. _`security advisories database`: https://github.com/FriendsOfPHP/security-advisories

0 commit comments

Comments
 (0)