mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-05-14 08:28:39 +08:00
ci: require npm audit signature checks
Require npm registry signature verification wherever workflow npm audit checks run. - add npm audit signatures to CI Security Scan and maintenance security audit jobs - teach the workflow security validator to reject npm audit without signature verification - keep the repair and Copilot prompt tests portable across Windows path/case and CRLF frontmatter behavior Validation: - node tests/run-all.js (2376 passed, 0 failed) - CI current-head matrix green on #1846
This commit is contained in:
@@ -64,6 +64,16 @@ function runNode(scriptPath, args = [], options = {}) {
|
||||
}
|
||||
}
|
||||
|
||||
function normalizeComparablePath(filePath) {
|
||||
const normalized = path.normalize(filePath);
|
||||
return process.platform === 'win32' ? normalized.toLowerCase() : normalized;
|
||||
}
|
||||
|
||||
function pathListIncludes(paths, expectedPath) {
|
||||
const normalizedExpected = normalizeComparablePath(expectedPath);
|
||||
return paths.some(filePath => normalizeComparablePath(filePath) === normalizedExpected);
|
||||
}
|
||||
|
||||
function test(name, fn) {
|
||||
try {
|
||||
fn();
|
||||
@@ -117,7 +127,7 @@ function runTests() {
|
||||
|
||||
const parsed = JSON.parse(repairResult.stdout);
|
||||
assert.strictEqual(parsed.results[0].status, 'repaired');
|
||||
assert.ok(parsed.results[0].repairedPaths.includes(managedPath));
|
||||
assert.ok(pathListIncludes(parsed.results[0].repairedPaths, managedPath));
|
||||
assert.strictEqual(fs.readFileSync(managedPath, 'utf8'), expectedContent);
|
||||
assert.ok(fs.existsSync(statePath));
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user