You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
audit: global scans ignore pattern-rule load errors #879
Found by source inspection at f1faa4b; no repro was executed.
Current behavior
Rules() returns an error when the built-in rules or the global user audit-rules.yaml cannot be read, parsed, or compiled. An invalid regex in a user rule is one example (patterns.go#L186-L210, patterns.go#L373-L382).
ScanSkill and ScanSkillFiltered use this path, and global skillshare audit and global install audits call them (audit.go#L538-L546). A mistake in the global audit-rules.yaml can therefore turn every pattern-rule check off with no warning. Scans then report fewer findings, and install may let through content it would otherwise block.
Request
Have the global scan path return the rules-load error, as the project path already does, so the user sees which file failed and why.
Suggested regression test
Point the global audit-rules path at a temporary file containing an invalid regex. Assert that ScanSkill returns an error that names the file, and does not return a clean result.
Thanks for tracing this through the source so carefully, it made the fix easy to scope. #882 makes the global scan path return the rules-load error just like project mode, and the message now names the failing audit-rules.yaml file. Install also stops instead of continuing unscanned when the audit cannot run, and points you to fix the file or use --skip-audit. It will ship in the next release. If anything still looks off after you upgrade, please reopen or let me know.
Activity
runkids commentedon Nov 13, 2026
Thanks for tracing this through the source so carefully, it made the fix easy to scope. #882 makes the global scan path return the rules-load error just like project mode, and the message now names the failing
audit-rules.yamlfile. Install also stops instead of continuing unscanned when the audit cannot run, and points you to fix the file or use--skip-audit. It will ship in the next release. If anything still looks off after you upgrade, please reopen or let me know.fix(audit): report audit-rules load errors and block installs whose a…