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
+18-11Lines changed: 18 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,20 +9,27 @@ Everything about how Layne behaves on a given repo lives in `config/layne.json`.
9
9
```json title="config/layne.json"
10
10
{
11
11
"$global": {
12
+
"mode": "changed_files",
13
+
"contextLines": 8,
14
+
"timeoutMinutes": 10,
12
15
"semgrep": {
16
+
"enabled": true,
13
17
"extraArgs": ["--config", "auto"]
14
18
},
15
19
"trufflehog": {
20
+
"enabled": true,
16
21
"extraArgs": []
17
22
},
18
23
"trigger": {
19
24
"on": "pull_request"
20
25
},
21
26
"labels": {
22
-
"onFailure": ["needs-security-review"],
23
-
"removeOnFailure": ["security-ok"],
24
-
"onSuccess": ["security-ok"],
25
-
"removeOnSuccess": ["needs-security-review"]
27
+
"onFailure": ["needs-security-review"],
28
+
"removeOnFailure": ["security-ok"],
29
+
"onSuccess": ["security-ok"],
30
+
"removeOnSuccess": ["needs-security-review"],
31
+
"onException": ["security-exception-used"],
32
+
"removeOnException": ["needs-security-review"]
26
33
},
27
34
"notifications": {
28
35
"rocketchat": {
@@ -31,7 +38,12 @@ Everything about how Layne behaves on a given repo lives in `config/layne.json`.
31
38
}
32
39
},
33
40
"comment": {
34
-
"enabled": false
41
+
"enabled": false,
42
+
"template": null
43
+
},
44
+
"exceptionApprovers": {
45
+
"users": ["security-lead"],
46
+
"teams": ["acme/security-team"]
35
47
}
36
48
}
37
49
}
@@ -113,7 +125,7 @@ Hard time limit for a single scan job. If the limit is reached, the job is rethr
113
125
-**Default:**`10`
114
126
- Accepts any positive integer
115
127
116
-
Raise this for large monorepos where Semgrep takes a long time, or lower it to fail fast on repos that should scan quickly.
128
+
Raise this for large monorepos where scanners may take a long time, or lower it to fail fast on repos that should scan quickly.
117
129
118
130
```json title="config/layne.json"
119
131
{
@@ -326,11 +338,6 @@ When an exception approval is used, you can configure a label to be added or rem
326
338
327
339
If a label listed in `onFailure`, `onSuccess`, or `onException` does not exist on the repository, Layne creates it automatically with a neutral gray color (`#ededed`). You do not need to pre-create labels.
328
340
329
-
### Global vs per-repo
330
-
331
-
A per-repo `labels` block replaces the `$global` block entirely - it is not merged key-by-key. If neither `$global` nor the repo defines a `labels` key, the feature is a no-op for that repo.
332
-
333
-
334
341
## Exception Approvals
335
342
336
343
Configure specific users or teams who can approve PRs that would otherwise fail. See [Exception Approvals](./exception-approvals.md) for full documentation.
Copy file name to clipboardExpand all lines: website/docs/local-development.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
@@ -1,6 +1,6 @@
1
1
# Local Development
2
2
3
-
This guide explains how to run Layne entirely on your own machine so you can develop and test features without touching production. By the end, you will have a real GitHub App delivering live webhooks to your laptop, and a way to replay those webhooks instantly without opening a real pull request every time.
3
+
When developing new features or modifying Layne in general, you should avoid doing so in production. These steps will guide you through setting up a local development environment for Layne.
Copy file name to clipboardExpand all lines: website/docs/scanners/semgrep.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,10 @@ Layne's reporter also handles `critical` severity (mapped to `failure`), but Sem
53
53
54
54
**`extraArgs` replaces the default entirely.** If you set per-repo `extraArgs`, include everything you need - there is no merging with the global value.
55
55
56
+
:::warning paths.include and paths.exclude in rules are not effective
57
+
Semgrep rules support a `paths:` block to restrict which files a rule applies to. This does not work reliably with Layne. Because Layne passes an explicit list of file paths to Semgrep rather than a directory, Semgrep bypasses rule-level path filtering — `paths.include` and `paths.exclude` entries are silently ignored. This is a known issue. Avoid writing or relying on rules that use `paths:` filters when using Layne.
0 commit comments