fix(deps): resolve production high and critical vulnerabilities
Pin vulnerable transitive dependencies to patched releases and replace Infisical SDK bootstrap calls with a compatible HTTP client. Add dependency-security and secret-loading regression coverage.
This commit is contained in:
1 parent
5bc748dc4d
commit
9117c9c0a4
7 files changed
+685
-88
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { InfisicalSDK } from '@infisical/sdk';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { loadInfisicalSecrets } from './infisical-client';
|
||||
|
||||
type SecretMap = Record<string, string | undefined>;
|
||||
type SecretSource = 'env' | 'infisical';
|
||||
@@ -71,23 +71,14 @@ export class SecretService {
|
||||
|
||||
private async fetchInfisicalSecrets(): Promise<void> {
|
||||
const bootstrapConfig = await this.resolveInfisicalBootstrapConfig();
|
||||
const infisicalClient = new InfisicalSDK({
|
||||
siteUrl: bootstrapConfig.siteUrl,
|
||||
});
|
||||
|
||||
await infisicalClient.auth().universalAuth.login({
|
||||
clientId: bootstrapConfig.clientId,
|
||||
clientSecret: bootstrapConfig.clientSecret,
|
||||
});
|
||||
|
||||
const res = await infisicalClient.secrets().listSecrets({
|
||||
const res = await loadInfisicalSecrets({
|
||||
...bootstrapConfig,
|
||||
environment:
|
||||
process.env.NODE_ENV === 'prod'
|
||||
? 'prod'
|
||||
: process.env.NODE_ENV === 'staging'
|
||||
? 'staging'
|
||||
: 'dev',
|
||||
projectId: bootstrapConfig.projectId,
|
||||
});
|
||||
|
||||
// 임시 객체에 채운 뒤 한 번에 교체(일관성 보장)
|
||||
|
||||
Reference in new issue
Block a user