manager icon indicating copy to clipboard operation
manager copied to clipboard

refactor: [M3-7277] - SAST Scan Findings: Path Traversal Vulnerability

Open cpathipa opened this issue 1 year ago โ€ข 1 comments

Description ๐Ÿ“

This PR resolve path traversal warning vulnerability in below files.

  • [x] constants.mjs
  • [x] deleteChangeset.mjs
  • [x] generate-changelogs.mjs
  • [x] package-versions/index.js

Changes ๐Ÿ”„

List any change relevant to the reviewer.

  • Implemented sanitizeFileName and safeJoinPath in generate-changelog.mjs
  • Implemented sanitizeInput, validatePackage, validateFileName and safePathJoin in constants.mjs
  • Implemented sanitizeFileName and safeJoinPath in deleteChangeset.mjs
  • Implemented sanitizePackageName in deleteChangeset.mjs

Target release date ๐Ÿ—“๏ธ

10/16

Verification steps

(How to verify changes)

  • No regression in generate changelogs, delete changelogs and package versions
  • Verify the branch (develop vs M3-7277) SAST scan job results warnings for the above files got reduced from 33 to 29.
  • Reach me incase of any further questions.

As an Author I have considered ๐Ÿค”

Check all that apply

  • [ ] ๐Ÿ‘€ Doing a self review
  • [ ] โ” Our contribution guidelines
  • [ ] ๐Ÿค Splitting feature into small PRs
  • [ ] โž• Adding a changeset
  • [ ] ๐Ÿงช Providing/Improving test coverage
  • [ ] ๐Ÿ” Removing all sensitive information from the code and PR description
  • [ ] ๐Ÿšฉ Using a feature flag to protect the release
  • [ ] ๐Ÿ‘ฃ Providing comprehensive reproduction steps
  • [ ] ๐Ÿ“‘ Providing or updating our documentation
  • [ ] ๐Ÿ•› Scheduling a pair reviewing session
  • [ ] ๐Ÿ“ฑ Providing mobile support
  • [ ] โ™ฟ Providing accessibility support

cpathipa avatar Sep 27 '24 14:09 cpathipa

Coverage Report: โœ…
Base Coverage: 87.12%
Current Coverage: 87.12%

github-actions[bot] avatar Sep 27 '24 15:09 github-actions[bot]

This PR is stale because it has been open 15 days with no activity. Please attend to this PR or it will be closed in 5 days

github-actions[bot] avatar Oct 30 '24 00:10 github-actions[bot]

This PR is stale because it has been open 15 days with no activity. Please attend to this PR or it will be closed in 5 days

github-actions[bot] avatar Nov 17 '24 00:11 github-actions[bot]

Cloud Manager UI test results

:small_red_triangle: 1 failing test on test run #11 โ†—๏ธŽ

:x: Failing:white_check_mark: Passing:arrow_right_hook: Skipped:clock1: Duration
1 Failing451 Passing2 Skipped94m 36s

Details

Failing Tests
SpecTest
:x:migrate-linode.spec.tsMigrate linodes ยป shows DC-specific pricing information when migrating linodes to similarly priced DCs

Troubleshooting

Use this command to re-run the failing tests:

yarn cy:run -s "cypress/e2e/core/linodes/migrate-linode.spec.ts"

linode-gh-bot avatar Nov 18 '24 15:11 linode-gh-bot

This PR is stale because it has been open 15 days with no activity. Please attend to this PR or it will be closed in 5 days

github-actions[bot] avatar Dec 04 '24 00:12 github-actions[bot]