Skip to content

Commit 2a01f7e

Browse files
committed
Add docs for security-checker using Composer Audit
1 parent 9523d62 commit 2a01f7e

File tree

3 files changed

+53
-2
lines changed

3 files changed

+53
-2
lines changed

doc/tasks.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ grumphp:
5454
psalm: ~
5555
rector: ~
5656
robo: ~
57+
securitychecker_composeraudit: ~
5758
securitychecker_enlightn: ~
5859
securitychecker_local: ~
5960
securitychecker_roave: ~
@@ -119,6 +120,7 @@ Every task has its own default configuration. It is possible to overwrite the pa
119120
- [Rector](tasks/rector.md)
120121
- [Robo](tasks/robo.md)
121122
- [Security Checker](tasks/securitychecker.md)
123+
- [Composer Audit](tasks/securitychecker/composeraudit.md)
122124
- [Enlightn](tasks/securitychecker/enlightn.md)
123125
- [Local](tasks/securitychecker/local.md)
124126
- [Roave](tasks/securitychecker/roave.md)
@@ -205,7 +207,7 @@ interface TaskInterface
205207
}
206208
```
207209

208-
* `getConfigurableOptions`: This method has to return all configurable options for the task.
210+
* `getConfigurableOptions`: This method has to return all configurable options for the task.
209211
* `canRunInContext`: Tells GrumPHP if it can run in `pre-commit`, `commit-msg` or `run` context.
210212
* `run`: Executes the task and returns a result
211213
* `getConfig`: Provides the resolved configuration for the task or an empty config for newly instantiated tasks.
@@ -260,7 +262,7 @@ For a more detailed view on how to use these classes, you can scroll through our
260262

261263
In some cases you might want to run the same task but with different configuration.
262264
Good news: This is perfectly possible!
263-
You can use any name you want for the task, as long as you configure an existing task in the metadata section.
265+
You can use any name you want for the task, as long as you configure an existing task in the metadata section.
264266
Configuration of the additional task will look like this:
265267

266268
```yaml

doc/tasks/securitychecker.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ The SensioLabs Security Checker API is abandoned
44

55
You can use one of following tasks as a replacement:
66

7+
- [securitychecker_composeraudit](securitychecker/composeraudit.md)
78
- [securitychecker_enlightn](securitychecker/enlightn.md)
89
- [securitychecker_local](securitychecker/local.md)
910
- [securitychecker_roave](securitychecker/roave.md)
+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Composer Audit Security Checker
2+
3+
The Security Checker will check your `composer.lock` file for known security vulnerabilities.
4+
5+
***Config***
6+
7+
The task lives under the `securitychecker_composeraudit` namespace and has the following configurable parameters:
8+
9+
```yaml
10+
# grumphp.yml
11+
grumphp:
12+
tasks:
13+
securitychecker_composeraudit:
14+
locked: true
15+
no_dev: false
16+
run_always: false
17+
working_dir: ./
18+
```
19+
20+
**format**
21+
22+
*Default: null*
23+
24+
You can choose the format of the output. The available options are `table`, `plain`, `json` and `summary`. By default, grumphp will use the format `table`.
25+
26+
**locked**
27+
28+
*Default: true*
29+
30+
Audit packages from the lock file, regardless of what is currently in vendor dir.
31+
32+
**no_dev**
33+
34+
*Default: false*
35+
36+
When this option is set to `true`, the task will skip packages under `require-dev`.
37+
38+
**run_always**
39+
40+
*Default: false*
41+
42+
When this option is set to `false`, the task will only run when the `composer.lock` file has changed. If it is set to `true`, the `composer.lock` file will be checked on every commit.
43+
44+
**working_dir**
45+
46+
*Default: ./*
47+
48+
If your `composer.lock` file is located in an exotic location, you can specify the location with this option. By default, the task will try to load a `composer.lock` file in the current directory.

0 commit comments

Comments
 (0)