diff --git a/docs/_data/rules.js b/docs/_data/rules.js index 148d7e34f..b9eaede57 100644 --- a/docs/_data/rules.js +++ b/docs/_data/rules.js @@ -6,7 +6,7 @@ const yaml = require("js-yaml"); const cweList = require("./cweList.json"); const gitly = require("gitly"); const source = "bearer/bearer-rules"; -const rulesPath = "_tmp/rules-data/rules"; +const rulesPath = "_tmp/rules-data"; const excludeDirectories = [".github", "scripts"]; let counts = { @@ -78,7 +78,7 @@ async function fetchData(location) { const dirs = await readdir(location); // ex: looping through rules [ruby, gitleaks, sql] dirs.forEach(async (dir) => { - const dirPath = path.join(rulesPath, dir); + const dirPath = path.join(location, dir); if (isDirectory(dirPath) && !excludeDirectories.includes(dir)) { const subDirs = await readdir(dirPath); updateCounts(dir); @@ -143,5 +143,5 @@ async function fetchFile(location, breadcrumb) { module.exports = async function () { await fetchRelease(); - return await fetchData(rulesPath); + return await fetchData(path.join(rulesPath, "rules")); };