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

wrangler: Try to URL decode hyperdrive password and database name before sending them to API #5143

Conversation

mtlemilio
Copy link
Contributor

What this PR solves / how to test

Fixes #SQC-153

I'm building on top of the changes in #5064

Author has addressed the following

@mtlemilio mtlemilio requested a review from a team as a code owner March 1, 2024 22:29
Copy link

changeset-bot bot commented Mar 1, 2024

⚠️ No Changeset found

Latest commit: 0c535e7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

gitguardian bot commented Mar 1, 2024

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
- PostgreSQL Credentials 0e82e17 packages/wrangler/src/tests/hyperdrive.test.ts View secret
- Generic Database Assignment ad18a0d packages/wrangler/src/tests/hyperdrive.test.ts View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@mtlemilio mtlemilio changed the title Oilylime/urldecode hyperdrive passwords wrangler: Try to URL decode hyperdrive password and database name before sending them to API Mar 1, 2024
Copy link
Contributor

github-actions bot commented Mar 1, 2024

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8239575878/npm-package-wrangler-5143

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/5143/npm-package-wrangler-5143

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8239575878/npm-package-wrangler-5143 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8239575878/npm-package-create-cloudflare-5143 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8239575878/npm-package-cloudflare-kv-asset-handler-5143
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8239575878/npm-package-miniflare-5143
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8239575878/npm-package-cloudflare-pages-shared-5143
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8239575878/npm-package-cloudflare-vitest-pool-workers-5143

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.32.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240304.0
workerd 1.20240304.0 1.20240304.0
workerd --version 1.20240304.0 2024-03-04

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

packages/miniflare/src/plugins/hyperdrive/index.ts Outdated Show resolved Hide resolved
packages/wrangler/src/hyperdrive/create.ts Outdated Show resolved Hide resolved
packages/wrangler/src/hyperdrive/create.ts Outdated Show resolved Hide resolved
packages/wrangler/src/hyperdrive/update.ts Outdated Show resolved Hide resolved
packages/wrangler/src/hyperdrive/update.ts Outdated Show resolved Hide resolved
packages/wrangler/src/hyperdrive/update.ts Outdated Show resolved Hide resolved
.changeset/twenty-laws-mix.md Outdated Show resolved Hide resolved
Copy link

codecov bot commented Mar 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.66%. Comparing base (ef06427) to head (3d95fc2).
Report is 70 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5143      +/-   ##
==========================================
+ Coverage   70.33%   70.66%   +0.32%     
==========================================
  Files         298      298              
  Lines       15512    15574      +62     
  Branches     3983     4003      +20     
==========================================
+ Hits        10910    11005      +95     
+ Misses       4602     4569      -33     
Files Coverage Δ
packages/wrangler/src/hyperdrive/client.ts 83.33% <100.00%> (+3.33%) ⬆️
packages/wrangler/src/hyperdrive/create.ts 78.12% <ø> (-0.67%) ⬇️
packages/wrangler/src/hyperdrive/update.ts 100.00% <100.00%> (+86.20%) ⬆️

... and 27 files with indirect coverage changes

@mtlemilio mtlemilio force-pushed the oilylime/urldecode-hyperdrive-passwords branch from 787e9a8 to 3d95fc2 Compare March 11, 2024 20:53
@mtlemilio mtlemilio closed this Mar 14, 2024
@mtlemilio mtlemilio force-pushed the oilylime/urldecode-hyperdrive-passwords branch from 3d95fc2 to 0c535e7 Compare March 14, 2024 18:15
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.

2 participants