Skip to content

Commit 5e1ada3

Browse files
committed
fix: secret scan issue
1 parent 4e48af5 commit 5e1ada3

4 files changed

Lines changed: 9 additions & 13 deletions

File tree

packages/contentstack-export/src/export/modules/personalize.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ export default class ExportPersonalize extends BaseClass {
129129

130130
private addModuleProcesses(progress: CLIProgressManager, moduleCount: number) {
131131
if (moduleCount > 0) {
132-
// false positive - no hardcoded secret here
133-
// @ts-ignore-next-line secret-detection
132+
// talisman-ignore-start
134133
const order: (keyof typeof this.moduleDisplayMapper)[] = this.exportConfig.modules.personalize
135134
.exportOrder as (keyof typeof this.moduleDisplayMapper)[];
135+
// talisman-ignore-end
136136

137137
log.debug(`Adding ${order.length} personalize module processes: ${order.join(', ')}`, this.exportConfig.context);
138138

@@ -164,10 +164,10 @@ export default class ExportPersonalize extends BaseClass {
164164
instance.setParentProgressManager(progress);
165165
});
166166

167-
// false positive - no hardcoded secret here
168-
// @ts-ignore-next-line secret-detection
167+
// talisman-ignore-start
169168
const order: (keyof typeof this.moduleInstanceMapper)[] = this.exportConfig.modules.personalize
170169
.exportOrder as (keyof typeof this.moduleInstanceMapper)[];
170+
// talisman-ignore-end
171171

172172
log.debug(`Personalize export order: ${order.join(', ')}`, this.exportConfig.context);
173173

packages/contentstack-variants/src/export/experiences.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,20 +108,20 @@ export default class ExportExperiences extends PersonalizationAdapter<ExportConf
108108

109109
// create id mapper for experience to variants
110110
let variants = experience?._cms?.variants ?? {};
111-
// false positive - no hardcoded secret here
112-
// @ts-ignore-next-line secret-detection
111+
// talisman-ignore-start
113112
log.debug(
114113
`Found ${Object.keys(variants).length} variants for experience: ${experience.name}`,
115114
this.exportConfig.context,
116115
);
116+
// talisman-ignore-end
117117

118+
// talisman-ignore-start
118119
Object.keys(variants).forEach((variantShortId: string) => {
119-
// false positive - no hardcoded secret here
120-
// @ts-ignore-next-line secret-detection
121120
const experienceToVariantsStr = `${experience.uid}-${variantShortId}-${variants[variantShortId]}`;
122121
experienceToVariantsStrList.push(experienceToVariantsStr);
123122
log.debug(`Added variant mapping: ${experienceToVariantsStr}`, this.exportConfig.context);
124123
});
124+
// talisman-ignore-end
125125

126126
// Fetch versions of experience
127127
try {

packages/contentstack-variants/src/export/projects.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ export default class ExportProjects extends PersonalizationAdapter<ExportConfig>
4545
log.debug('Projects directory created successfully', this.exportConfig.context);
4646

4747
log.debug('Fetching projects from personalization API...', this.exportConfig.context);
48-
// false positive - no hardcoded secret here
49-
// @ts-ignore-next-line secret-detection
48+
// talisman-ignore-line
5049
this.projectsData = (await this.projects({ connectedStackApiKey: this.exportConfig.apiKey })) || [];
5150
log.debug(`Fetched ${this.projectsData?.length || 0} projects`, this.exportConfig.context);
5251
});

packages/contentstack-variants/src/utils/personalization-api-adapter.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,6 @@ export class PersonalizationAdapter<T> extends AdapterHelper<T, HttpClient> impl
154154
}
155155

156156
async projects(options: GetProjectsParams): Promise<ProjectStruct[]> {
157-
// false positive - no hardcoded secret here
158-
// @ts-ignore-next-line secret-detection
159-
log.debug(`Fetching projects for stack API key: ${options.connectedStackApiKey}`, this.exportConfig?.context);
160157
await this.init();
161158
const getProjectEndPoint = `/projects?connectedStackApiKey=${options.connectedStackApiKey}`;
162159
log.debug(`Making API call to: ${getProjectEndPoint}`, this.exportConfig?.context);

0 commit comments

Comments
 (0)