Commit Graph

36 Commits (master)

Author SHA1 Message Date
Côme Chilliet 9092dcfd41 chore: Fix psalm to use correct php version depending on branch
Needs to be adapted on each branch to reflect the used PHP version and
 help with baseline updating.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 weeks ago
Julius Härtl c7813bfdaf
feat: Implement team provider api
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2 months ago
Côme Chilliet 05de5e27eb
chore(psalm): Include cron.php into psalm checked files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
3 months ago
Joas Schilling 00acf1bae1
feat(CI): Add a stub for SensitiveParameter, so Psalm is not failing on Doctrine/DBAL
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 months ago
Maxence Lange 8b9e7e235d ocm controller
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
8 months ago
Alexander Piskun 01a11641f4 new name of AppEcosystem is AppAPI
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
8 months ago
Andrey Borysenko d3583d3f30
Fix psalm ci (stub). Wrap server container with try-catch
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
9 months ago
jld3103 cd91b77193
psalm: Enable more/less specific errors
Signed-off-by: jld3103 <jld3103yt@gmail.com>
10 months ago
Maxence Lange d2efd0e03c displayname on federated shares
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
10 months ago
jld3103 9fddbeaa54
Use psalm 5
Signed-off-by: jld3103 <jld3103yt@gmail.com>
1 year ago
Joas Schilling 8e529df6ae
Merge pull request #37505 from nextcloud/fix/recommended-psalm-options
Set recommended psalm options
1 year ago
jld3103 fa53c7c5a7
Set recommended psalm options
Signed-off-by: jld3103 <jld3103yt@gmail.com>
1 year ago
jld3103 4d390b5f54
Add stubs for Psr\Container to allow running psalm with multiple threads
Signed-off-by: jld3103 <jld3103yt@gmail.com>
1 year ago
Julius Härtl cb30c81010
chore(psalm): Make psalm aware of sabre/uri
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 year ago
John Molakvoæ 1dee36c761
Remove accessibility
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2 years ago
Côme Chilliet 139da41bd4
Add stubs for ZipArchive
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Carl Schwan aeecb72e96
Fix a few psalm issues and moved back to psalm/phar 4.18
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2 years ago
Côme Chilliet 24e9a29b3c
Add PHP 8.1 LDAP classes to ignored missing classes in psalm for docblocks
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Côme Chilliet 3631789651
Fix resource usages in OC_Image
This makes sure using resource or GdImage (PHP>=8) behaves the same.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
3 years ago
Joas Schilling 3710eca104
Allow "TwoFactor Nextcloud Notifications" to pull the state of the 2FA again
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 years ago
Richard Steinmetz 8bd8e97181
Do not cache file ids in FileSystemTags inside group folders
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
3 years ago
Julius Härtl 2d932b6b86
Add whitelist for apps inside of the server repo
Signed-off-by: Julius Härtl <jus@bitgrid.net>
3 years ago
Julius Härtl 8286f46ab9
Suppress psalm warnings about app classes
Signed-off-by: Julius Härtl <jus@bitgrid.net>
3 years ago
Lukas Reschke 47ac8e0028
Add Psalm Taint Flow Analysis
This adds the Psalm Security Analysis, as described at
https://psalm.dev/docs/security_analysis/

It also adds a plugin for adding input into AppFramework.

The results can be viewed in the GitHub Security tab at
https://github.com/nextcloud/server/security/code-scanning

**Q&A:**

Q: Why do you not use the shipped Psalm version?
A: I do a lot of changes to the Psalm Taint behaviour. Using released
versions is not gonna get us the results we want.

Q: How do I improve false positives?
A: https://psalm.dev/docs/security_analysis/avoiding_false_positives/

Q: How do I add custom sources?
A: https://psalm.dev/docs/security_analysis/custom_taint_sources/

Q: We should run this on apps!
A: Yes.

Q: What will change in Psalm?
A: Quite some of the PHP core functions are not yet marked to propagate
the taint. This leads to results where the taint flow is lost. That's
something that I am currently working on.

Q: Why is the plugin MIT licensed?
A: Because its the first of its kind (based on GitHub Code Search) and
I want other people to copy it if they want to. Security is for all :)

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
4 years ago
Arthur Schiwon 86e5e7d927
LDAP simplify User_Proxy and Group_Proxy signatures
- make User_Proxy and Group_Proxy easy to instantiate
- simplify dependent code
- move commands to info.xml
- make UpdateGroups job class non-static

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
4 years ago
Morris Jobke b70792aa6a
Add stubs for gd, intl, IntlChar, ldap, redis_cluster and xsl
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
Morris Jobke 4efca69f8d
Add psalm baseline
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
Daniel Kesselberg 8d18f0a7d7
Suppress warning for template functions.
6e8e34fef9/lib/private/legacy/template/functions.php
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
4 years ago
Daniel Kesselberg 90aa451447
Fix variable name for referenced variable.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
4 years ago
Daniel Kesselberg fe3a628470
Supress UndefinedGlobalVariable for register_command.php
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
4 years ago
Daniel Kesselberg 568e1f6d3a
Remove directory/file element.
It will suppress any error of that kind in the file. That was not intended.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
4 years ago
Daniel Kesselberg 238f181dbf
Suppress warning for $_ and $l
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
4 years ago
Daniel Kesselberg dd721fc5de
Fix: UndefinedFunction Function x does not exist in templates
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
4 years ago
Daniel Kesselberg fd6cdbcb04
Add template functions
for some reason they are not loaded by default.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
4 years ago
Daniel Kesselberg 8b3b5ae5be
Add stubs for phpseclib
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
4 years ago
Daniel Kesselberg 7257793fc4
Hello psalm
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
4 years ago