codeowners-audit
Advanced tools
+16
-2
| { | ||
| "name": "codeowners-audit", | ||
| "version": "2.5.0", | ||
| "version": "2.6.0", | ||
| "description": "Generate an HTML report for CODEOWNERS ownership gaps and run in CI or from the CLI to fail when files are not covered.", | ||
@@ -32,3 +32,17 @@ "type": "module", | ||
| }, | ||
| "homepage": "https://github.com/watson/codeowners-audit#readme" | ||
| "homepage": "https://github.com/watson/codeowners-audit#readme", | ||
| "publishConfig": { | ||
| "access": "public", | ||
| "provenance": true | ||
| }, | ||
| "devDependencies": { | ||
| "@commitlint/cli": "^20.4.3", | ||
| "@commitlint/config-conventional": "^20.4.3", | ||
| "@semantic-release/commit-analyzer": "^13.0.1", | ||
| "@semantic-release/git": "^10.0.1", | ||
| "@semantic-release/github": "^12.0.6", | ||
| "@semantic-release/npm": "^13.1.5", | ||
| "@semantic-release/release-notes-generator": "^14.1.0", | ||
| "semantic-release": "^25.0.3" | ||
| } | ||
| } |
+30
-1
@@ -1012,3 +1012,3 @@ #!/usr/bin/env node | ||
| for (const warning of missingPathWarnings) { | ||
| console.error('- %s', colorizeCliText(warning.pattern, [ANSI_YELLOW], colorStderr)) | ||
| console.error('%s', formatMissingPathWarningForCli(warning, colorStderr)) | ||
| } | ||
@@ -1269,2 +1269,31 @@ console.error('') | ||
| /** | ||
| * Format a missing CODEOWNERS path warning for CLI output. | ||
| * @param {{ | ||
| * codeownersPath: string, | ||
| * pattern: string, | ||
| * owners: string[] | ||
| * }} warning | ||
| * @param {boolean} useColor | ||
| * @returns {string} | ||
| */ | ||
| function formatMissingPathWarningForCli (warning, useColor) { | ||
| const bullet = colorizeCliText('- ', [ANSI_DIM], useColor) | ||
| const warningPath = colorizeCliText(warning.pattern, [ANSI_YELLOW], useColor) | ||
| const ownerLabel = colorizeCliText(' owners: ', [ANSI_DIM], useColor) | ||
| const ownerList = formatCodeownersOwnersList(warning.owners) | ||
| const ownerText = colorizeCliText(ownerList, [ANSI_CYAN], useColor) | ||
| return bullet + warningPath + ownerLabel + ownerText | ||
| } | ||
| /** | ||
| * Format a CODEOWNERS owner list for human-readable output. | ||
| * @param {string[]|undefined} owners | ||
| * @returns {string} | ||
| */ | ||
| function formatCodeownersOwnersList (owners) { | ||
| if (!Array.isArray(owners) || owners.length === 0) return '(none)' | ||
| return owners.join(', ') | ||
| } | ||
| /** | ||
| * Determine if a path points to any CODEOWNERS file. | ||
@@ -1271,0 +1300,0 @@ * @param {string} filePath |
+16
-0
@@ -250,2 +250,6 @@ <!doctype html> | ||
| } | ||
| .warning-owners { | ||
| color: #67e8f9; | ||
| font-weight: 600; | ||
| } | ||
| .warning-text { | ||
@@ -622,2 +626,14 @@ color: var(--muted); | ||
| const ownerLabelSpan = document.createElement('span') | ||
| ownerLabelSpan.className = 'warning-text' | ||
| ownerLabelSpan.textContent = ' owners: ' | ||
| item.appendChild(ownerLabelSpan) | ||
| const ownersSpan = document.createElement('span') | ||
| ownersSpan.className = 'warning-owners' | ||
| ownersSpan.textContent = Array.isArray(warning.owners) && warning.owners.length > 0 | ||
| ? warning.owners.join(', ') | ||
| : '(none)' | ||
| item.appendChild(ownersSpan) | ||
| list.appendChild(item) | ||
@@ -624,0 +640,0 @@ } |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 6 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 6 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
145124
1.39%2855
0.95%8
Infinity%