api-key-guard 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/keyFixer.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "api-key-guard",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "A comprehensive tool to detect, prevent, and manage API key leaks in your codebase with AI-powered README generation",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/keyFixer.js CHANGED
@@ -119,8 +119,8 @@ async function scanForFixableKeys(scanPath, specificFile) {
119
119
  } else if (patternConfig.language === 'json') {
120
120
  const [fullMatch, keyName, keyValue] = match;
121
121
  envVarName = patternConfig.envVarNamer(keyName);
122
- // For JSON, we might suggest moving to a config loader
123
- fixedLine = `"${keyName}": "${process.env.${envVarName} || 'YOUR_${envVarName}_HERE'}"`;
122
+ // For JSON, we suggest using a placeholder comment
123
+ fixedLine = `"${keyName}": "ENV_${envVarName}_PLACEHOLDER"`;
124
124
  }
125
125
 
126
126
  // Only include keys that look like real API keys