mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
2966f1c9d4
Enable extensions based on composer.json instead of those loaded at runtime (fixes #5482).
64 lines
1.8 KiB
PHP
64 lines
1.8 KiB
PHP
<?php
|
||
|
||
use Psalm\Type\TaintKind;
|
||
|
||
// This maps internal function names to sink types that we don’t want to end up there
|
||
|
||
/**
|
||
* @var array<string, list<list<TaintKind::*>>>
|
||
*/
|
||
return [
|
||
'exec' => [['shell']],
|
||
'create_function' => [[], ['eval']],
|
||
'file_get_contents' => [['file']],
|
||
'file_put_contents' => [['file']],
|
||
'fopen' => [['file']],
|
||
'unlink' => [['file']],
|
||
'copy' => [['file'], ['file']],
|
||
'file' => [['file']],
|
||
'link' => [['file'], ['file']],
|
||
'mkdir' => [['file']],
|
||
'move_uploaded_file' => [['file'], ['file']],
|
||
'parse_ini_file' => [['file']],
|
||
'chown' => [['file']],
|
||
'lchown' => [['file']],
|
||
'readfile' => [['file']],
|
||
'rename' => [['file'], ['file']],
|
||
'rmdir' => [['file']],
|
||
'header' => [['header']],
|
||
'symlink' => [['file']],
|
||
'tempnam' => [['file']],
|
||
'igbinary_unserialize' => [['unserialize']],
|
||
'ldap_search' => [[], ['ldap'], ['ldap']],
|
||
'mysqli_query' => [[], ['sql']],
|
||
'mysqli::query' => [['sql']],
|
||
'mysqli_real_query' => [[], ['sql']],
|
||
'mysqli::real_query' => [['sql']],
|
||
'mysqli_multi_query' => [[], ['sql']],
|
||
'mysqli::multi_query' => [['sql']],
|
||
'mysqli_prepare' => [[], ['sql']],
|
||
'mysqli::prepare' => [['sql']],
|
||
'mysqli_stmt::__construct' => [[], ['sql']],
|
||
'mysqli_stmt_prepare' => [[], ['sql']],
|
||
'mysqli_stmt::prepare' => [['sql']],
|
||
'passthru' => [['shell']],
|
||
'pcntl_exec' => [['shell']],
|
||
'pg_exec' => [[], ['sql']],
|
||
'pg_prepare' => [[], [], ['sql']],
|
||
'pg_put_line' => [[], ['sql']],
|
||
'pg_query' => [[], ['sql']],
|
||
'pg_query_params' => [[], ['sql']],
|
||
'pg_send_prepare' => [[], [], ['sql']],
|
||
'pg_send_query' => [[], ['sql']],
|
||
'pg_send_query_params' => [[], ['sql'], []],
|
||
'setcookie' => [['cookie'], ['cookie']],
|
||
'shell_exec' => [['shell']],
|
||
'system' => [['shell']],
|
||
'unserialize' => [['unserialize']],
|
||
'popen' => [['shell']],
|
||
'proc_open' => [['shell']],
|
||
'curl_init' => [['ssrf']],
|
||
'curl_setopt' => [[], [], ['ssrf']],
|
||
'getimagesize' => [['ssrf']],
|
||
];
|