Repository: woodruffw/zizmor (language: python)

Issue:
[BUG]: 0.9.0 crashes with "job does not define a strategy or interior matrix"
### Pre-submission checks

- [X] I am **not** filing a feature request. These should be filed via the feature request form instead.
- [X] I have looked through the [open issues](https://github.com/woodruffw/zizmor/issues?q=is%3Aissue+is%3Aopen+) for a duplicate report.

### Expected behavior

Given this workflow file, zizmor 0.8.0 handles it fine:
``` yaml
name: Workflow

on:
  workflow_call:
    inputs:
      os:
        type: string

jobs:
  deploy:
    runs-on: ${{inputs.os}}
    steps:
      - run: echo "Hello world"
```

### Actual behavior

zizmor 0.9.0 crashes with this message:
>self-hosted-runner failed on release.yml
>
>Caused by:
>    job does not define a strategy or interior matrix


### Reproduction steps

1. Run `zizmor --version` to verify version is `0.9.0`
2. Save the YAML file above as `release.yml`
3. Run `zizmor release.yml`
4. Observe the error

### Logs

_No response_

### Additional context

_No response_


Discussion / hints:

Fix patch:
diff --git a/src/audit/self_hosted_runner.rs b/src/audit/self_hosted_runner.rs
index c0122f3..733bb67 100644
--- a/src/audit/self_hosted_runner.rs
+++ b/src/audit/self_hosted_runner.rs
@@ -107,7 +107,9 @@ impl WorkflowAudit for SelfHostedRunner {
                 // The entire `runs-on:` is an expression, which may or may
                 // not be a self-hosted runner when expanded, like above.
                 LoE::Expr(exp) => {
-                    let matrix = Matrix::try_from(&job)?;
+                    let Ok(matrix) = Matrix::try_from(&job) else {
+                        continue;
+                    };
 
                     let expansions = matrix.expanded_values;
 


Test patch:
diff --git a/tests/snapshot.rs b/tests/snapshot.rs
index 8318a26..16d22f3 100644
--- a/tests/snapshot.rs
+++ b/tests/snapshot.rs
@@ -192,6 +192,11 @@ fn self_hosted() -> Result<()> {
         .args(["--persona=auditor"])
         .run()?);
 
+    // Fixed regressions
+    insta::assert_snapshot!(zizmor()
+        .workflow(workflow_under_test("self-hosted/issue-283-repro.yml"))
+        .args(["--persona=auditor"])
+        .run()?);
     Ok(())
 }
 
diff --git a/tests/snapshots/snapshot__self_hosted-8.snap b/tests/snapshots/snapshot__self_hosted-8.snap
new file mode 100644
index 0000000..cd4e905
--- /dev/null
+++ b/tests/snapshots/snapshot__self_hosted-8.snap
@@ -0,0 +1,6 @@
+---
+source: tests/snapshot.rs
+expression: "zizmor().workflow(workflow_under_test(\"self-hosted/issue-283-repro.yml\")).args([\"--persona=auditor\"]).run()?"
+snapshot_kind: text
+---
+No findings to report. Good job!
diff --git a/tests/test-data/self-hosted/issue-283-repro.yml b/tests/test-data/self-hosted/issue-283-repro.yml
new file mode 100644
index 0000000..8379f8a
--- /dev/null
+++ b/tests/test-data/self-hosted/issue-283-repro.yml
@@ -0,0 +1,13 @@
+name: Workflow
+
+on:
+  workflow_call:
+    inputs:
+      os:
+        type: string
+
+jobs:
+  deploy:
+    runs-on: ${{inputs.os}}
+    steps:
+      - run: echo "Hello world"