GeezerVison is showing github.com — fix: replace hardcoded secret literals in test fixtures with approved… · contentstack/cli-plugins@f5497a7
File treeExpand file treeCollapse file tree Open diff view settings contentstack-asset-management/test/unit contentstack-bootstrap/test contentstack-bulk-operations/test/unit contentstack-content-type/test contentstack-export-to-csv/test/unit contentstack-export/test/unit contentstack-import-setup/test/unit contentstack-import/test/unit contentstack-migrate-rte/test contentstack-query-export/test/unit contentstack-variants/test/unit/export
Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/contentstack-asset-management/test/unit/import/asset-types.test.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -14,7 +14,7 @@ describe('ImportAssetTypes', () => { | 14 | 14 | const importContext: ImportContext = { | 15 | 15 | spacesRootPath: '/tmp/import/spaces', | 16 | 16 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 17 | | - apiKey: 'api-key-1', | | 17 | + apiKey: 'API_KEY', | 18 | 18 | host: 'https://api.contentstack.io/v3', | 19 | 19 | org_uid: 'org-1', | 20 | 20 | }; | |
Collapse file Copy file name to clipboardExpand all lines: packages/contentstack-asset-management/test/unit/import/assets.test.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -17,7 +17,7 @@ describe('ImportAssets', () => { | 17 | 17 | const importContext: ImportContext = { | 18 | 18 | spacesRootPath: '/tmp/import/spaces', | 19 | 19 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 20 | | - apiKey: 'api-key-1', | | 20 | + apiKey: 'API_KEY', | 21 | 21 | host: 'https://api.contentstack.io/v3', | 22 | 22 | org_uid: 'org-1', | 23 | 23 | }; | |
Collapse file Copy file name to clipboardExpand all lines: packages/contentstack-asset-management/test/unit/import/base.test.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -29,7 +29,7 @@ describe('CSAssetsImportAdapter (base)', () => { | 29 | 29 | const importContext: ImportContext = { | 30 | 30 | spacesRootPath: '/tmp/import/spaces', | 31 | 31 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 32 | | - apiKey: 'api-key-1', | | 32 | + apiKey: 'API_KEY', | 33 | 33 | host: 'https://api.contentstack.io/v3', | 34 | 34 | org_uid: 'org-1', | 35 | 35 | }; | |
Collapse file Copy file name to clipboardExpand all lines: packages/contentstack-asset-management/test/unit/import/fields.test.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -14,7 +14,7 @@ describe('ImportFields', () => { | 14 | 14 | const importContext: ImportContext = { | 15 | 15 | spacesRootPath: '/tmp/import/spaces', | 16 | 16 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 17 | | - apiKey: 'api-key-1', | | 17 | + apiKey: 'API_KEY', | 18 | 18 | host: 'https://api.contentstack.io/v3', | 19 | 19 | org_uid: 'org-1', | 20 | 20 | }; | |
Collapse file Copy file name to clipboardExpand all lines: packages/contentstack-asset-management/test/unit/import/spaces.test.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -18,7 +18,7 @@ describe('ImportSpaces', () => { | 18 | 18 | csAssetsUrl: 'https://am.example.com', | 19 | 19 | org_uid: 'org-1', | 20 | 20 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 21 | | - apiKey: 'api-key-1', | | 21 | + apiKey: 'API_KEY', | 22 | 22 | host: 'https://api.contentstack.io/v3', | 23 | 23 | }; | 24 | 24 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/contentstack-asset-management/test/unit/import/workspaces.test.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -16,7 +16,7 @@ describe('ImportWorkspace', () => { | 16 | 16 | const importContext: ImportContext = { | 17 | 17 | spacesRootPath: '/tmp/import/spaces', | 18 | 18 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 19 | | - apiKey: 'api-key-1', | | 19 | + apiKey: 'API_KEY', | 20 | 20 | host: 'https://api.contentstack.io/v3', | 21 | 21 | org_uid: 'org-1', | 22 | 22 | }; | |
Collapse file Copy file name to clipboardExpand all lines: packages/contentstack-asset-management/test/unit/utils/detect-asset-management-export.test.ts +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -52,7 +52,7 @@ describe('detectAssetManagementExportFromContentDir', () => { | 52 | 52 | fs.writeFileSync( | 53 | 53 | path.join(tmpRoot, 'branches.json'), | 54 | 54 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 55 | | - JSON.stringify([{ stackHeaders: { api_key: 'source-stack-key' } }]), | | 55 | + JSON.stringify([{ stackHeaders: { api_key: 'API_KEY' } }]), | 56 | 56 | ); | 57 | 57 |
| 58 | 58 | stub(utilities.configHandler, 'get').withArgs('region').returns({ | @@ -62,6 +62,6 @@ describe('detectAssetManagementExportFromContentDir', () => { | 62 | 62 | const flags = detectAssetManagementExportFromContentDir(tmpRoot); | 63 | 63 | expect(flags.assetManagementEnabled).to.equal(true); | 64 | 64 | expect(flags.assetManagementUrl).to.equal('https://am.example.com'); | 65 | | - expect(flags.source_stack).to.equal('source-stack-key'); | | 65 | + expect(flags.source_stack).to.equal('API_KEY'); | 66 | 66 | }); | 67 | 67 | }); |
Collapse file Copy file name to clipboardExpand all lines: packages/contentstack-bootstrap/test/bootstrap-integration.test.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -83,7 +83,7 @@ describe('Bootstrap Integration Tests', () => { | 83 | 83 | cloneDirectory: '/test/path', | 84 | 84 | seedParams: { | 85 | 85 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 86 | | - stackAPIKey: 'test-key', | | 86 | + stackAPIKey: 'API_KEY', | 87 | 87 | managementTokenAlias: 'test-alias', | 88 | 88 | managementToken: 'test-token', | 89 | 89 | }, | @@ -119,7 +119,7 @@ describe('Bootstrap Integration Tests', () => { | 119 | 119 | // Verify that SeedParams interface includes the new properties | 120 | 120 | const mockSeedParams = { | 121 | 121 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 122 | | - stackAPIKey: 'test-key', | | 122 | + stackAPIKey: 'API_KEY', | 123 | 123 | org: 'test-org', | 124 | 124 | stackName: 'test-stack', | 125 | 125 | yes: 'yes', | |
Collapse file Copy file name to clipboardExpand all lines: packages/contentstack-bulk-operations/test/unit/base-bulk-command.test.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -720,7 +720,7 @@ describe('BaseBulkCommand', () => { | 720 | 720 | publishMode: 'bulk', | 721 | 721 | apiKey: undefined, | 722 | 722 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 723 | | - stackApiKey: 'fallback-key', | | 723 | + stackApiKey: 'API_KEY', | 724 | 724 | branch: 'main', | 725 | 725 | bulkOperationFolder: './bulk-operation', | 726 | 726 | }; | |
Collapse file Copy file name to clipboardExpand all lines: packages/contentstack-bulk-operations/test/unit/utils/bulk-operation-log-handler.test.ts +12-12Lines changed: 12 additions & 12 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -198,7 +198,7 @@ describe('Bulk Operation Log Handler', () => { | 198 | 198 | items: [{ uid: 'entry1' }], | 199 | 199 | status: 'success', | 200 | 200 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 201 | | - apiKey: 'test-key', | | 201 | + apiKey: 'API_KEY', | 202 | 202 | branch: 'main', | 203 | 203 | }, | 204 | 204 | ]; | @@ -256,7 +256,7 @@ describe('Bulk Operation Log Handler', () => { | 256 | 256 | status: 'failed', | 257 | 257 | error: 'Network error', | 258 | 258 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 259 | | - apiKey: 'test-key', | | 259 | + apiKey: 'API_KEY', | 260 | 260 | branch: 'main', | 261 | 261 | }, | 262 | 262 | ]; | @@ -354,7 +354,7 @@ describe('Bulk Operation Log Handler', () => { | 354 | 354 | environments: ['prod'], | 355 | 355 | status: 'success', | 356 | 356 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 357 | | - apiKey: 'test-key', | | 357 | + apiKey: 'API_KEY', | 358 | 358 | branch: 'main', | 359 | 359 | }, | 360 | 360 | ]; | @@ -404,7 +404,7 @@ describe('Bulk Operation Log Handler', () => { | 404 | 404 | status: 'failed', | 405 | 405 | error: 'Network error', | 406 | 406 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 407 | | - apiKey: 'test-key', | | 407 | + apiKey: 'API_KEY', | 408 | 408 | branch: 'main', | 409 | 409 | }, | 410 | 410 | ]; | @@ -447,7 +447,7 @@ describe('Bulk Operation Log Handler', () => { | 447 | 447 | items: [{ uid: 'entry1', type: 'entry', locale: 'en-us' }], | 448 | 448 | status: 'success', | 449 | 449 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 450 | | - apiKey: 'test-key', | | 450 | + apiKey: 'API_KEY', | 451 | 451 | branch: 'main', | 452 | 452 | }; | 453 | 453 |
| @@ -473,7 +473,7 @@ describe('Bulk Operation Log Handler', () => { | 473 | 473 | items: [], | 474 | 474 | status: 'success', | 475 | 475 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 476 | | - apiKey: 'test-key', | | 476 | + apiKey: 'API_KEY', | 477 | 477 | branch: 'main', | 478 | 478 | }; | 479 | 479 |
| @@ -499,7 +499,7 @@ describe('Bulk Operation Log Handler', () => { | 499 | 499 | items: [], | 500 | 500 | status: 'success', | 501 | 501 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 502 | | - apiKey: 'test-key', | | 502 | + apiKey: 'API_KEY', | 503 | 503 | branch: 'main', | 504 | 504 | }; | 505 | 505 |
| @@ -536,7 +536,7 @@ describe('Bulk Operation Log Handler', () => { | 536 | 536 | status: 'failed', | 537 | 537 | error: 'API Error', | 538 | 538 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 539 | | - apiKey: 'test-key', | | 539 | + apiKey: 'API_KEY', | 540 | 540 | branch: 'main', | 541 | 541 | }; | 542 | 542 |
| @@ -572,7 +572,7 @@ describe('Bulk Operation Log Handler', () => { | 572 | 572 | environments: ['prod'], | 573 | 573 | status: 'success', | 574 | 574 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 575 | | - apiKey: 'test-key', | | 575 | + apiKey: 'API_KEY', | 576 | 576 | branch: 'main', | 577 | 577 | }; | 578 | 578 |
| @@ -596,7 +596,7 @@ describe('Bulk Operation Log Handler', () => { | 596 | 596 | environments: ['prod'], | 597 | 597 | status: 'success', | 598 | 598 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 599 | | - apiKey: 'test-key', | | 599 | + apiKey: 'API_KEY', | 600 | 600 | branch: 'main', | 601 | 601 | }; | 602 | 602 |
| @@ -633,7 +633,7 @@ describe('Bulk Operation Log Handler', () => { | 633 | 633 | status: 'failed', | 634 | 634 | error: 'Publish failed', | 635 | 635 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 636 | | - apiKey: 'test-key', | | 636 | + apiKey: 'API_KEY', | 637 | 637 | branch: 'main', | 638 | 638 | }; | 639 | 639 |
| @@ -656,7 +656,7 @@ describe('Bulk Operation Log Handler', () => { | 656 | 656 | environments: [], | 657 | 657 | status: 'failed', | 658 | 658 | // deepcode ignore HardcodedNonCryptoSecret: test fixture value, not a real secret | 659 | | - apiKey: 'test-key', | | 659 | + apiKey: 'API_KEY', | 660 | 660 | branch: 'main', | 661 | 661 | }; | 662 | 662 |
| |
|