Skip to content

fix: Security updates, DELETE method support, and documentation - #6

Merged
dennisdornon merged 5 commits into
mainfrom
initial-alpha-bug-fixes
Dec 17, 2025
Merged

dennisdornon merged 5 commits into
mainfrom
initial-alpha-bug-fixes

Conversation

@dennisdornon

@dennisdornon dennisdornon commented Dec 17, 2025 •

Copy link
Copy Markdown
Member

Summary

Addresses security vulnerabilities, adds DELETE method support for destructive API operations, and documents SSL verification behavior.

Key Improvements

  • Upgraded vitest 2.1.9 to 3.2.4 to fix esbuild vulnerability
  • Aligned @vitest/coverage-v8 version with vitest 3.x
  • Added DELETE HTTP method support for destructive operations
  • Added SSL verification security warning to README

Technical Notes

The abilities client now selects HTTP method based on operation type:

  • GET for read-only operations
  • POST for mutations
  • DELETE for destructive operations (site deletion, plugin removal, etc.)

Vitest upgrade required updating the coverage package to match the new major version.

Testing

Existing unit and integration tests pass. Manual verification of DELETE method routing.

Summary by CodeRabbit

  • Documentation

    • Clarified Quick Start branch and code references
    • Added SSL verification warning and recommended local-only usage
    • Explained centralized settings.json and that environment variables override it
  • Bug Fixes

    • Destructive actions now use HTTP DELETE for intent-aligned requests
  • Chores

    • Bumped version to 1.0.0-alpha.15
    • Updated development testing dependencies

✏️ Tip: You can customize this high-level summary in your review settings.

- Route abilities with `destructive: true` annotation to HTTP DELETE
- Readonly operations continue using GET
- Non-destructive writes continue using POST
- Add unit and integration tests for DELETE method routing
Add prominent warning about MAINWP_SKIP_SSL_VERIFY security implications
per security implementation plan requirements.
Fixes 6 moderate severity vulnerabilities (GHSA-67mh-4wv8-2f99).
All 281 tests pass with new version.
Downgraded @vitest/coverage-v8 from 4.0.16 to 3.2.4 to match vitest 3.2.4.
The coverage package must share the same major version as vitest.

Also updated README branch reference from initial-abilities-api-intergration
to initial-issues-abilities-api (PR2).
@coderabbitai

coderabbitai Bot commented Dec 17, 2025 •

Copy link
Copy Markdown

Walkthrough

Bumps package/server version to 1.0.0-alpha.15, upgrades Vitest deps, adds SSL verification guidance and config precedence notes in README, and changes ability execution to send destructive abilities with HTTP DELETE (tests updated to expect DELETE).

Changes

Cohort / File(s) Change Summary
Documentation
README.md
Updated Quick Start branch reference; added SSL verification security warning; clarified use of centralized settings.json and that environment variables override file settings.
Version & Dependencies
package.json, src/index.ts
Bumped version from 1.0.0-alpha.14 to 1.0.0-alpha.15; upgraded vitest and @vitest/coverage-v8 to ^3.2.4.
Core Logic
src/abilities.ts
Added isDestructive detection and conditional request-method selection: readonly → GET (query params), destructive → DELETE (body), non-destructive write → POST.
Tests
src/abilities.test.ts, tests/integration/abilities.test.ts
Updated test descriptions and assertions to expect HTTP DELETE for destructive ability executions instead of POST.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review src/abilities.ts for correctness of isDestructive detection, payload placement (query vs. body), and edge cases when input is empty or null.
  • Verify tests (src/abilities.test.ts, tests/integration/abilities.test.ts) cover both destructive and non-destructive paths and that mocks assert the correct HTTP methods.
  • Confirm src/index.ts version bump aligns with package.json and release process.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes all three main components of the changeset: security updates (vitest upgrade, SSL warning), DELETE method support for destructive operations, and documentation improvements.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch initial-alpha-bug-fixes

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c29ca18 and 82d6d8b.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • package.json (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json

Comment @coderabbitai help to get the list of available commands and usage tips.

Resolved conflicts in package.json and package-lock.json:
- Kept typescript-eslint ^8.50.0 from main (dependabot update)
- Kept vitest ^3.2.4 from branch (security fix)
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​vitest/​coverage-v8@​2.1.9 ⏵ 3.2.49910072 +199100
Updatedvitest@​2.1.9 ⏵ 3.2.4981007999100

View full report

@socket-security

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm vite is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: package-lock.json → npm/vitest@3.2.4 → npm/vite@7.3.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/vite@7.3.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@dennisdornon

Copy link
Copy Markdown
Member Author
  • vite 7.3.0: Released Dec 15, 2025 - 0 known vulnerabilities

@dennisdornon
dennisdornon merged commit 9626510 into main Dec 17, 2025
5 checks passed
@dennisdornon
dennisdornon deleted the initial-alpha-bug-fixes branch October 6, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant