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

fix: don't leak internal class #3024

Merged
merged 5 commits into from Apr 1, 2024
Merged

fix: don't leak internal class #3024

merged 5 commits into from Apr 1, 2024

Conversation

ronag
Copy link
Member

@ronag ronag commented Mar 31, 2024

Don't pass the internal request object, create a "safe" representation. Also don't allow external mutation through addHeaders.

@ronag ronag added the semver-major Features or fixes that will be included in the next semver major release label Mar 31, 2024
@ronag ronag force-pushed the hide-internals branch 4 times, most recently from 96b96bd to b096245 Compare March 31, 2024 08:01
@ronag ronag requested a review from mcollina March 31, 2024 08:28
@ronag
Copy link
Member Author

ronag commented Mar 31, 2024

The messages here are weird, :headers isn't actually headers it's response

@ronag ronag force-pushed the hide-internals branch 5 times, most recently from 3b69310 to 1d902e9 Compare March 31, 2024 08:48
@ronag ronag marked this pull request as draft March 31, 2024 09:50
@ronag ronag force-pushed the hide-internals branch 4 times, most recently from 89dfbd7 to dbc945d Compare March 31, 2024 10:29
@ronag ronag marked this pull request as ready for review March 31, 2024 10:29
@ronag ronag force-pushed the hide-internals branch 3 times, most recently from 7759418 to 5e4bbb0 Compare March 31, 2024 10:32
@codecov-commenter
Copy link

codecov-commenter commented Mar 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.50%. Comparing base (7fb8232) to head (241f87f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3024   +/-   ##
=======================================
  Coverage   93.50%   93.50%           
=======================================
  Files          89       89           
  Lines       24220    24239   +19     
=======================================
+ Hits        22646    22665   +19     
  Misses       1574     1574           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@metcoder95
Copy link
Member

Shall we point to next?

types/diagnostics-channel.d.ts Outdated Show resolved Hide resolved
types/diagnostics-channel.d.ts Outdated Show resolved Hide resolved
@ronag ronag requested a review from metcoder95 March 31, 2024 12:45
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

The goal is to leak the internal class, so it could be used as key in maps etc.

@ronag
Copy link
Member Author

ronag commented Mar 31, 2024

That's a bad idea in my opinion and can lead to all kinds of undefined behaviors and breaking. The internal class has no guarantees to its interface.

@ronag
Copy link
Member Author

ronag commented Mar 31, 2024

The goal is to leak the internal class, so it could be used as key in maps etc.

I don't see how this PR would change it. You can still use the passed object as a key.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

I missed that

@mcollina mcollina merged commit 2d5cbdf into main Apr 1, 2024
26 of 27 checks passed
mcollina added a commit that referenced this pull request Apr 2, 2024
mcollina added a commit that referenced this pull request Apr 2, 2024
bloopy-boi bot added a commit to h3mmy/bloopyboi that referenced this pull request Apr 4, 2024
… v1.9.3 ) (#231)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[actions/create-github-app-token](https://togithub.com/actions/create-github-app-token)
| action | patch | `v1.9.2` -> `v1.9.3` |

---

### Release Notes

<details>
<summary>actions/create-github-app-token
(actions/create-github-app-token)</summary>

###
[`v1.9.3`](https://togithub.com/actions/create-github-app-token/releases/tag/v1.9.3)

[Compare
Source](https://togithub.com/actions/create-github-app-token/compare/v1.9.2...v1.9.3)

##### Bug Fixes

- **deps:** bump undici from 6.10.2 to 6.11.1
([#&#8203;125](https://togithub.com/actions/create-github-app-token/issues/125))
([3c223c7](https://togithub.com/actions/create-github-app-token/commit/3c223c7336e276235eb843dd4e6ad42147199cbf)),
closes
[#&#8203;3024](https://togithub.com/actions/create-github-app-token/issues/3024)
[nodejs/undici#3044](https://togithub.com/nodejs/undici/issues/3044)
[#&#8203;3023](https://togithub.com/actions/create-github-app-token/issues/3023)
[nodejs/undici#3025](https://togithub.com/nodejs/undici/issues/3025)
[nodejs/undici#3024](https://togithub.com/nodejs/undici/issues/3024)
[nodejs/undici#3034](https://togithub.com/nodejs/undici/issues/3034)
[nodejs/undici#3038](https://togithub.com/nodejs/undici/issues/3038)
[nodejs/undici#2947](https://togithub.com/nodejs/undici/issues/2947)
[nodejs/undici#3040](https://togithub.com/nodejs/undici/issues/3040)
[nodejs/undici#3036](https://togithub.com/nodejs/undici/issues/3036)
[nodejs/undici#3041](https://togithub.com/nodejs/undici/issues/3041)
[#&#8203;3024](https://togithub.com/actions/create-github-app-token/issues/3024)
[#&#8203;3041](https://togithub.com/actions/create-github-app-token/issues/3041)
[#&#8203;3036](https://togithub.com/actions/create-github-app-token/issues/3036)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNzkuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI3OS4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2IiwibGFiZWxzIjpbInJlbm92YXRlL2dpdGh1Yi1hY3Rpb24iLCJyZW5vdmF0ZS9naXRodWItcmVsZWFzZSIsInR5cGUvcGF0Y2giXX0=-->

Co-authored-by: bloopy-boi[bot] <98279278+bloopy-boi[bot]@users.noreply.github.com>
@Uzlopak Uzlopak deleted the hide-internals branch April 7, 2024 05:47
github-merge-queue bot pushed a commit to 4m-mazi/gh-test that referenced this pull request May 11, 2024
…o v1.10.0 (#728)

This PR contains the following updates:

| Package | Type | Update | Change | OpenSSF |
|---|---|---|---|---|
|
[actions/create-github-app-token](https://togithub.com/actions/create-github-app-token)
| action | minor | `v1.9.0` -> `v1.10.0` | [![OpenSSF
Scorecard](https://api.securityscorecards.dev/projects/github.com/actions/create-github-app-token/badge)](https://securityscorecards.dev/viewer/?uri=github.com/actions/create-github-app-token)
|

---

### Release Notes

<details>
<summary>actions/create-github-app-token
(actions/create-github-app-token)</summary>

###
[`v1.10.0`](https://togithub.com/actions/create-github-app-token/releases/tag/v1.10.0)

[Compare
Source](https://togithub.com/actions/create-github-app-token/compare/v1.9.3...v1.10.0)

##### Features

- **`private-key`:** escaped newlines will be replaced
([#&#8203;132](https://togithub.com/actions/create-github-app-token/issues/132))
([9d23fb9](https://togithub.com/actions/create-github-app-token/commit/9d23fb93dd620572046d85c7c1032b488c12514f))

###
[`v1.9.3`](https://togithub.com/actions/create-github-app-token/releases/tag/v1.9.3)

[Compare
Source](https://togithub.com/actions/create-github-app-token/compare/v1.9.2...v1.9.3)

##### Bug Fixes

- **deps:** bump undici from 6.10.2 to 6.11.1
([#&#8203;125](https://togithub.com/actions/create-github-app-token/issues/125))
([3c223c7](https://togithub.com/actions/create-github-app-token/commit/3c223c7336e276235eb843dd4e6ad42147199cbf)),
closes
[#&#8203;3024](https://togithub.com/actions/create-github-app-token/issues/3024)
[nodejs/undici#3044](https://togithub.com/nodejs/undici/issues/3044)
[#&#8203;3023](https://togithub.com/actions/create-github-app-token/issues/3023)
[nodejs/undici#3025](https://togithub.com/nodejs/undici/issues/3025)
[nodejs/undici#3024](https://togithub.com/nodejs/undici/issues/3024)
[nodejs/undici#3034](https://togithub.com/nodejs/undici/issues/3034)
[nodejs/undici#3038](https://togithub.com/nodejs/undici/issues/3038)
[nodejs/undici#2947](https://togithub.com/nodejs/undici/issues/2947)
[nodejs/undici#3040](https://togithub.com/nodejs/undici/issues/3040)
[nodejs/undici#3036](https://togithub.com/nodejs/undici/issues/3036)
[nodejs/undici#3041](https://togithub.com/nodejs/undici/issues/3041)
[#&#8203;3024](https://togithub.com/actions/create-github-app-token/issues/3024)
[#&#8203;3041](https://togithub.com/actions/create-github-app-token/issues/3041)
[#&#8203;3036](https://togithub.com/actions/create-github-app-token/issues/3036)

###
[`v1.9.2`](https://togithub.com/actions/create-github-app-token/releases/tag/v1.9.2)

[Compare
Source](https://togithub.com/actions/create-github-app-token/compare/v1.9.1...v1.9.2)

##### Bug Fixes

- **deps:** bump the production-dependencies group with 1 update
([#&#8203;123](https://togithub.com/actions/create-github-app-token/issues/123))
([beea7b8](https://togithub.com/actions/create-github-app-token/commit/beea7b860ac0b14ca14258aca701da842aa65e30)),
closes
[nodejs/undici#2978](https://togithub.com/nodejs/undici/issues/2978)
[nodejs/undici#2971](https://togithub.com/nodejs/undici/issues/2971)
[nodejs/undici#2980](https://togithub.com/nodejs/undici/issues/2980)
[#&#8203;2982](https://togithub.com/actions/create-github-app-token/issues/2982)
[nodejs/undici#2983](https://togithub.com/nodejs/undici/issues/2983)
[nodejs/undici#2987](https://togithub.com/nodejs/undici/issues/2987)
[nodejs/undici#2991](https://togithub.com/nodejs/undici/issues/2991)
[#&#8203;2986](https://togithub.com/actions/create-github-app-token/issues/2986)
[nodejs/undici#2992](https://togithub.com/nodejs/undici/issues/2992)
[nodejs/undici#2985](https://togithub.com/nodejs/undici/issues/2985)
[nodejs/undici#2993](https://togithub.com/nodejs/undici/issues/2993)
[nodejs/undici#2995](https://togithub.com/nodejs/undici/issues/2995)
[nodejs/undici#2998](https://togithub.com/nodejs/undici/issues/2998)
[#&#8203;2863](https://togithub.com/actions/create-github-app-token/issues/2863)
[nodejs/undici#2999](https://togithub.com/nodejs/undici/issues/2999)
[nodejs/undici#3001](https://togithub.com/nodejs/undici/issues/3001)
[nodejs/undici#2971](https://togithub.com/nodejs/undici/issues/2971)
[nodejs/undici#2980](https://togithub.com/nodejs/undici/issues/2980)
[nodejs/undici#2983](https://togithub.com/nodejs/undici/issues/2983)
[nodejs/undici#2987](https://togithub.com/nodejs/undici/issues/2987)
[nodejs/undici#2991](https://togithub.com/nodejs/undici/issues/2991)
[nodejs/undici#2985](https://togithub.com/nodejs/undici/issues/2985)
[nodejs/undici#2995](https://togithub.com/nodejs/undici/issues/2995)
[nodejs/undici#2960](https://togithub.com/nodejs/undici/issues/2960)
[nodejs/undici#2959](https://togithub.com/nodejs/undici/issues/2959)
[nodejs/undici#2969](https://togithub.com/nodejs/undici/issues/2969)
[nodejs/undici#2962](https://togithub.com/nodejs/undici/issues/2962)
[nodejs/undici#2974](https://togithub.com/nodejs/undici/issues/2974)
[nodejs/undici#2967](https://togithub.com/nodejs/undici/issues/2967)
[nodejs/undici#2966](https://togithub.com/nodejs/undici/issues/2966)
[nodejs/undici#2969](https://togithub.com/nodejs/undici/issues/2969)
[nodejs/undici#2962](https://togithub.com/nodejs/undici/issues/2962)
[nodejs/undici#2826](https://togithub.com/nodejs/undici/issues/2826)
[nodejs/undici#2952](https://togithub.com/nodejs/undici/issues/2952)
[#&#8203;3001](https://togithub.com/actions/create-github-app-token/issues/3001)
[#&#8203;2863](https://togithub.com/actions/create-github-app-token/issues/2863)
[#&#8203;2999](https://togithub.com/actions/create-github-app-token/issues/2999)
[#&#8203;2998](https://togithub.com/actions/create-github-app-token/issues/2998)
[#&#8203;2993](https://togithub.com/actions/create-github-app-token/issues/2993)
[#&#8203;2986](https://togithub.com/actions/create-github-app-token/issues/2986)
[#&#8203;2992](https://togithub.com/actions/create-github-app-token/issues/2992)
[#&#8203;2991](https://togithub.com/actions/create-github-app-token/issues/2991)
[#&#8203;2987](https://togithub.com/actions/create-github-app-token/issues/2987)

###
[`v1.9.1`](https://togithub.com/actions/create-github-app-token/releases/tag/v1.9.1)

[Compare
Source](https://togithub.com/actions/create-github-app-token/compare/v1.9.0...v1.9.1)

##### Bug Fixes

- clarify `owner` input description
([#&#8203;118](https://togithub.com/actions/create-github-app-token/issues/118))
([d9bc169](https://togithub.com/actions/create-github-app-token/commit/d9bc16919cdbdb07543eb732aa872437384e296f))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJzZW12ZXI6bm9uZSJdfQ==-->

Co-authored-by: mazi-renovate[bot] <161091290+mazi-renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-major Features or fixes that will be included in the next semver major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants