ory / sdk

The place where ORY's SDKs are being auto-generated
Apache License 2.0
141 stars 85 forks source link

Update axios to latest version #289

Closed Tjerk-Haaye-Henricus closed 10 months ago

Tjerk-Haaye-Henricus commented 1 year ago

Preflight checklist

Ory Network Project

No response

Describe the bug

axios version of js client is 0.21.4 newest version is 1.5.0

Reproducing the bug

Install the client look in package json

Relevant log output

No response

Relevant configuration

No response

Version

1.1.51

On which operating system are you observing this issue?

None

In which environment are you deploying?

None

Additional Context

No response

thesocialdev commented 1 year ago

What's the status of this issue?

aeneasr commented 1 year ago

We will need to update the generator to address this

beanow-at-crabnebula commented 10 months ago

Axios 0.x now has a CVE: https://github.com/advisories/GHSA-wf5p-g6vw-rhxx Affecting the TS Ory client.

aeneasr commented 10 months ago

We just release ory/client v1.4.0 which uses the newest generator, hopefully resolving this issue!

aeneasr commented 10 months ago

It looks like the new generator still uses 0.x of Axios :/

https://github.com/ory/sdk/blob/0edad58697355b565962b6d8ebc9349fb7533a0c/clients/client/typescript/package.json#L27

aeneasr commented 10 months ago

Seems like there is work to upgrade axios, but it will take a few weeks before that's being released: https://github.com/OpenAPITools/openapi-generator/commit/a460b7ea8783dce3b86ca8e1f8212204f856ae19

beanow-at-crabnebula commented 10 months ago

Weeks? :sweat_smile: I'm not familiar with their release policy, and it looks like they rolled their own version management. How feasible would it be to run with a commit ref instead of a release?

beanow-at-crabnebula commented 9 months ago

Coming back to this one, looks like the generator update is released: https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.2.0

Typescript @ory/client is still affected though: https://github.com/ory/sdk/blob/master/clients/client/typescript/package.json#L27

https://www.npmjs.com/package/@ory/client/v/1.4.8?activeTab=code

Even though we just updated to the latest generator? https://github.com/ory/sdk/pull/315

Perhaps need to trigger a build.

aeneasr commented 9 months ago

Perhaps need to trigger a build.

Correct!

aeneasr commented 8 months ago

Release was triggered yesterday

Tjerk-Haaye-Henricus commented 8 months ago

Awesome 😎 Thanks a lot

beanow-at-crabnebula commented 8 months ago

Looking into that, it seems that hasn't resolved the axios version issue though :cry:

https://www.npmjs.com/package/@ory/client/v/1.5.1?activeTab=code https://github.com/ory/sdk/blob/ba317155622461527a6365ea4bfc0bf9b4c71111/clients/client/typescript/package.json#L27

┌─────────────────────┬────────────────────────────────────────────────────────┐
│ moderate            │ Axios Cross-Site Request Forgery Vulnerability         │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Package             │ axios                                                  │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Vulnerable versions │ >=0.8.1 <1.6.0                                         │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Patched versions    │ >=1.6.0                                                │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ Paths               │ [...] > @ory/client@1.5.1 >                            │
│                     │ axios@0.27.2                                           │
├─────────────────────┼────────────────────────────────────────────────────────┤
│ More info           │ https://github.com/advisories/GHSA-wf5p-g6vw-rhxx      │
└─────────────────────┴────────────────────────────────────────────────────────┘
1 vulnerabilities found
Severity: 1 moderate
BatuhanW commented 8 months ago

I think this issue needs to be re-opened. cc @aeneasr

aeneasr commented 8 months ago

1.5.2 is out with axios in 1.6+

aeneasr commented 8 months ago

https://www.npmjs.com/package/@ory/client/v/1.5.2?activeTab=code