|
| 1 | +# Upstream Issues |
| 2 | + |
| 3 | +Issues discovered during integration testing that need to be reported to respective repositories. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## php-aegis Issues |
| 8 | + |
| 9 | +### Issue 1: Missing php-aegis-compat Package |
| 10 | + |
| 11 | +**Severity**: High |
| 12 | +**Found in**: sinople-theme integration |
| 13 | + |
| 14 | +**Description**: |
| 15 | +The `COMPATIBILITY.md` documentation references a `php-aegis-compat` package for PHP 7.4+ compatibility, but this package does not exist. |
| 16 | + |
| 17 | +**Impact**: |
| 18 | +WordPress projects targeting PHP 7.4 (the WordPress minimum) cannot use php-aegis. |
| 19 | + |
| 20 | +**Recommended Fix**: |
| 21 | +```bash |
| 22 | +# Create the package |
| 23 | +mkdir php-aegis-compat |
| 24 | +# Implement PHP 7.4 compatible API without enums/union types |
| 25 | +``` |
| 26 | + |
| 27 | +--- |
| 28 | + |
| 29 | +### Issue 2: Not Published on Packagist |
| 30 | + |
| 31 | +**Severity**: Medium |
| 32 | +**Found in**: sinople-theme integration |
| 33 | + |
| 34 | +**Description**: |
| 35 | +php-aegis is not available on Packagist, requiring VCS repository configuration in composer.json. |
| 36 | + |
| 37 | +**Current workaround**: |
| 38 | +```json |
| 39 | +{ |
| 40 | + "repositories": [ |
| 41 | + { |
| 42 | + "type": "vcs", |
| 43 | + "url": "https://github.com/hyperpolymath/php-aegis" |
| 44 | + } |
| 45 | + ] |
| 46 | +} |
| 47 | +``` |
| 48 | + |
| 49 | +**Recommended Fix**: |
| 50 | +Publish to Packagist for standard `composer require` experience. |
| 51 | + |
| 52 | +--- |
| 53 | + |
| 54 | +### Issue 3: WordPress mu-plugin Adapter Not Implemented |
| 55 | + |
| 56 | +**Severity**: Medium |
| 57 | +**Found in**: sinople-theme integration |
| 58 | + |
| 59 | +**Description**: |
| 60 | +Documentation describes a WordPress mu-plugin adapter for automatic loading, but the adapter code does not exist. |
| 61 | + |
| 62 | +**Expected location**: `src/WordPress/MuPlugin.php` |
| 63 | + |
| 64 | +**Recommended Fix**: |
| 65 | +Implement the mu-plugin adapter or remove from documentation. |
| 66 | + |
| 67 | +--- |
| 68 | + |
| 69 | +### Issue 4: Headers::secure() Missing permissionsPolicy() |
| 70 | + |
| 71 | +**Severity**: Low |
| 72 | +**Found in**: sinople-theme integration |
| 73 | + |
| 74 | +**Description**: |
| 75 | +The `Headers::secure()` method sets security headers but is missing `Permissions-Policy` header. |
| 76 | + |
| 77 | +**Current output**: |
| 78 | +``` |
| 79 | +X-Content-Type-Options: nosniff |
| 80 | +X-Frame-Options: DENY |
| 81 | +X-XSS-Protection: 1; mode=block |
| 82 | +Content-Security-Policy: ... |
| 83 | +``` |
| 84 | + |
| 85 | +**Missing**: |
| 86 | +``` |
| 87 | +Permissions-Policy: camera=(), microphone=(), geolocation=() |
| 88 | +``` |
| 89 | + |
| 90 | +--- |
| 91 | + |
| 92 | +## sanctify-php Issues |
| 93 | + |
| 94 | +### Issue 1: UnsafeRedirect False Positive |
| 95 | + |
| 96 | +**Severity**: Medium |
| 97 | +**Found in**: sinople-theme integration |
| 98 | + |
| 99 | +**Description**: |
| 100 | +The `UnsafeRedirect` check flags code as unsafe even when `exit` is on the next line. |
| 101 | + |
| 102 | +**False positive**: |
| 103 | +```php |
| 104 | +wp_redirect($url); |
| 105 | +exit; // This IS safe, but sanctify reports it as unsafe |
| 106 | +``` |
| 107 | + |
| 108 | +**Expected behavior**: |
| 109 | +Should recognize `exit`/`die` on the immediately following line as safe. |
| 110 | + |
| 111 | +**Recommended Fix**: |
| 112 | +```haskell |
| 113 | +-- In UnsafeRedirect check, look for exit/die within next 2 statements |
| 114 | +isFollowedByExit :: Statement -> [Statement] -> Bool |
| 115 | +isFollowedByExit redirect following = |
| 116 | + case take 2 following of |
| 117 | + (ExitStatement:_) -> True |
| 118 | + (DieStatement:_) -> True |
| 119 | + _ -> False |
| 120 | +``` |
| 121 | + |
| 122 | +--- |
| 123 | + |
| 124 | +### Issue 2: MissingTextDomain False Positive on WP Core |
| 125 | + |
| 126 | +**Severity**: Low |
| 127 | +**Found in**: sinople-theme integration |
| 128 | + |
| 129 | +**Description**: |
| 130 | +The `MissingTextDomain` check flags WordPress core functions that don't need a text domain. |
| 131 | + |
| 132 | +**False positive**: |
| 133 | +```php |
| 134 | +// These are WordPress core, not theme strings |
| 135 | +__('Dashboard'); // Flagged, but this is WP core |
| 136 | +``` |
| 137 | + |
| 138 | +**Recommended Fix**: |
| 139 | +Maintain allowlist of WordPress core strings, or only check strings in theme/plugin files. |
| 140 | + |
| 141 | +--- |
| 142 | + |
| 143 | +### Issue 3: PHP 8.1+ Syntax Verification Needed |
| 144 | + |
| 145 | +**Severity**: Medium |
| 146 | +**Found in**: sinople-theme integration |
| 147 | + |
| 148 | +**Description**: |
| 149 | +Need to verify parser handles modern PHP syntax: |
| 150 | +- Nullsafe operator (`?->`) |
| 151 | +- Match expressions |
| 152 | +- Named arguments |
| 153 | +- Enums |
| 154 | +- Constructor property promotion |
| 155 | + |
| 156 | +**Recommended Fix**: |
| 157 | +Add test suite with PHP 8.1+ syntax examples. |
| 158 | + |
| 159 | +--- |
| 160 | + |
| 161 | +### Issue 4: Incomplete Guix Export Documentation |
| 162 | + |
| 163 | +**Severity**: Low |
| 164 | +**Found in**: sinople-theme integration |
| 165 | + |
| 166 | +**Description**: |
| 167 | +The `sanctify export --guix` command is documented but the output format and usage instructions are incomplete. |
| 168 | + |
| 169 | +**Missing**: |
| 170 | +- Example output |
| 171 | +- How to integrate with existing guix.scm |
| 172 | +- Container vs package mode |
| 173 | + |
| 174 | +--- |
| 175 | + |
| 176 | +## Issue Template for GitHub |
| 177 | + |
| 178 | +### php-aegis Issue Template |
| 179 | + |
| 180 | +```markdown |
| 181 | +## Issue: [Title] |
| 182 | + |
| 183 | +**Found during**: sinople-theme integration |
| 184 | +**Severity**: [High/Medium/Low] |
| 185 | + |
| 186 | +### Description |
| 187 | +[Description of the issue] |
| 188 | + |
| 189 | +### Steps to Reproduce |
| 190 | +1. [Step 1] |
| 191 | +2. [Step 2] |
| 192 | + |
| 193 | +### Expected Behavior |
| 194 | +[What should happen] |
| 195 | + |
| 196 | +### Actual Behavior |
| 197 | +[What actually happens] |
| 198 | + |
| 199 | +### Suggested Fix |
| 200 | +[Code or approach to fix] |
| 201 | +``` |
| 202 | + |
| 203 | +### sanctify-php Issue Template |
| 204 | + |
| 205 | +```markdown |
| 206 | +## Issue: [Title] |
| 207 | + |
| 208 | +**Found during**: sinople-theme integration |
| 209 | +**Severity**: [High/Medium/Low] |
| 210 | +**Component**: [Parser/Analysis/Transform/CLI] |
| 211 | + |
| 212 | +### Description |
| 213 | +[Description of the issue] |
| 214 | + |
| 215 | +### Example Code Triggering Issue |
| 216 | +```php |
| 217 | +// PHP code that triggers the issue |
| 218 | +``` |
| 219 | + |
| 220 | +### Expected Behavior |
| 221 | +[What sanctify-php should report/do] |
| 222 | + |
| 223 | +### Actual Behavior |
| 224 | +[What sanctify-php actually reports/does] |
| 225 | + |
| 226 | +### Suggested Fix |
| 227 | +[Haskell code or approach to fix] |
| 228 | +``` |
| 229 | + |
| 230 | +--- |
| 231 | + |
| 232 | +## Tracking |
| 233 | + |
| 234 | +| Issue | Repository | Reported | Status | |
| 235 | +|-------|------------|----------|--------| |
| 236 | +| php-aegis-compat missing | php-aegis | 🔲 Pending | - | |
| 237 | +| Not on Packagist | php-aegis | 🔲 Pending | - | |
| 238 | +| mu-plugin not implemented | php-aegis | 🔲 Pending | - | |
| 239 | +| Missing Permissions-Policy | php-aegis | 🔲 Pending | - | |
| 240 | +| UnsafeRedirect false positive | sanctify-php | 🔲 Pending | - | |
| 241 | +| MissingTextDomain false positive | sanctify-php | 🔲 Pending | - | |
| 242 | +| PHP 8.1+ syntax verification | sanctify-php | 🔲 Pending | - | |
| 243 | +| Guix export docs incomplete | sanctify-php | 🔲 Pending | - | |
| 244 | + |
| 245 | +--- |
| 246 | + |
| 247 | +*SPDX-License-Identifier: MIT OR AGPL-3.0-or-later* |
| 248 | +*SPDX-FileCopyrightText: 2024-2025 hyperpolymath* |
0 commit comments