Files
claude-hub/test/test-secrets.js
Jonathan Flatt de2c25977c test: Fix failing unit tests by improving mock configuration
- Fixed githubController.test.js by adding proper secureCredentials mock
- Fixed githubService.test.js by adding logger and secureCredentials mocks
- Applied code formatting with Prettier across all files
- All tests now pass successfully

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-21 23:03:07 -05:00

24 lines
765 B
JavaScript

// This file is for testing credential detection
// It contains intentional fake secrets that should be caught
const config = {
// These should be detected by the scanner
awsKey: 'EXAMPLE_KEY_ID',
awsSecret: 'EXAMPLE_SECRET_KEY',
githubToken: 'github_token_example_1234567890',
npmToken: 'npm_abcdefghijklmnopqrstuvwxyz0123456789',
// This should be allowed with pragma comment
apiKey: 'not-a-real-key-123456', // pragma: allowlist secret
// These are not secrets
normalString: 'hello world',
publicKey: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC...',
version: '1.0.0'
};
// This should trigger entropy detection but we're not using it
// const highEntropyString = 'a7b9c3d5e7f9g1h3j5k7l9m1n3p5q7r9s1t3v5w7x9y1z3';
module.exports = config;