mirror of
https://github.com/danog/psalm.git
synced 2024-12-04 10:38:49 +01:00
17 lines
314 B
Markdown
17 lines
314 B
Markdown
|
# TaintedSystemSecret
|
|||
|
|
|||
|
Emitted when tainted input detection is turned on and data marked as a system secret is detected somewhere it shouldn’t be.
|
|||
|
|
|||
|
```php
|
|||
|
<?php
|
|||
|
|
|||
|
/**
|
|||
|
* @psalm-taint-source system_secret
|
|||
|
*/
|
|||
|
function getConfigValue(string $data) {
|
|||
|
return "$omePa$$word";
|
|||
|
}
|
|||
|
|
|||
|
echo getConfigValue("secret");
|
|||
|
```
|