Repository navigation
Conversation
…or telemetry Migration ERROR messages reported to telemetry could embed absolute filesystem paths from raw Node fs error messages (ENOENT/EACCES/EBUSY/ EEXIST), leaking the user home folder, workspace and customer folder names. Node fs errors are now reduced to their error code and the offending file name only; directories are removed. Adds pathToFilename/stripPaths/curateErrorDescription in migration-utils, routes the determineMessage fallback through stripPaths, and curates the previously raw error.message pass-throughs in ProjectMigrator, BulkProjectMigrator and project discovery.
🦋 Changeset detectedLatest commit: 0b4d949 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
SummaryThe following content is AI-generated and provides a summary of the pull request: Title: Sanitize filesystem paths in Fiori migration error reporting DescriptionReduce exposure of user, workspace, and customer directory names in migration error telemetry while retaining useful diagnostic details.
Type of change
How have you tested?
Checklist:
PR Bot InformationVersion:
|
|
This branch was previously deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Summary
Migration
ERRORmessages reported to telemetry could embed absolute filesystem paths taken verbatim from raw Nodefserror messages (ENOENT/EACCES/EBUSY/EEXIST). This leaked the user's home folder (= SAP user id), as well as workspace and customer folder names — personal data under GDPR.Real example seen in production telemetry:
This restores the pre-refactor behaviour where fs errors were converted to path-free messages at the point they are caught, rather than relying solely on a downstream sanitizer.
Changes
pathToFilename,stripPathsandcurateErrorDescriptiontoutils/migration-utils.ts. A caught Node fs error is reduced to its error code plus the offending file name only; directories (which can contain user/customer/workspace names) are removed. A path that ends in a plain folder is dropped entirely; files and dotfiles/dotfolders (.vscode,.gitignore) are kept.determineMessagefallback throughstripPaths, so generic fs errors (anything that is not aSyntaxErrororEPERM) no longer return the raw path. This also covers the sites that already route throughdetermineMessage(files/project-files.ts,migration-process/validation.ts).error.messagepass-throughs:ProjectMigrator.ts— commit failure and TypeScript-enable failureBulkProjectMigrator.ts— per-project catch, and the re-thrown commit errorproject/regular-project.ts— project discovery failureBehaviour
...mkdir 'd:\WorkBuddySpace\zcustomer\.vscode'is now reported asError committing migration: ENOENT: no such file or directory, mkdir '.vscode'— the drive, workspace and customer folder names are gone, the error code and file name remain for diagnostics.Test plan
migration-utils.test.tsforpathToFilename,stripPaths,curateErrorDescription, and a path-free assertion ondetermineMessage(using the real telemetry sample).tsc --buildclean; ESLint 0 errors.