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
Copy file name to clipboardExpand all lines: website/docs/configuration.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ Not all keys merge the same way when a per-repo entry overrides `$global`. The r
64
64
65
65
| Key | How per-repo overrides `$global`|
66
66
|---|---|
67
-
|`mode`, `contextLines`| Per-repo value replaces global value |
67
+
|`mode`, `contextLines`, `timeoutMinutes`| Per-repo value replaces global value |
68
68
|`semgrep`, `trufflehog`, `claude`| Merged at the key level - per-repo values overwrite matching keys, unset keys inherit from global |
69
69
|`trigger`| Full replacement - per-repo `trigger` replaces the global block entirely |
70
70
|`labels`| Full replacement - per-repo `labels` replaces the global block entirely |
@@ -106,6 +106,26 @@ Number of surrounding lines to include around each changed hunk when `mode` is `
106
106
-**Default:**`8`
107
107
- Ignored when `mode` is `"changed_files"`
108
108
109
+
### `timeoutMinutes`
110
+
111
+
Hard time limit for a single scan job. If the limit is reached, the job is rethrown so BullMQ can retry it. The Check Run is only marked as failed on the final attempt.
112
+
113
+
-**Default:**`10`
114
+
- Accepts any positive integer
115
+
116
+
Raise this for large monorepos where Semgrep takes a long time, or lower it to fail fast on repos that should scan quickly.
117
+
118
+
```json title="config/layne.json"
119
+
{
120
+
"$global": {
121
+
"timeoutMinutes": 10
122
+
},
123
+
"org/monorepo": {
124
+
"timeoutMinutes": 25
125
+
}
126
+
}
127
+
```
128
+
109
129
### Examples
110
130
111
131
**Use `diff_only` globally, fall back to full scan for a compliance-critical repo:**
Copy file name to clipboardExpand all lines: website/docs/reference.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ For how findings are converted to GitHub annotations and how severities affect P
35
35
36
36
## Scan timeout
37
37
38
-
Each job has a hard 10-minute timeout. If a scan exceeds this limit:
38
+
Each job has a configurable timeout (default 10 minutes, controlled by [`timeoutMinutes`](configuration.md#timeoutminutes) in `layne.json`). If a scan exceeds this limit:
39
39
- The job is rethrown so BullMQ can retry it
40
40
- The Check Run is only marked as failed on the **final** attempt (not on intermediate retries)
41
41
-`layne_scan_timeouts_total` is incremented (when metrics are enabled)
0 commit comments