@@ -2055,18 +2055,20 @@ to work correctly. Just pass a file name to enable it::
2055
2055
You can also access a secure random instance directly from the Symfony
2056
2056
dependency injection container; its name is ``security.secure_random ``.
2057
2057
2058
- Checking Dependencies Security
2059
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2058
+ .. _book-security-checking-vulnerabilities :
2059
+
2060
+ Checking for Known Security Vulnerabilities in Dependencies
2061
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2060
2062
2061
2063
.. versionadded :: 2.5
2062
2064
The ``security:check `` command was introduced in Symfony 2.5. This command is
2063
2065
included in ``SensioDistributionBundle ``, which has to be registered in your
2064
2066
application in order to use this command.
2065
2067
2066
- When using lots of dependencies in your Symfony projects, odds are that some of
2067
- them contain security vulnerabilities. That's why Symfony includes a command
2068
- called ``security:check `` that checks whether any of your installed dependencies
2069
- contain a known security vulnerability :
2068
+ When using lots of dependencies in your Symfony projects, some of them may
2069
+ contain security vulnerabilities. That's why Symfony includes a command called
2070
+ ``security:check `` that checks your `` composer.lock `` file to find any known
2071
+ security vulnerability in your installed dependencies :
2070
2072
2071
2073
.. code-block :: bash
2072
2074
@@ -2077,6 +2079,12 @@ update or replace compromised dependencies as soon as possible. Internally,
2077
2079
this command uses the public `security advisories database `_ published by the
2078
2080
FriendsOfPHP organization.
2079
2081
2082
+ .. tip ::
2083
+
2084
+ The ``security:check `` command terminates with a non-zero exit code if
2085
+ any of your dependencies is affected by a known security vulnerability.
2086
+ Therefore, you can easily integrate it in your build process.
2087
+
2080
2088
Final Words
2081
2089
-----------
2082
2090
0 commit comments