-
Notifications
You must be signed in to change notification settings - Fork 1
Initial commit #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mambax7
wants to merge
7
commits into
XOOPS:master
Choose a base branch
from
mambax7:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
fcbe9d8
Initial commit
mambax7 2c83df5
fix: address PR #1 review — security hardening, bug fixes, and build…
mambax7 94f12ad
fix: address PR #1 round-2 review — slug separator, save atomicity, …
mambax7 0cdb5b7
fix: address PR #1 round-3 review — Zip Slip, symlink traversal, fre…
mambax7 db7e780
fix: address PR #1 round-4 review — tag name injection, Zip Slip mkd…
mambax7 1cd4b8f
fix: address PR #1 round-5 review — remember() double lookup, finfo g…
mambax7 ce2f9ca
fix: address PR #1 round-6 review — pluck key guard, decimals=0 bug,…
mambax7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json | ||
| language: "en-US" | ||
| early_access: false | ||
| tone_instructions: >- | ||
| Expert PHP code reviewer. Focus on type safety, PSR-12 compliance, | ||
| PHP 8.2 compatibility, and security. This is a utility library | ||
| supporting PHP 8.2 through 8.5. | ||
|
|
||
| reviews: | ||
| profile: "assertive" | ||
| request_changes_workflow: true | ||
| high_level_summary: true | ||
| poem: false | ||
| review_status: true | ||
| collapse_walkthrough: false | ||
| auto_review: | ||
| enabled: true | ||
| drafts: false | ||
| path_instructions: | ||
| - path: "src/**/*.php" | ||
| instructions: >- | ||
| Review for PHP 8.2-8.5 compatibility. PHP 8.0 features (union types, | ||
| named arguments, match expressions, constructor promotion, nullsafe | ||
| operator) are allowed. PHP 8.1 features (enums, readonly properties, | ||
| intersection types, fibers, first-class callable syntax) are allowed. | ||
| PHP 8.2 features (readonly classes, DNF types, standalone true/false/null | ||
| types, constants in traits) are allowed. Avoid PHP 8.3+ features. | ||
| Check for proper PSR-12 code style. | ||
| Check for SQL injection risks — all queries must use parameterized | ||
| statements via XOOPS database handlers. | ||
| - path: "tests/**/*.php" | ||
| instructions: >- | ||
| Review test code for proper assertions, test isolation, and edge | ||
| case coverage. Tests must work across PHPUnit 9.6, 10, and 11. | ||
|
|
||
| chat: | ||
| auto_reply: true | ||
|
|
||
| tools: | ||
| phpcs: | ||
| enabled: true | ||
| phpstan: | ||
| enabled: true | ||
| gitleaks: | ||
| enabled: true | ||
| markdownlint: | ||
| enabled: true | ||
| yamllint: | ||
| enabled: true | ||
| github-checks: | ||
| enabled: true | ||
| timeout_ms: 90000 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| root = true | ||
|
|
||
| [*] | ||
| charset = utf-8 | ||
| end_of_line = lf | ||
| insert_final_newline = true | ||
| trim_trailing_whitespace = true | ||
| indent_style = space | ||
| indent_size = 4 | ||
|
|
||
| [*.md] | ||
| trim_trailing_whitespace = false | ||
|
|
||
| [*.yml] | ||
| indent_size = 2 | ||
|
|
||
| [*.json] | ||
| indent_size = 4 | ||
|
|
||
| [Makefile] | ||
| indent_style = tab |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,36 @@ | ||||||||||||||||
| # Auto-detect text files and normalize line endings | ||||||||||||||||
| * text=auto eol=lf | ||||||||||||||||
|
|
||||||||||||||||
| # PHP files | ||||||||||||||||
| *.php text eol=lf | ||||||||||||||||
|
|
||||||||||||||||
| # Documentation | ||||||||||||||||
| *.md text eol=lf | ||||||||||||||||
| *.txt text eol=lf | ||||||||||||||||
|
|
||||||||||||||||
| # Config files | ||||||||||||||||
| *.json text eol=lf | ||||||||||||||||
| *.xml text eol=lf | ||||||||||||||||
| *.yml text eol=lf | ||||||||||||||||
| *.yaml text eol=lf | ||||||||||||||||
| *.neon text eol=lf | ||||||||||||||||
|
|
||||||||||||||||
| # Exclude from distribution archives (composer --prefer-dist) | ||||||||||||||||
| /.github/ export-ignore | ||||||||||||||||
| /tests/ export-ignore | ||||||||||||||||
| /docs export-ignore | ||||||||||||||||
| .github/ export-ignore | ||||||||||||||||
| .gitattributes export-ignore | ||||||||||||||||
| .gitignore export-ignore | ||||||||||||||||
|
Comment on lines
+21
to
+24
|
||||||||||||||||
| /docs export-ignore | |
| .github/ export-ignore | |
| .gitattributes export-ignore | |
| .gitignore export-ignore | |
| /docs/ export-ignore | |
| .gitattributes export-ignore | |
| .gitignore export-ignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| name: Bug report | ||
| description: Report a defect or regression in XOOPS Helpers. | ||
| title: "[Bug]: " | ||
| labels: | ||
| - bug | ||
| body: | ||
| - type: textarea | ||
| id: summary | ||
| attributes: | ||
| label: Summary | ||
| description: Describe the bug and the expected behavior. | ||
| validations: | ||
| required: true | ||
| - type: input | ||
| id: php_version | ||
| attributes: | ||
| label: PHP version | ||
| placeholder: "8.2.30" | ||
| validations: | ||
| required: true | ||
| - type: input | ||
| id: xoops_version | ||
| attributes: | ||
| label: XOOPS version | ||
| placeholder: "2.5.x / 2.6.x / custom" | ||
| - type: textarea | ||
| id: reproduction | ||
| attributes: | ||
| label: Reproduction | ||
| description: Include a minimal code sample or exact steps. | ||
| render: php | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: logs | ||
| attributes: | ||
| label: Errors or logs | ||
| description: Paste stack traces, warnings, or screenshots if available. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| blank_issues_enabled: false | ||
| contact_links: | ||
| - name: Security report | ||
| url: https://github.com/xoops/xoops-helpers/security/policy | ||
| about: Report security issues privately through the repository security policy. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| name: Feature request | ||
| description: Propose a new helper, adapter, or integration. | ||
| title: "[Feature]: " | ||
| labels: | ||
| - enhancement | ||
| body: | ||
| - type: textarea | ||
| id: problem | ||
| attributes: | ||
| label: Problem to solve | ||
| description: Describe the gap or developer pain point. | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: proposal | ||
| attributes: | ||
| label: Proposed solution | ||
| description: Describe the API or behavior you want. | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: compatibility | ||
| attributes: | ||
| label: Compatibility notes | ||
| description: Note any XOOPS, PHP, or BC concerns. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| ## Summary | ||
|
|
||
| - Explain what changed. | ||
| - Link any related issue or discussion. | ||
|
|
||
| ## Validation | ||
|
|
||
| - [ ] `composer validate --strict` | ||
| - [ ] `composer test` | ||
| - [ ] `composer analyse` | ||
|
|
||
| ## Notes | ||
|
|
||
| - Mention any compatibility, migration, or follow-up work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: composer | ||
| directory: / | ||
| schedule: | ||
| interval: weekly | ||
| open-pull-requests-limit: 5 | ||
|
|
||
| - package-ecosystem: github-actions | ||
| directory: / | ||
| schedule: | ||
| interval: weekly | ||
| open-pull-requests-limit: 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, master] | ||
| pull_request: | ||
| branches: [main, master] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| tests: | ||
| name: PHP ${{ matrix.php }} - ${{ matrix.stability }} | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| php: ['8.2', '8.3', '8.4', '8.5'] | ||
| stability: [prefer-stable] | ||
| include: | ||
| - php: '8.2' | ||
| stability: prefer-lowest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: ${{ matrix.php }} | ||
| extensions: mbstring, intl, zip | ||
| coverage: none | ||
|
|
||
| - name: Install dependencies | ||
| run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress | ||
|
|
||
| - name: Validate composer.json | ||
| run: composer validate --strict | ||
|
|
||
| - name: Run tests | ||
| run: composer test | ||
|
|
||
| static-analysis: | ||
| name: PHPStan | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: '8.3' | ||
| extensions: mbstring, intl | ||
| coverage: none | ||
|
|
||
| - name: Install dependencies | ||
| run: composer install --prefer-dist --no-interaction --no-progress | ||
|
|
||
| - name: Validate composer.json | ||
| run: composer validate --strict | ||
|
|
||
| - name: Run PHPStan | ||
| run: composer analyse -- --no-progress |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| name: Code Coverage | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, master] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| coverage: | ||
| name: Coverage Report | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: '8.3' | ||
| extensions: mbstring, intl, zip | ||
| coverage: xdebug | ||
|
|
||
| - name: Install dependencies | ||
| run: composer install --prefer-dist --no-interaction --no-progress | ||
|
|
||
| - name: Generate coverage | ||
| run: vendor/bin/phpunit --coverage-clover=coverage.xml | ||
|
|
||
| - name: Upload to Codecov | ||
| uses: codecov/codecov-action@v4 | ||
| with: | ||
| files: coverage.xml | ||
| fail_ci_if_error: false | ||
| env: | ||
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| name: CodeQL | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, master] | ||
| pull_request: | ||
| branches: [main, master] | ||
| schedule: | ||
| - cron: '30 3 * * 1' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| security-events: write | ||
|
|
||
| jobs: | ||
| analyze: | ||
| name: Analyze | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v3 | ||
| with: | ||
| languages: php | ||
|
|
||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: '8.3' | ||
| coverage: none | ||
|
|
||
| - name: Autobuild | ||
| uses: github/codeql-action/autobuild@v3 | ||
|
|
||
| - name: Perform CodeQL analysis | ||
| uses: github/codeql-action/analyze@v3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| name: Dependency Review | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [main, master] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| dependency-review: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Dependency review | ||
| uses: actions/dependency-review-action@v4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| /vendor/ | ||
| /composer.lock | ||
| /.phpunit.cache/ | ||
| /coverage/ | ||
| /.php-cs-fixer.cache | ||
| /.phpstan-result-cache/ | ||
| *.swp | ||
| *.swo | ||
| *~ | ||
| .DS_Store | ||
| Thumbs.db | ||
| .idea/ | ||
| .vscode/ |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
In CodeRabbit schema v2, istoolsexpected underreviews.tools(not top-level)?💡 Result:
Yes, in CodeRabbit schema v2, tools is expected under reviews.tools, not at the top level.
Citations:
Move
toolsunderreviewssection—it is currently ignored at the top level.Per CodeRabbit schema v2,
toolsmust be nested underreviews, not at the root level. The current top-level placement will be silently ignored.Suggested structure fix
reviews: profile: "assertive" request_changes_workflow: true high_level_summary: true poem: false review_status: true collapse_walkthrough: false auto_review: enabled: true drafts: false + tools: + phpcs: + enabled: true + phpstan: + enabled: true + gitleaks: + enabled: true + markdownlint: + enabled: true + yamllint: + enabled: true + github-checks: + enabled: true + timeout_ms: 90000 @@ -tools: - phpcs: - enabled: true - phpstan: - enabled: true - gitleaks: - enabled: true - markdownlint: - enabled: true - yamllint: - enabled: true - github-checks: - enabled: true - timeout_ms: 90000🤖 Prompt for AI Agents