| 开发者 |
nirajgirixd
mi5t4n |
|---|---|
| 更新时间 | 2026年11月30日 11:45 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv3 or later |
| 版权网址: | 版权信息 |
$pdo->exec() is not mistaken for a shell command. Where a value cannot be resolved at analysis time, the finding says so and records its confidence instead of asserting an incompatibility it cannot prove.
Findings are separated by what they actually are
switchrail-audit:ignore annotation. Exports also carry the severity, confidence and matching WordPress-VIP-Go PHPCS sniff.
What gets checked
/tmp/ and the uploads directory, directory traversal over the WordPress VIP File System object store, hard-coded upload paths, generated PHP/CSS/JS files, .htaccess and Apache assumptions, and local image processing the platform already performs.ini_set(), server-layout assumptions, and redefined core constants.fopen() mode so a file opened only for reading is not reported as a write, checks whether a query is cached before calling it uncached, and recognises that an admin-only response is not part of the edge cache. Where it still cannot be sure, it lowers the confidence and says why. Findings can be acknowledged in the source with a // switchrail-audit:ignore <rule-id> -- reason annotation.
The plugin holds itself to the same standard: its own source passes phpcs --standard=WordPress-VIP-Go.
Disclaimer
Not affiliated with or endorsed by Automattic, WordPress VIP, or the WordPress Foundation.
No. The guidelines it checks against are public, and most describe good practice on any host. A few findings, such as "Redundant on WordPress VIP" or the wp-content layout, only matter if you host there or plan to.
No. It means at least one finding is likely to cause problems on the WordPress VIP platform as written. Most are fixable — open Findings for the specific change required.
uploads/ not reported as incompatible?Because it is not. /wp-content/uploads/ is the one path under wp-content that application code may write to on WordPress VIP. It is imported with the WordPress VIP CLI rather than committed to the repository, which is why it is listed as "Not deployed" rather than as a problem.
Yes. Add // switchrail-audit:ignore <rule-id> -- your reason to the line, or // switchrail-audit:ignore-next-line <rule-id> -- your reason above it. A reason is required. Security findings cannot be suppressed, so a plugin cannot hide its own shell calls or unescaped output.
Yes. Filter switchrail_audit_scanner_rules to add, modify or remove rules, and switchrail_audit_scanner_excluded_directories to change which directories are skipped.
No. It reads code without running it, so it cannot see behaviour that only appears under real traffic or real data. Test on a WordPress VIP environment before relying on the result.
switchrail-audit:ignore annotation.