Repository navigation
fix: replace hardcoded secret literals in test fixtures with approved placeholders - #382
Conversation
… placeholders Replace Snyk-flagged dummy values in unit-test fixtures with the approved placeholders: apiKey/api_key -> API_KEY, access_token -> ACCESS_TOKEN, auth_token/accessToken -> TOKEN, encryptionKey -> KEY, password -> PASSWORD. Coupled assertions and inputs updated; STACK_API_KEY keeps clone source/target and seed stack selection distinguishable. Test-only change, plus refreshed pnpm-lock.yaml. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
Summary
Snyk Code flagged hardcoded values in unit-test fixtures ("Hardcoded Non-Cryptographic Secret" and "Use of Hardcoded Passwords"). All of them were dummy test values, not real credentials. This replaces them with the approved placeholders from the team's "Standard Approved Dummy Secrets" doc.
Snyk Code on
developmentbefore: 184 findings (166 secret, 18 password).After this change: 0 for both rules (1 unrelated Medium Path Traversal remains, tracked separately).
Changes (test files only, no source changes)
API_KEYACCESS_TOKENTOKENKEYPASSWORDSTACK_API_KEYis used for the second.pnpm-lock.yamlrefreshed.Testing
Ran each package's test suite before and after the change. Results are identical in all 13 packages (e.g. import 1740, bulk-operations 857, asset-management 278, export 513, seed 121, content-type 78).
Snyk Code (
snyk test --code --all-projects) confirms the findings are gone.Notes
apiKey: 'API_KEY'as a low-severity pattern on these lines.packages/contentstack-asset-management/src/query-export/cs-assets-query-exporter.ts(separate PR).🤖 Generated with Claude Code