From 3156dddd987fee02178264da1af40ba9f9dfedfb Mon Sep 17 00:00:00 2001 From: chodeus Date: Mon, 20 Jul 2026 01:32:22 +0800 Subject: [PATCH 1/2] chore: add CodeRabbit review config --- .coderabbit.yaml | 175 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 .coderabbit.yaml diff --git a/.coderabbit.yaml b/.coderabbit.yaml new file mode 100644 index 00000000..314b8c46 --- /dev/null +++ b/.coderabbit.yaml @@ -0,0 +1,175 @@ +# CodeRabbit config — folder.view3 (Unraid plugin: PHP emhttp + jQuery/vanilla JS + CSS + .plg) +# Lives on both `beta` (dev branch features are cut from) and `main` (default). +language: "en-US" + +reviews: + profile: "chill" + request_changes_workflow: false + + auto_review: + enabled: true + drafts: false + # main is the default branch and is always auto-reviewed; beta is the + # active dev branch that feature PRs target, so it must be listed too. + base_branches: + - "beta" + + # Exclude vendored libraries, release artifacts, images, and the dev/ scratch + # tree so review focuses on hand-written plugin source. CI already validates + # the .plg (xmllint) and PHP syntax (php -l); don't re-lint those here. + path_filters: + - "!archive/**" + - "!screenshots/**" + - "!img/**" + - "!dev/**" + - "!**/scripts/include/**" + - "!**/styles/include/**" + - "!**/*.min.js" + - "!**/*.txz" + - "!**/*.png" + - "!**/*.jpg" + - "!**/*.gif" + - "!CHANGELOG-fixes.md" + + path_instructions: + - path: "src/**/*.{php,page}" + instructions: | + Server-side PHP for the Unraid emhttp environment: NO Composer/autoloader, + raw require_once includes, global $var / global config state. Review for: + + INPUT: Every request value ($_POST/$_GET/$_REQUEST) must be validated + BEFORE use — allowlist (in_array strict, ===) for enums/types, tight + regex for ids/paths, and reject (http_response_code 400 + exit) on + anything unexpected. fv3_validate_type() is the pattern; new endpoints + must not read a raw type/id/key and act on it un-checked. + + OUTPUT (XSS): htmlspecialchars/escape every dynamic value echoed into + HTML, into an inline