yeknal 1.1.2 → 1.1.3
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.
- package/bin/yeknal.js +14 -0
- package/package.json +1 -1
package/bin/yeknal.js
CHANGED
|
@@ -1757,6 +1757,20 @@ async function runSecurityCommand() {
|
|
|
1757
1757
|
fs.writeFileSync(logPath, logContent);
|
|
1758
1758
|
console.log(`\n Full report: ${logPath}\n`);
|
|
1759
1759
|
|
|
1760
|
+
// Ensure yeknal-security.log is in .gitignore so it never gets pushed
|
|
1761
|
+
const gitignorePath = path.join(projectDir, ".gitignore");
|
|
1762
|
+
const logEntry = "yeknal-security.log";
|
|
1763
|
+
if (fs.existsSync(gitignorePath)) {
|
|
1764
|
+
const content = fs.readFileSync(gitignorePath, "utf8");
|
|
1765
|
+
if (!content.split("\n").some((line) => line.trim() === logEntry)) {
|
|
1766
|
+
fs.appendFileSync(gitignorePath, `\n${logEntry}\n`);
|
|
1767
|
+
console.log(" Added yeknal-security.log to .gitignore");
|
|
1768
|
+
}
|
|
1769
|
+
} else {
|
|
1770
|
+
fs.writeFileSync(gitignorePath, `# Security scan logs\n${logEntry}\n`);
|
|
1771
|
+
console.log(" Created .gitignore with yeknal-security.log");
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1760
1774
|
// Exit with error code if critical issues found
|
|
1761
1775
|
if (results.totalIssues > 0) {
|
|
1762
1776
|
process.exitCode = 1;
|