Commit d0899b5
authored
feat(ZMSKVR): implement php code scanning with psalm (#2203)
* chore(ZMSKVR): Add Psalm security scan workflow for php code scan
* fix(ZMSKVR): Refactor Psalm security scan workflow
* feat(ZMSKVR): add psalm security scan in zmscitizenapi
* feat(ZMSKVR): add psalm security scan in zmscitizenapi
* fix(ZMSKVR): output redirection for Psalm results
* feat(ZMSKVR): add psalm security scan in zmscitizenapi add psalm.xml
* fix(ZMSKVR): Update psalm.yml
* fix(ZMSKVR): always upload Psalm SARIF results
Ensure the Psalm workflow uploads SARIF findings even when Psalm returns a non-zero exit code, then fail the job explicitly afterward so CI enforcement remains intact.
* fix(ZMSKVR): align SARIF checkout path for Psalm
Set upload-sarif checkout_path to the matrix project directory so GitHub can resolve Psalm paths and show code previews for alerts.
* fix(ZMSKVR): use relative checkout_path for SARIF upload
Switch upload-sarif checkout_path to the matrix project relative path so GitHub can resolve Psalm file locations correctly.
* fix(ZMSKVR): trying something
* fix(ZMSKVR): trying something
* fix(ZMSKVR): Psalm Security Scan add manual trigger and fix preview
* fix(ZMSKVR): normalize Psalm SARIF paths before upload
Rewrite SARIF artifact URIs to repository-root-relative paths so GitHub code scanning can resolve files and render alert previews.
* feat(ZMSKVR): roll out Psalm config across all modules
Add Psalm as a dev dependency in each module, create per-module psalm.xml configs, and expand the Psalm CI matrix to scan all modules with module-aware SARIF path normalization.
* fix(ZMSKVR): guard SARIF upload on generated report
Upload SARIF only when the module report exists and fail with a clear message when Psalm or SARIF generation fails.
* fix(ZMSKVR): disable fail-fast and refresh module lockfiles
Prevent matrix runs from canceling sibling jobs and commit regenerated composer.lock files after adding Psalm to all modules.
* feat(ZMSKVR): split Psalm dead-code scanning strategy
Disable dead-code checks in per-module scans to reduce alert noise and add an opt-in monorepo dead-code job that analyzes cross-module usage.
* feat(ZMSKVR): run monorepo dead-code job on all triggers
Execute the psalm-dead-code job alongside the matrix scan for push, pull request, scheduled, and manual workflow runs.
* fix(ZMSKVR): include module runtime context in Psalm configs
Add config/bootstrap/routing files to module and monorepo Psalm project files so global App symbols are available during analysis.
* feat(ZMSKVR): Add emojis to workflow psalm.yml and set schedule
* feat(ZMSKVR): Add emojis to CodeQL Advanced name
* fix(ZMSKVR): align Psalm workflow with CodeQL triggers and concurrency
Match CodeQL Advanced on/pull_request and push to main, add pull-requests read permission, and cancel in-progress runs per ref.
* fix(ZMSKVR): align DDEV MariaDB 10.11 for RENAME COLUMN migrations
* fix(ZMSKVR): map Zmsclient RequestException to client communication error
Handle BO\Zmsclient\Psr7\RequestException (e.g. SSL/cURL failures) so
responses use zmsClientCommunicationError instead of unknownError.
Align ErrorMessages::get call with single-parameter signature.
* fix(ZMSKVR): default ZMS_API_URL to loopback HTTP in DDEV template
PHP cURL to https://*.ddev.site from the web container often fails TLS
verification; same Apache is reachable over http://127.0.0.1 without SSL.
* clean(ZMSKVR): Changed file names detected by Psalm PHP Security Scan
* fix(ZMSKVR): fix monorepo Psalm config vendor path resolution
Remove root vendor ignore from psalm.monorepo.xml; with resolveFromConfigFile it pointed at missing ./vendor and broke CI.
* clean(ZMSKVR): mark Slim Sanitizer as final
Satisfy Psalm ClassMustBeFinal; class is not extended and only exposes static helpers.
* fix(ZMSKVR): unused var issue
* fix(ZMSKVR): fail Psalm CI only when SARIF is missing, not on findings
Psalm exits non-zero when it reports issues but still writes SARIF for
CodeQL upload. Treat missing SARIF as the job failure condition instead.
* fix(ZMSKVR): fail Psalm CI when findings exist, still upload SARIF
Use continue-on-error on the scan step so SARIF normalize/upload run even
when Psalm exits non-zero, then fail the job if SARIF is missing or the
recorded Psalm exit code is not zero.
* feat(ZMS): run Psalm scan on main schedule only while debt remains
Drop pull_request and push triggers so branch CI is not blocked by existing
findings; keep daily 05:00 UTC uploads on main with fail-on-error unchanged.
* fix(ZMSKVR): pin vimeo/psalm to 6.5.0 for CI PHP 8.3.6 compatibility
Psalm 6.16+ requires patched PHP 8.3.16+, which breaks reference-libraries
on GitHub runners; 6.5.0 is the last release accepting PHP 8.3.6.
* fix(ZMSKVR): exclude vendor dirs from monorepo Psalm scan
Prevent the dead-code job from analyzing third-party dependencies across
all 13 modules, matching per-module psalm.xml ignoreFiles behavior.1 parent b622439 commit d0899b5
47 files changed
Lines changed: 40903 additions & 10642 deletions
File tree
- .ddev
- .github/workflows
- mellon
- zmsadmin
- zmsapi
- zmscalldisplay
- zmscitizenapi
- src/Zmscitizenapi/Services/Core
- zmsclient
- zmsdb
- zmsdldb
- src/Zmsdldb/Importer
- zmsentities
- zmsmessaging
- zmsslim
- src/Slim/Helper
- zmsstatistic
- zmsticketprinter
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
0 commit comments