Skip to content

No-workflows repositories: three controls report unexpected_exit instead of saying there is nothing to audit #584

Open

Description

@Marc-cn

Summary

Low priority, wording only, On a repository with no .github/workflows/ directory and no confirmed project context, three controls report WARN [unexpected_exit]:

WARNING: OSPS-BR-01.01: exec handler could not complete (error_class=unexpected_exit): Command exited with unexpected code 3: zizmor --format json --offline <repo>; stderr: ... fatal: no audit was performed ...
WARNING: OSPS-BR-01.02: exec handler could not complete (error_class=unexpected_exit): Command exited with unexpected code 2: grep -rln github.head_ref .github/workflows/; stderr: grep: .github/workflows/: No such file or directory
WARNING: OSPS-AC-04.02: exec handler could not complete (error_class=unexpected_exit): Command exited with unexpected code 3: zizmor --format json --offline <repo>; ...
  OSPS-BR-01.01: WARN [unexpected_exit] - Could not automatically verify - manual verification required

All three have when = { ci_provider = "github" }, the context has no ci_provider until a person confirms it, and running the control and reporting WARN is the cautious result.

The point is the reason shown. "Unexpected exit code 3" reads as a broken tool. What happened is well defined: zizmor exits 3 when it finds no inputs, and grep exits 2 when the directory is missing. A new user auditing a repository before adding CI sees three warnings that look like failures of darnit.

Possible direction

  • Recognize "no workflow files" for these steps and say so in the message, keeping WARN.
  • Or point the message at the ci_provider question: confirming it makes these controls not applicable.

Seen with zizmor 1.30.1 on main at 24a4fed.

Drafted with Claude; reviewed and filed by me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageAwaiting maintainer review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions