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: jobs vulnerability #1799
Merged
Merged
fix: jobs vulnerability #1799
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
28abff0
fix: jobs vulnerability
TBonnin 16b93cc
cli: add missing explicit dependency (chalk)
TBonnin cb42d72
move RenderAPI to its own file
TBonnin 38fae7d
update package-lock.json
TBonnin 0b309d3
update ip package to fix CVE-2023-42282
TBonnin 6ec96a6
jobs: remove unused octokit dependencies
TBonnin 1062680
update package-lock.json
TBonnin 8e99034
update @sentry/node
TBonnin 45b93eb
update undici dependency
TBonnin d6bc6bb
update package-lock.json
TBonnin 9e4c3dc
downgrade to undici 6.6.2
TBonnin File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ | |
"ajv-errors": "^3.0.0", | ||
"axios": "^1.2.0", | ||
"byots": "^5.0.0-dev.20221103.1.34", | ||
"chalk": "^5.3.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unrelated but chalk was not declared as CLI dependency |
||
"chokidar": "^3.5.3", | ||
"commander": "^10.0.1", | ||
"conf": "12.0.0", | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import axios, { AxiosInstance, AxiosResponse } from 'axios'; | ||
|
||
export class RenderAPI { | ||
httpClient: AxiosInstance; | ||
constructor(apiKey: string) { | ||
this.httpClient = axios.create({ | ||
baseURL: 'https://api.render.com/v1', | ||
headers: { | ||
Authorization: `Bearer ${apiKey}`, | ||
Accept: 'application/json' | ||
} | ||
}); | ||
} | ||
|
||
async getServices(params: { name: string; type: string; limit: string }): Promise<AxiosResponse> { | ||
return await this.httpClient.get('/services', { params }); | ||
} | ||
|
||
async createService(data: { | ||
type: string; | ||
name: string; | ||
ownerId: string; | ||
image: { ownerId: string; imagePath: string }; | ||
serviceDetails: { env: string }; | ||
envVars: { key: string; value: string }[]; | ||
}): Promise<AxiosResponse> { | ||
return await this.httpClient.post('/services', data); | ||
} | ||
|
||
async suspendService(params: { serviceId: string }): Promise<AxiosResponse> { | ||
return await this.httpClient.post(`/services/${params.serviceId}/suspend`, {}); | ||
} | ||
|
||
async resumeService(params: { serviceId: string }): Promise<AxiosResponse> { | ||
return await this.httpClient.post(`/services/${params.serviceId}/resume`, {}); | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated, do we use this
byots
package? it seems not, or at least not imported 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good question. It is a bit out of the scope of this PR. I only happen to touch CLI package.json because it wouldn't compile without explicitly set chalk as a dependency but I am sure there is a some more cleanup to do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree of out of scope but we used
byots
in an earlier iteration of the compilation of the typescript files for the cli, but now usets-node
instead.