Skip to content

Commit 24fe7e5

Browse files
authored
Advertise SARIF export in the documentation (#4633)
1 parent 78f4a06 commit 24fe7e5

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/security_analysis/index.md

+20
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,23 @@ Nobody likes to wade through a ton of false-positives – [here’s a guide to a
5353
Since taint analysis is performed separately from other static code analysis, it makes sense to use a separate baseline for it.
5454

5555
You can use --use-baseline=PATH option to set a different baseline for taint analysis.
56+
57+
## Viewing Results in a User Interface
58+
59+
Psalm supports the [SARIF](http://docs.oasis-open.org/sarif/sarif/v2.0/csprd01/sarif-v2.0-csprd01.html) standard for exchanging static analysis results. This enables you to view the results in any SARIF compatible software, including the taint flow.
60+
61+
### GitHub Code Scanning
62+
63+
[GitHub code scanning](https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/about-code-scanning) can be set up by using the [Psalm GitHub Action](https://github.com/marketplace/actions/psalm-static-analysis-for-php).
64+
65+
Alternatively, the generated SARIF file can be manually uploaded as described in [the GitHub documentation](https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/uploading-a-sarif-file-to-github).
66+
67+
The results will then be avaible in the "Security" tab of your repository.
68+
69+
### Other SARIF compatible software
70+
71+
To generate a SARIF report run Psalm with the `--report` flag and a `.sarif` extension. For example:
72+
73+
```bash
74+
psalm --report=results.sarif
75+
```

0 commit comments

Comments
 (0)