diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e448bf922ce..afe17a95f84 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -37,9 +37,9 @@ /apps/files_trashbin/src* @skjnldsv # Security team +/build/psalm-baseline-security.xml @nickvergessen /resources/codesigning @mgallien @miaulalala @nickvergessen /resources/config/ca-bundle.crt @ChristophWurst @miaulalala @nickvergessen -/.drone.yml @nickvergessen # Two-Factor Authentication # https://github.com/nextcloud/wg-two-factor-authentication#members diff --git a/.github/workflows/static-code-analysis.yml b/.github/workflows/static-code-analysis.yml index 63ad51a26c6..c5e8e957077 100644 --- a/.github/workflows/static-code-analysis.yml +++ b/.github/workflows/static-code-analysis.yml @@ -60,7 +60,11 @@ jobs: run: composer i - name: Psalm taint analysis - run: composer run psalm:security -- --threads=1 --monochrome --no-progress --output-format=github --report=results.sarif + run: composer run psalm:security -- --threads=1 --monochrome --no-progress --output-format=github --update-baseline --report=results.sarif + + - name: Show potential changes in Psalm baseline + if: always() + run: git diff --exit-code -- . ':!lib/composer' - name: Upload Security Analysis results to GitHub if: always() diff --git a/.reuse/dep5 b/.reuse/dep5 index 940d8160815..7cbbb64b63c 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -103,7 +103,7 @@ Files: core/img/desktopapp.svg Copyright: 2016-2024 Nextcloud GmbH and Nextcloud contributors License: AGPL-3.0-or-later -Files: build/psalm-baseline-ocp.xml build/psalm-baseline.xml build/stubs/xsl.php build/stubs/gd.php build/stubs/imagick.php build/stubs/intl.php build/stubs/IntlChar.php build/stubs/ldap.php build/stubs/memcached.php build/stubs/redis.php build/stubs/redis_cluster.php build/stubs/sftp.php build/stubs/ssh2.php build/stubs/apcu.php +Files: build/psalm-baseline-ocp.xml build/psalm-baseline-security.xml build/psalm-baseline.xml build/stubs/xsl.php build/stubs/gd.php build/stubs/imagick.php build/stubs/intl.php build/stubs/IntlChar.php build/stubs/ldap.php build/stubs/memcached.php build/stubs/redis.php build/stubs/redis_cluster.php build/stubs/sftp.php build/stubs/ssh2.php build/stubs/apcu.php Copyright: 2020 Nextcloud GmbH and Nextcloud contributors License: AGPL-3.0-or-later diff --git a/build/psalm-baseline-security.xml b/build/psalm-baseline-security.xml new file mode 100644 index 00000000000..c42b10d75c6 --- /dev/null +++ b/build/psalm-baseline-security.xml @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cache]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + getPathname(), '.php')]]> + + + + + + + + + + passphrase]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + getTraceAsString()]]> + + + getTraceAsString()]]> + + + + + + + + + + + + + + + + + + buildProviderList()->render()]]> + + + buildProviderList()->render()]]> + + + diff --git a/composer.json b/composer.json index 86908c10c88..5912a81f987 100644 --- a/composer.json +++ b/composer.json @@ -60,7 +60,7 @@ "lint": "find . -name \\*.php -not -path './lib/composer/*' -not -path './build/stubs/*' -print0 | xargs -0 -n1 php -l", "psalm": "psalm --no-cache --threads=$(nproc)", "psalm:ocp": "psalm --no-cache --threads=$(nproc) -c psalm-ocp.xml", - "psalm:security": "psalm --no-cache --threads=$(nproc) --taint-analysis --ignore-baseline", + "psalm:security": "psalm --no-cache --threads=$(nproc) --taint-analysis --use-baseline=build/psalm-baseline-security.xml", "psalm:update-baseline": "psalm --no-cache --threads=$(nproc) --update-baseline", "serve": [ "Composer\\Config::disableProcessTimeout",