Skip to content

Conversation

@dcshzj
Copy link
Contributor

@dcshzj dcshzj commented Dec 4, 2025

Problem

Closes [insert issue #]

Solution

Breaking Changes

  • Yes - this PR contains breaking changes
    • Details ...
  • No - this PR is backwards compatible with ALL of the following feature flags in this doc

Features:

  • Details ...

Improvements:

  • Details ...

Bug Fixes:

  • Details ...

Before & After Screenshots

BEFORE:

AFTER:

Tests

Deploy Notes

New environment variables:

  • env var : env var details
    • added env var to 1PW + SSM script (fetch_ssm_parameters.sh)

New scripts:

  • script : script details

New dependencies:

  • dependency : dependency details

New dev dependencies:

  • dependency : dependency details

dcshzj and others added 5 commits October 16, 2025 20:12
…1467)

* fix(review): prevent users from specifying themselves as reivewers

* test(review): add test toe ensure users cannot specify themselves for review request

* chore: remove extra `.list.mock` call
Copilot AI review requested due to automatic review settings December 4, 2025 07:42
@mergify
Copy link

mergify bot commented Dec 4, 2025

⚠️ The sha of the head commit of this PR conflicts with #1470. Mergify cannot evaluate rules on this PR. ⚠️

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This is a release PR that bumps the version from 0.93.0 to 0.95.0 and includes important security fixes and infrastructure updates.

Key Changes:

  • Enhanced path traversal protection by adding isSafePath validation to file and directory creation/rename operations
  • Added validation to prevent users from requesting themselves as reviewers
  • Updated IAM deployment roles for both staging and production environments

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
package.json Version bumped from 0.93.0 to 0.95.0
package-lock.json Version bumped to match package.json
CHANGELOG.md Added release notes for v0.95.0 and v0.94.0 with PR references and dates
src/services/fileServices/MdPageServices/SubcollectionPageService.js Added isSafePath validation to prevent path traversal in subcollection page create and rename operations
src/services/fileServices/MdPageServices/ResourcePageService.js Added isSafePath validation to prevent path traversal in resource page metadata validation
src/services/directoryServices/ResourceDirectoryService.js Added isSafePath validation to prevent path traversal in resource directory create and rename operations
src/routes/v2/authenticated/review.ts Added validation to reject review requests where the user attempts to add themselves as a reviewer
src/routes/v2/authenticated/tests/review.spec.ts Added test coverage for the self-review prevention feature
.github/workflows/deploy_staging.yml Updated CICD role ARN from generic GitHub OIDC role to environment-specific staging deploy role
.github/workflows/deploy_prod.yml Updated CICD role ARN from generic GitHub OIDC role to environment-specific production deploy role

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +126 to +130
!isSafePath(
`/${collectionName}/${subcollectionName}/${newFileName}`,
`/${collectionName}`
)
)
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new isSafePath validation is a critical security feature that prevents path traversal attacks, but it lacks test coverage. Consider adding tests that verify this validation rejects malicious paths like those containing .., \0, or backslashes.

Copilot uses AI. Check for mistakes.
const tokenArray = fileNameArray.split("-")
const date = tokenArray.slice(0, 3).join("-")
if (!isDateValid(date))
if (!isDateValid(date) || !isSafePath(`/${fileName}`, "/"))
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new isSafePath validation is a critical security feature that prevents path traversal attacks, but it lacks test coverage. Consider adding tests that verify this validation rejects malicious paths like those containing .., \0, or backslashes.

Copilot uses AI. Check for mistakes.
Comment on lines +86 to +90
!isSafePath(
`/${resourceRoomName}/${resourceCategoryName}`,
`/${resourceRoomName}`
)
) {
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new isSafePath validation is a critical security feature that prevents path traversal attacks, but it lacks test coverage. Consider adding tests that verify this validation rejects malicious paths like those containing .., \0, or backslashes.

Copilot uses AI. Check for mistakes.
Comment on lines +124 to +128
!isSafePath(
`/${resourceRoomName}/${newDirectoryName}`,
`/${resourceRoomName}`
)
) {
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new isSafePath validation is a critical security feature that prevents path traversal attacks, but it lacks test coverage. Consider adding tests that verify this validation rejects malicious paths like those containing .., \0, or backslashes.

Copilot uses AI. Check for mistakes.
Comment on lines +30 to +34
(hasSpecialCharInTitle({ title: fileName, isFile: true }) ||
!isSafePath(
`/${collectionName}/${subcollectionName}/${fileName}`,
`/${collectionName}`
))
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new isSafePath validation is a critical security feature that prevents path traversal attacks, but it lacks test coverage. Consider adding tests that verify this validation rejects malicious paths like those containing .., \0, or backslashes.

Copilot uses AI. Check for mistakes.
@mergify mergify bot mentioned this pull request Dec 4, 2025
3 tasks
@dcshzj dcshzj enabled auto-merge December 4, 2025 09:26
@dcshzj dcshzj added this pull request to the merge queue Dec 4, 2025
Merged via the queue into master with commit ab509b2 Dec 4, 2025
13 of 14 checks passed
@dcshzj dcshzj deleted the release_v0.95.0 branch December 4, 2025 09:35
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.

3 participants