You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run [Psalm’s Security Analysis](https://psalm.dev/docs/security_analysis/)as a Github action (a more general version [can be found here](https://github.com/psalm/psalm-github-actions)).
4
4
5
5
```yaml
6
-
name: Static analysis
6
+
name: Psalm Security Scan
7
7
8
8
on: [push, pull_request]
9
9
@@ -15,60 +15,20 @@ jobs:
15
15
- name: Checkout code
16
16
uses: actions/checkout@v2
17
17
18
-
- name: Psalm
19
-
uses: docker://vimeo/psalm-github-actions
20
-
18
+
- name: Psalm Security Scan
19
+
uses: docker://ghcr.io/psalm/psalm-security-scan
20
+
21
+
- name: Upload Security Analysis results to GitHub
Psalm supports [Security Analysis](https://psalm.dev/docs/security_analysis/). You can use this config to show security analysis reports:
36
-
37
-
```diff
38
-
- name: Psalm
39
-
uses: docker://vimeo/psalm-github-actions
40
-
+ with:
41
-
+ security_analysis: true
42
-
```
43
-
44
-
### Send security output to GitHub Security tab
45
-
46
-
GitHub also allows you to [send security issues to a separate part of the site](https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/sarif-support-for-code-scanning) that can be restricted to members of your team.
47
-
48
-
Use the following config:
49
-
50
-
```diff
51
-
- name: Psalm
52
-
uses: docker://vimeo/psalm-github-actions
53
-
+ with:
54
-
+ security_analysis: true
55
-
+ report_file: results.sarif
56
-
+ - name: Upload Security Analysis results to GitHub
57
-
+ uses: github/codeql-action/upload-sarif@v1
58
-
+ with:
59
-
+ sarif_file: results.sarif
60
-
```
61
-
62
-
## Customising Composer
63
-
64
-
Specify `composer_require_dev: true` to install dev dependencies and `composer_ignore_platform_reqs: true` in order to ignore platform requirements.
0 commit comments