docs/running_psalm/issues/TaintedFile.md
This rule is emitted when user-controlled input can be passed into a sensitive file operation.
The risk here depends on the actual operation that contains user-controlled input, and how it is later on processed.
It could range from:
file_put_contentsfile_put_contentsfile_get_contentsunlink<?php
$content = file_get_contents($_GET['header']);
echo $content;
Use an allowlist approach where possible to verify names on file operations.
Sanitize user-controlled filenames by stripping .., \ and /.