Repository navigation
fix(deps): resolve trivy high-severity vulnerabilities #2616
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
Changes from 4 commits
e220b31
465c9b7
5602aec
1b60987
599ce9a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,6 +33,9 @@ | |
| "overrides": { | ||
| "semver": "^7.5.4", | ||
| "multer": "^2.0.2", | ||
| "mochawesome": { | ||
| "mocha": "^11.8.0" | ||
| }, | ||
| "tough-cookie": "^4.1.3", | ||
| "@node-saml/node-saml": "^5.1.0", | ||
| "@loopback/cli": { | ||
|
|
@@ -50,20 +53,32 @@ | |
| "yargs": "^17.4.1", | ||
| "form-data": "4.0.4" | ||
| }, | ||
| "httpsnippet": { | ||
| "form-data": "4.0.4" | ||
| }, | ||
| "form-data": "4.0.6", | ||
| "oidc-provider": { | ||
| "@koa/cors": "^5.0.0" | ||
| }, | ||
| "read-package-json": { | ||
| "glob": "^10.5.0" | ||
| }, | ||
| "js-yaml": "^4.3.2", | ||
| "tmp": "^0.2.7", | ||
| "yeoman-environment": "^6.0.1", | ||
|
Contributor
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. This override also forces v6 onto The same happens for
"yeoman-environment": "^6.0.1",Without it npm nests v6 under the CLI, and |
||
| "yeoman-generator": { | ||
| "pacote": "^21.5.1", | ||
| "sigstore": "^4.1.1" | ||
| }, | ||
| "lerna": { | ||
| "pacote": "^21.5.1" | ||
| }, | ||
| "fast-xml-parser": "^5.5.6", | ||
| "lodash": "^4.18.0", | ||
| "undici": "^6.24.0", | ||
| "axios": "^1.15.2", | ||
| "tar": "^7.5.22" | ||
| "tar": "^7.5.22", | ||
| "minimatch@10": { | ||
| "brace-expansion": "^5.0.12" | ||
| }, | ||
| "underscore": "^1.13.8" | ||
| }, | ||
| "dependencies": { | ||
| "@lavamoat/allow-scripts": "^3.4.1", | ||
|
|
@@ -94,4 +109,4 @@ | |
| "sqlite3": true | ||
| } | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| { | ||
| "require": "ts-node/register", | ||
| "require": ["ts-node/register", "yeoman-environment"], | ||
| "spec": ["src/__tests__/**/*.ts"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,7 +55,7 @@ | |
| "tar": "^7.5.22", | ||
| "ts-morph": "^27.0.2", | ||
| "tslib": "^2.8.1", | ||
| "yeoman-environment": "^3.19.3", | ||
| "yeoman-environment": "^6.0.1", | ||
|
Contributor
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. Since "engines": {
"node": "^22.12.0 || 24"
},CI uses the latest 22.x, so it won't show this. |
||
| "yeoman-generator": "^5.10.0", | ||
| "yosay": "^2.0.2", | ||
| "zod": "^4.4.3" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,24 @@ | ||
| import {Answers} from 'yeoman-environment'; | ||
| // eslint-disable-next-line @typescript-eslint/naming-convention | ||
| import TerminalAdapter from 'yeoman-environment/lib/adapter'; | ||
| import type Environment from 'yeoman-environment'; | ||
| import {AnyObject} from '../types'; | ||
|
|
||
| export class McpAdapter extends TerminalAdapter { | ||
| async prompt<T extends Answers>( | ||
| questions: TerminalAdapter.Questions<T>, | ||
| answers?: T, | ||
| cb?: (answers: T) => void | Promise<void>, | ||
| ) { | ||
| this.console.error(JSON.stringify(questions, undefined, 2)); | ||
| throw new Error( | ||
| `The generator is expecting an input from prompt, please check the inputs`, | ||
| // In MCP / non-interactive mode a generator must never block waiting for stdin. | ||
| // yeoman-environment 6 moved TerminalAdapter into the ESM-only @yeoman/adapter | ||
| // package (not require()-able from this CommonJS CLI), so instead of subclassing | ||
| // the adapter we override prompt on the environment's own adapter. | ||
| export class McpAdapter { | ||
| install(env: Environment): void { | ||
| env.adapter.prompt = this.prompt as typeof env.adapter.prompt; | ||
| } | ||
|
|
||
| prompt(questions: AnyObject): Promise<never> { | ||
| // sonarignore:start | ||
| console.error(JSON.stringify(questions, undefined, 2)); | ||
| // sonarignore:end | ||
| return Promise.reject( | ||
| new Error( | ||
| `The generator is expecting an input from prompt, please check the inputs`, | ||
| ), | ||
| ); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,8 @@ | ||
| import {Resource, detectResourcesSync} from '@opentelemetry/resources'; | ||
| import { | ||
| Resource, | ||
| detectResources, | ||
| resourceFromAttributes, | ||
| } from '@opentelemetry/resources'; | ||
| import { | ||
| AlwaysOffSampler, | ||
| AlwaysOnSampler, | ||
|
|
@@ -57,7 +61,7 @@ function buildResource(config: ResolvedObservabilityConfig): Resource { | |
| attributes[ATTR_DEPLOYMENT_ENVIRONMENT_NAME] = config.environment; | ||
| } | ||
|
|
||
| return detectResourcesSync().merge(new Resource(attributes)); | ||
| return detectResources().merge(resourceFromAttributes(attributes)); | ||
|
Contributor
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. OTel 2 changed this quietly. In 1.x the tracer provider merged the default resource into whatever you passed in. In 2.x import {
Resource,
defaultResource,
detectResources,
resourceFromAttributes,
} from '@opentelemetry/resources'; return defaultResource()
.merge(detectResources())
.merge(resourceFromAttributes(attributes));I checked that this brings the three attributes back on 2.11. A test that reads |
||
| } | ||
|
|
||
| function buildGrpcMetadata(headers: Record<string, string>) { | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
This one is new and unscoped, so it also forces v4 onto
@oclif/core(v1 and v2 both ask for js-yaml^3.14.1), and their table output callsyaml.safeDump, which v4 removed. Scoping it to the copies that were actually flagged keeps the fix without touching oclif: