Skip to content
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

feat(Insomnia Cloud Sync): Update filesystem driver for VCS sync #7111

Merged
merged 3 commits into from Feb 27, 2024

Conversation

gatzjames
Copy link
Contributor

Highlights:

  • Use fs/promises async version instead of sync
  • Use crypto.randomUUID instead of Math.random to avoid collisions

Closes INS-3453

@gatzjames gatzjames self-assigned this Feb 26, 2024
@gatzjames gatzjames requested a review from a team February 26, 2024 13:07
await fs.writeFile(tmpPath, value, 'utf8');
await fs.rename(tmpPath, finalPath);
} catch (err) {
console.error(`[FileSystemDriver] Failed to write to ${tmpPath} then rename to ${finalPath}`, err);

Check notice

Code scanning / Semgrep OSS

Semgrep Finding: javascript.lang.security.audit.unsafe-formatstring.unsafe-formatstring Note

Detected string concatenation with a non-literal variable in a util.format / console.log function. If an attacker injects a format specifier in the string, it will forge the log message. Try to use constant values for the format string.
jackkav
jackkav previously approved these changes Feb 26, 2024
@gatzjames gatzjames force-pushed the feat/improve-file-system-driver branch from c73ac2b to e2b9dbe Compare February 27, 2024 14:47
@gatzjames gatzjames force-pushed the feat/improve-file-system-driver branch from e2b9dbe to 0bab544 Compare February 27, 2024 14:56
@gatzjames gatzjames enabled auto-merge (squash) February 27, 2024 15:04
@gatzjames gatzjames merged commit 826890c into Kong:develop Feb 27, 2024
7 checks passed
@gatzjames gatzjames deleted the feat/improve-file-system-driver branch February 27, 2024 15:07
jackkav added a commit to jackkav/insomnia that referenced this pull request Mar 13, 2024
…g#7111)

* use fs/promises and uuid instead of math.random

* Update packages/insomnia/src/sync/store/drivers/file-system-driver.ts

* Update packages/insomnia/src/sync/store/drivers/file-system-driver.ts

---------

Co-authored-by: Jack Kavanagh <jackkav@gmail.com>
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.

None yet

3 participants