-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (43 loc) · 1.1 KB
/
psalm-static-analysis-api.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Psalm Static analysis - Service API
on:
pull_request:
branches: [ main ]
paths:
# only run when service-api is changed
- 'service-api/app/**'
permissions:
actions: read
checks: read
contents: read
deployments: read
issues: read
packages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
env:
SERVICE-PATH: service-api
jobs:
psalm:
name: Psalm
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ env.SERVICE-PATH }}/app
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: vimeo/psalm
- name: Composer install
run: composer install
- name: Run psalm
run: psalm --output-format=github --taint-analysis --report=results.sarif
- name: Upload Security Analysis results to GitHub
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: ./${{ env.SERVICE-PATH }}/app/results.sarif